A front-end tool that aims to simplify developer workflow. It unifies the interface for working with different types of projects and programming languages.
# Run main target - also do everything that is needed to run main target
cdt run mainSome functions might not be available if they are not supported by the project or the corresponding tool is not available.
The tool supports running tools in different environments like docker. More information is available in the documentation.
# Build and run main.go in a docker container
cdt -e docker:golang:1.24 run main.goThe tool tries to detect the best workflow from the project directory, but in some cases the default ones might not be
suitable for your project. The tool reads configuration file cdt.yml from root directory and use it as configuration.
More information is available in the documentation.
project:
workflow:
build: make
lint: clang-tidy# Run all tests
cdt test
# Run specific subset of tests
cdt test test1
# Use specific supported tool
cdt test --tool phpunit test1Tool allows reformatting the whole project or specific file by formatting the tool defined by the project workflow.
# Reformat whole project
cdt format
# Reformat file or multiple files
cdt format file1 file2
# Use specific supported tool
cdt format --tool clang-format test1It's possible to check the code format without changing files. It can be used in CI to verify if code is properly formatted.
cdt format --check# Lint whole project
cdt lint
# Lint file or multiple files
cdt lint file1 file2
# Use specific supported tool
cdt lint --tool golangci-lint test1Some projects need to be configured (e.g., CMake). In most cases, it's handled by the tool, but if a specific configuration is required, it's possible to invoke the configuration manually.
cdt configure
# Custom build directory
cdt --output build/debug configureTargets can be compiled by build command. Some other command might invoke this command automatically if needed.
# Build whole project
cdt build
# Build specific target
cdt build main
# Use specific supported tool
cdt build --tool make test1For getting information about the current project the project command can be used.
# Obtain available targets
cdt project targets
# List all files grouped by targets
cdt project filesThe cdt can be installed using go tool:
go install github.com/NTSFka/cdtThe tool is available as a pre-built binary for Linux, macOS and Windows, see the Releases section.
The tool supports auto-completion for bash and zsh via cli.urfave.org/v3. Some released packages (DEB, RPM, APK, ...) contain auto-completion scripts so it works out of the box.
The list of supported tools types is available in the documentation.
The list of supported workflow types is available in the documentation.
The cdt tool can be extended by additional tools or workflow types. More information is available in the developer documentation.