Skip to main content

AI-powered Git commit message generator using Apple Intelligence

Project description

fm-smart-commit

AI-powered Git commit generation running 100% locally on your Mac using Apple Intelligence.

fm-smart-commit is a lightweight CLI tool that analyzes your staged Git changes and generates concise, professional Conventional Commits (feat:, fix:, refactor:, etc.).

Because it runs completely on-device using the Apple Foundation Models SDK, it offers massive advantages over cloud-based AI tools:

  • Privacy-First: Your codebase never leaves your machine. Perfect for enterprise, proprietary, or sensitive code.
  • Zero API Costs: No OpenAI API keys or GitHub Copilot subscriptions required. It uses the AI already built into your Mac.
  • Fast: Powered natively by Apple Silicon neural engines for instant inference.
  • Multi-Pass Analysis: Default mode runs parallel agents for better commit messages.

Prerequisites

Before installing, ensure your machine meets the hardware and software requirements for local Apple Intelligence:

  • Hardware: Apple Silicon Mac (M1 chip or newer).
  • OS: macOS 15.0 (Sequoia) or newer.
  • Settings: Apple Intelligence must be enabled on your Mac.

Installation

Via pip (Recommended)

pip3 install fm-smart-commit

From Source

# Clone the repository
git clone https://github.com/brazill7/smart-commit.git
cd smart-commit

# Install in development mode
pip3 install -e .

Usage

Make sure you have staged your changes (git add .) before running the tool.

Quick Mode (Fast, Single-Pass)

fm-smart-commit -q

Detailed Mode (Default, Multi-Pass Analysis)

fm-smart-commit

With Custom Context

Provide context to guide the AI:

fm-smart-commit -c "fixes ticket #123"
fm-smart-commit -q -c "race condition on login"

Options

Flag Description
-q, --quick Use quick single-pass mode (faster but less detailed)
-c, --context Additional context to include in the commit message

Git Alias (Optional)

If you want to use this tool natively within Git:

git config --global alias.sc '!fm-smart-commit'
git config --global alias.smart '!fm-smart-commit'

Then use:

git sc
git smart

Example Output

$ fm-smart-commit
Analyzing diff (detailed mode - 3 parallel agents)...
  Scope: src/auth.py, login component...
  Intent: Improve user authentication...
  Changes: added hashPassword function...
Synthesizing results...

Suggested commit: fix: add hashPassword function for secure authentication
Accept commit? (y/n/r): y
Committed successfully!

Prompt Options

  • y - Accept and commit
  • n - Abort
  • r - Retry (up to 3 attempts)

Features

  • Conventional Commits: Generates properly formatted commit messages
  • Privacy-First: All processing happens locally on your Mac
  • Zero Config: Works out of the box with Apple Intelligence
  • Two Modes: Quick (fast) or Detailed (multi-pass parallel analysis)
  • Retry Support: Re-generate commits up to 3 times

Requirements

  • macOS 15.0+ (Sequoia)
  • Apple Silicon Mac (M1+)
  • Apple Intelligence enabled
  • Python 3.10+

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fm_smart_commit-1.1.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fm_smart_commit-1.1.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file fm_smart_commit-1.1.1.tar.gz.

File metadata

  • Download URL: fm_smart_commit-1.1.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fm_smart_commit-1.1.1.tar.gz
Algorithm Hash digest
SHA256 8a8a70af01175aa462dda045d9445667bafd500cc77169a17e509c7425fe14ca
MD5 a790f69070706464a2be5d7e56213982
BLAKE2b-256 0b121e628db10e9d7ede8829b937190a1d6ffd002a504137d024ead3aea7ad62

See more details on using hashes here.

File details

Details for the file fm_smart_commit-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fm_smart_commit-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 999f9e079d3f89bd44ff2ed5de58dae9a776de4666dd57b8189fa21ebbde673d
MD5 bf97f8ab8d11033ccac98a9ad23cb576
BLAKE2b-256 59d4c7e978713660373c86bb13bacfe278cdf7f59de86ebfd2c9e14d0debaf36

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page