Atomic is a fast, minimal CLI tool that automates local Git commits around the scripts you already run — tests, formatters, docs, builds, anything. Define commands once in a TOML file. Let Atomic run them and snapshot your work with zero friction.
Use it as:
- A commit automation tool
- A task runner that remembers to save your work
- A Git-integrated wrapper for dev scripts
- A shell-based CI runner for solo workflows
Atomic solves a common annoyance: you run cargo test, npm run format, or ./scripts/setup.sh — but forget to commit. Or you commit inconsistently.
Now, your routine commands can automatically commit your changes, so you never lose progress.
git clone https://github.com/ExtremelyRyan/atomic.git
cd atomic
cargo install --path .cargo install cargo-atomicNote: minimum supported Rust version is 1.74. Windows 10/11 only (Linux coming soon).
- Define your dev commands in
atomic.toml. - Run them with
atomic <command>. - Atomic runs the command (plus any pre/post hooks).
- If it changes your Git state, it locally auto-commits.
[custom.check]
command = "cargo check"
[custom.clippy]
before = "echo Running Clippy"
command = "cargo clippy"
after = "echo Clippy finished"
[custom.chain]
command = ["check", "clippy", "cargo fmt"]
[plugin.generate-docs]
script = "./scripts/gen_docs.py"
args = ["hello", "from", "Atomic!"]
silent = true- Auto-committing after build/test/lint
- Pre/post hooks around scripts or shell commands
- Cross-platform script runner (Windows PowerShell, batch, Python, etc.)
- Command chaining (
["cargo check", "cargo test"]) - Git-integrated plugin system
- Project scaffolding with starter templates
Add before and after to wrap any command:
[custom.test]
before = "echo Testing..."
command = "cargo test"
after = "echo Done."Run script-based plugins (any language):
[plugin.cleanup]
script = "./scripts/clean_temp.py"
args = ["--force"]
silent = trueCall with:
atomic --plugin cleanupIf silent = true, logs go to atomic-logs/cleanup.log.
| Command | Description |
|---|---|
atomic init |
Create an example atomic.toml with built-in Rust tasks |
atomic init --template rust |
Use the built-in Rust starter template |
atomic <command> |
Run a [custom.<command>] entry from your config |
atomic --plugin <name> |
Run a [plugin.<name>] script |
atomic --list |
List all available commands from your TOML |
atomic config show |
Show resolved TOML config in the terminal |
atomic remote "message" |
Stage, squash, and force-push all changes as a single commit with your message (replaces all remote history!) |
You can use kebab-case or snake_case for commands—both are supported.
- Auto-stages all changes (staged and unstaged).
- Commits them if needed, using your message.
- Squashes all your local commits into one, using your message.
- Force-pushes the branch, so the remote will always show just your one commit.
atomic remote force-pushes and rewrites your branch history on the remote.
Never use on shared or protected branches!
Always communicate with your team before rewriting remote history.
Examples:
atomic remote "feat: add user login with OAuth"
atomic remote "fix: final bugfix before review"
## 🗂 Templates
```bash
atomic init --template rust
atomic init --template exampleBuilt-in templates:
rustexample
They include:
- Common Rust commands (check, clippy, test)
- Plugin examples
- Commented TOML
When you run any custom or plugin command that alters the Git tree, Atomic will auto-commit it locally with a timestamp:
[2024-03-27 13:52:12] command: cargo fmt
You don't have to think about git add or git commit. It just saves your progress.
Works with:
.sh,.bat,.cmd,.ps1,.py,.exe- Shell chaining:
&&,||,; - Auto OS detection
- Linux support
- Plugin chaining (
plugin.build && plugin.deploy) - Template variables with default values (
{{ var | default("fallback") }}) - Git hook integration
- Command caching or skip-if-clean behavior
- Web UI (log viewer or dashboard)
Contribute or suggest features on GitHub.
Built by ExtremelyRyan. MIT licensed. Star the repo if you use it!
- Crate name:
cargo-atomic - Binary name:
atomic - License: MIT
- Categories: CLI Tools, Git Automation, Rust Dev Utilities