✨ A Rust flake to automatically log al Git commits into Obsidian. ✨
Rusty Commit Saver captures each commit’s:
- Timestamp
- Commit message
- Repository URL
- Branch name
- Commit hash
and appends it to a dated diary entry in your Wiki directory.
Table of Contents:
- Automatic diary entry creation with YAML frontmatter and table header
- Timestamped commit rows formatted for Obsidian
- Customizable storage path under
📅 Diaries/0. Commits/YYYY/MM-MMMM/ - Preconfigured hooks (via Nix + pre-commit) to ensure code quality
-
Clone the repository
git clone https://github.com/chess-seventh/rusty-commit-saver.git cd rusty-commit-saver -
Enter the Nix development shell
devenv shell
-
Build the project
cargo build --release
-
(Optional) Install the binary to your PATH
cargo install --path .
Simply commit as usual. The pre-commit hook will:
- Run linters (
clippy,rustfmt, etc.) inside the Nix shell - Invoke Rusty Commit Saver to log the commit
If you prefer manual invocation:
rusty-commit-saverYour commit will be appended to, where Obsidian should be:
~/Documents/Wiki/📅 Diaries/0. Commits/YYYY/MM-MMMM/YYYY-MM-DD.md
rust-toolchain.tomlpins Rust 1.89.0devenv.nixprovisions Rust, Clippy, rustfmt, and Git hooks.pre-commit-config.yamldefines all pre-commit checkstreefmt.tomlconfigurestreefmtand formatters
There are many enhancements planned:
- Configurable Obsidian path
- Configurable year/day/month on where to save the commit
- Interactive CLI flags and richer metadata (author, files changed)
- Improved error handling and user feedback
- Unit tests and CI pipeline for automated releases
Contributions welcome! Feel free to open issues or submit PRs.
- Fork the repo
- Create a feature branch
- Write tests and update
README.md - Submit a pull request
MIT © 2025 Chess7th