Skip to content

chess-seventh/rusty-commit-saver

Repository files navigation

🦀 Rusty Commit Saver

Rust License: MIT Documentation Build Status codecov Codecov Test Analytics

✨ 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:


Features 🚀

  • 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

Installation 📦

  1. Clone the repository

    git clone https://github.com/chess-seventh/rusty-commit-saver.git
    cd rusty-commit-saver
  2. Enter the Nix development shell

    devenv shell
  3. Build the project

    cargo build --release
  4. (Optional) Install the binary to your PATH

    cargo install --path .

Usage 🛞

Simply commit as usual. The pre-commit hook will:

  1. Run linters (clippy, rustfmt, etc.) inside the Nix shell
  2. Invoke Rusty Commit Saver to log the commit

If you prefer manual invocation:

rusty-commit-saver

Your commit will be appended to, where Obsidian should be:

~/Documents/Wiki/📅 Diaries/0. Commits/YYYY/MM-MMMM/YYYY-MM-DD.md

Configuration 🛠

  • rust-toolchain.toml pins Rust 1.89.0
  • devenv.nix provisions Rust, Clippy, rustfmt, and Git hooks
  • .pre-commit-config.yaml defines all pre-commit checks
  • treefmt.toml configures treefmt and formatters

Roadmap & Improvements 📈

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.


Contributing 💖

  1. Fork the repo
  2. Create a feature branch
  3. Write tests and update README.md
  4. Submit a pull request

License 📄

MIT © 2025 Chess7th

About

Commit Saver

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •