A smart command runner that finds and executes commands across different build systems and project types.
Why? Working across multiple projects with different tech stacks (Rust/Cargo, Node/npm/bun, Python/uv, Go, etc.) means remembering different commands for the same tasks. Instead of trying to recall whether it's npm run test, cargo test, go test, or make test, or wondering whether this Node project uses npm run test or bun test, simply use cmdr test in any project.
# In a Rust project
$ cmdr test
Running: cargo test
# In a Node project with bun
$ cmdr test
Running: bun run test
# In a project with a Makefile
$ cmdr format
Running: make format
# Or use the shorter alias
$ cr test
Running: cargo testgo install github.com/osteele/cmd-runner/cmd/cmdr@latestThis installs the binary as cmdr. For an even shorter command, you can install the cr alias:
# Preview what will be changed (dry-run)
cmdr install-alias --dry-run
# Install the alias
cmdr install-aliasOr manually create an alias in your shell configuration:
alias cr=cmdr
# For an ultra-short alias, you could even use punctuation:
alias ,=cmdr # Now you can type: , test
alias @=cmdr # Now you can type: @ buildOr install from source:
git clone https://github.com/osteele/cmd-runner.git
cd cmd-runner
go install ./cmd/cmdrcmdr <command> [args...]
cmdr install-alias [--dry-run] # Install 'cr' alias to shell configExamples:
cmdr format # Runs format or fmt command
cmdr test # Runs test command
cmdr run # Runs run, dev, or serve command
cmdr build -- --prod # Runs build with additional arguments
# Or with the short alias (after installing)
cr test # Same as cmdr test
cr format # Same as cmdr formatformat/fmt- Code formattingrun/dev/serve/start- Run development server or applicationbuild- Build the projectlint- Run linterstypecheck- Run type checker (TypeScript, Python, Rust, Go)test- Run testscheck- Run lint, typecheck, and test together (uses native check if available, otherwise synthesizes)fix- Auto-fix issues (uses native fix if available, otherwise runs format and lint --fix)clean- Clean build artifactsinstall/setup- Install dependencies
- check: If no native
checkcommand exists, automatically runslint,typecheck, andtestin sequence - fix: If no native
fixcommand exists, automatically runsformatandlint --fix - typecheck: Errors if the project doesn't support type checking (no TypeScript, Python with pyright/mypy, Rust, or Go)
- Package Managers: bun, pnpm, yarn, npm, deno
- Type Checking: TypeScript (
tsc) - Common Tools: biome, eslint, prettier
- Package Manager: uv (with pyproject.toml)
- Type Checking: pyright, mypy
- Common Tools: ruff, pytest
- Build System: cargo
- Type Checking: Built-in (
cargo check) - Common Tools: clippy, rustfmt
- Build System: go modules
- Type Checking: Built-in (
go build) - Common Tools: go vet, gofmt
- Build Systems: gradle, maven
- Type Checking: Built-in compilation
The tool searches for commands in the following order:
- mise -
.mise.toml(polyglot runtime manager) - just -
justfileorJustfile(command runner) - make -
Makefileormakefile(classic build tool) - Node.js -
package.jsonwith bun/pnpm/yarn/npm - Rust -
Cargo.toml(cargo) - Go -
go.mod(go modules) - Python -
pyproject.tomlwith uv - Java/Kotlin -
build.gradle[.kts](gradle) orpom.xml(maven)
- First searches in the current directory
- Then searches in the project root (determined by
.jjor.gitdirectory) - Tries command aliases (e.g.,
fmtforformat,devforrun)
- Intelligent command aliasing (e.g.,
run→dev→serve) - Searches both current directory and project root
- Passes through additional arguments to the underlying command
- Supports all major build systems and package managers
Check out my development tools page for additional projects.
MIT License
