| Crates.io | cargo-atomic |
| lib.rs | cargo-atomic |
| version | 0.1.1 |
| created_at | 2024-05-31 19:54:12.109896+00 |
| updated_at | 2025-05-23 06:51:24.068829+00 |
| description | A CLI tool to help make local git commits easier. |
| homepage | |
| repository | https://github.com/ExtremelyRyan/atomic |
| max_upload_size | |
| id | 1258253 |
| size | 114,491 |
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:
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-atomic
Note: minimum supported Rust version is 1.74. Windows 10/11 only (Linux coming soon).
atomic.toml.atomic <command>.atomic.toml[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
["cargo check", "cargo test"])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 = true
Call with:
atomic --plugin cleanup
If 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.
atomic remote Worksβ οΈ WARNING:
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 example
Built-in templates:
rustexampleThey include:
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&&, ||, ;plugin.build && plugin.deploy){{ var | default("fallback") }})Contribute or suggest features on GitHub.
Built by ExtremelyRyan. MIT licensed. Star the repo if you use it!
cargo-atomicatomic