Environment diagnostics and auto-fix for development machines.
Stop wasting hours debugging your dev machine. One command tells you exactly what's wrong β and how to fix it.
π§π· VersΓ£o em PortuguΓͺs
$ checkupββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β checkup v0.1.1 β Environment Diagnostics β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β β Node.js v20.10.0 (>= 20) β
β β PostgreSQL running on :5432 β
β β Docker not running β
β ββ Fix: systemctl start docker β
β β Port 3000 already in use β
β ββ Fix: kill $(lsof -t -i:3000) β
β β .env missing: DATABASE_URL, JWT_SECRETβ
β β
β Summary: 3 issues found, 2 passed β
β Run 'checkup fix' to auto-resolve what's possible β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Every developer has been there:
$ npm install
Error: node-gyp build failed
# ... 30 minutes later ...
# Oh, wrong Node version.
# ... 20 minutes later ...
# Oh, Docker isn't running.
# ... 15 minutes later ...
# Oh, DATABASE_URL isn't set.Three unrelated problems. 65 minutes wasted.
checkup diagnoses your entire dev environment in seconds. Define what your
project needs, run one command, see everything that's wrong β with the fix
right next to it.
git clone https://github.com/FranciscoBSpadaro/checkup-cli-rust
cd checkup
cargo install --path .curl -fsSL https://raw.githubusercontent.com/FranciscoBSpadaro/checkup-cli-rust/master/scripts/install.sh | bash| Platform | Status |
|---|---|
| Linux | β Supported |
| macOS | β Supported |
Step 1: Initialize config in your project root:
checkup initThis creates a checkup.toml file with sensible defaults.
Step 2: Edit checkup.toml for your project:
[commands.node]
command = "node"
fix = "fnm install 20"
[versions.node]
version_flag = "--version"
expected = ">=20"
fix = "fnm install 20"
[services.postgres]
port = 5432
[ports]
free = [3000, 8080]
[env]
required = ["DATABASE_URL", "JWT_SECRET"]
[envfile]
path = ".env"
required = ["DATABASE_URL", "JWT_SECRET"]Step 3: Run diagnostics:
checkupStep 4: Auto-fix what's possible:
checkup fixThe checkup.toml file defines what to check:
# Commands that must exist in PATH
[commands.node]
command = "node"
fix = "fnm install 20"
# Version checks (semver constraints: >=, >, ==, <, <=)
[versions.node]
version_flag = "--version"
expected = ">=20"
fix = "fnm install 20"
# Services (TCP port checks)
[services.postgres]
port = 5432
[services.redis]
port = 6379
# Ports that must be free
[ports]
free = [3000, 8080]
# Required environment variables
[env]
required = ["DATABASE_URL", "JWT_SECRET", "REDIS_URL"]
# .env file validation
[envfile]
path = ".env"
required = ["DATABASE_URL", "JWT_SECRET"]checkup Run all checks (default)
checkup init Create checkup.toml with auto-detected tools
checkup check Run all checks
checkup fix Auto-fix failures
checkup list List configured checks
checkup completions Generate shell completions
Options:
-c, --config <FILE> Path to config file [default: checkup.toml]
--json Output results as JSON
-q, --quiet Only show failures
-h, --help Print help
-V, --version Print version
Each check tests one aspect of your environment:
| Check | What it does |
|---|---|
command |
Verifies a command exists in PATH |
version |
Checks tool version (semver comparison) |
service |
TCP port check β is the service running? |
port |
Is the port free to use? |
envfile |
Does .env exist and have required keys? |
envvar |
Are environment variables set? |
Checks run in parallel using async I/O β typically completing in under 1 second.
The fix subcommand attempts to automatically resolve issues:
$ checkup fixAttempting auto-fix for 3 issues...
[1/3] Docker: starting service... β Done
[2/3] .env: creating from .env.example... β Done
[3/3] Port 3000: killing process... β Permission denied (need sudo)
2/3 fixed automatically. 1 requires manual action.
Run: sudo kill $(sudo lsof -t -i:3000)
When auto-fix isn't possible, the tool provides the exact command to run.
- β Project structure and architecture
- β
Core: trait
Check+ plugin system - β Checks: command, version, service, port, envfile, envvar
- β
Parallel execution with async (
futures::join_all) - β
checkup.tomlconfig parser (serde) - β Auto-fix suggestions
- β
JSON output mode (
--json) - β
CLI with clap (
init,check,fix,list,completions) - β Shell completions (bash, zsh, fish, powershell, elvish)
- β 38 tests passing (19 unit + 10 integration)
- π§ Windows support (pending):
- Replace
sh -ccalls withcfg(unix)/cfg(windows)conditional compilation inport.rs,command.rs,version.rs - Replace
lsof/ssinport.rs::find_process_on_port()withnetstat -anoon Windows - Add Windows CI job running
cargo test(currently onlybuild-windowsruns, without tests) - Add Windows install docs and re-enable
scripts/install.ps1when ready
- Replace
This project uses GitHub Actions for continuous integration and delivery. Every push and pull request triggers the CI pipeline automatically.
| Stage | Description |
|---|---|
| Check | cargo check β fast compilation verification |
| Format | cargo fmt β ensures consistent code style |
| Lint | cargo clippy β catches common mistakes |
| Test | cargo test β runs all tests (38 passing) |
| Build | cargo build --release β production artifact |
| Platform | Status |
|---|---|
| Linux | β Tested |
| macOS | β Tested |
The CI pipeline runs on Linux and macOS on every push. See .github/workflows/ci.yml for details.
Contributions are welcome! See CONTRIBUTING.md for detailed guidelines on how to submit issues, propose features, and open pull requests.
This project is licensed under the MIT License.