This file is designed for coding assistants. If you are a human, see README.md for the human-friendly guide.
git clone https://github.com/GreyforgeLabs/cooldown-guard.git && cd cooldown-guard && ./scripts/setup.shcooldown-guard is a Rust CLI for minimum-interval enforcement. It records completed command runs in SQLite, tells you whether a named job is ready or still cooling down, and can skip re-execution cleanly when the interval has not elapsed.
cooldown-guard/
src/
main.rs # process entry point
cli.rs # clap command definitions and rendering
db.rs # SQLite schema and persistence helpers
guard.rs # cooldown logic and command execution
model.rs # shared data structures
tests/
cli.rs # integration tests for run/status/clear
scripts/
setup.sh # idempotent build and verification script
.github/workflows/
ci.yml # fmt, clippy, and test workflow
README.md # human-facing docs
STARTHERE.md # this file
- Rust 1.88+
cargorustfmtcomponent (rustup component add rustfmt)
- Clone:
git clone https://github.com/GreyforgeLabs/cooldown-guard.git - Enter directory:
cd cooldown-guard - Run setup:
./scripts/setup.sh
cargo run --locked -- --version
# Expected output: cooldown-guard 0.1.0src/cli.rs- subcommands and output formattingsrc/guard.rs- cooldown evaluation and command executionsrc/db.rs- SQLite schema and run history queries
- Default state DB: platform state directory for
cooldown-guard, usually~/.local/state/cooldown-guard/runs.sqlite3on Linux - Override state DB:
--db /path/to/runs.sqlite3 - Output mode: add
--json
# Run tests
cargo test --locked
# Format check
cargo fmt --check
# Lint
cargo clippy --all-targets --all-features -- -D warnings
# Run an example command
cargo run -- run --name backup --min-interval 30m -- ./backup.sh