First Commit: Welcome to swift-commit-gen (v0.1.0)
SwiftCommitGen reaches its first tagged release. Version 0.1.0 delivers an end-to-end workflow for generating high quality commit messages with Apple's on-device intelligence stack while keeping source code local.
Highlights
- Inspects staged and unstaged changes to build a concise diff summary.
- Drafts commit messages through Apple's on-device generative APIs, keeping data private.
- Guides you through an interactive review so you can accept, edit, or discard the proposed message.
- Offers optional staging and committing helpers to streamline the entire flow.
Installation
Homebrew (Recommended)
brew tap Iron-Ham/swift-commit-gen
brew install swiftcommitgenOr install directly without tapping:
brew install Iron-Ham/swift-commit-gen/swiftcommitgenFrom Source
- Clone the repository:
git clone https://github.com/Iron-Ham/swift-commit-gen.git cd swift-commit-gen - Use the bundled install script (defaults to
~/.local/bin):Provide an alternate destination as the first argument if necessary, for exampleScripts/install.sh
Scripts/install.sh /usr/local/bin. - Prefer manual installation instead? Build and copy the release binary yourself:
Add
swift build -c release install -d "$HOME/.local/bin" install .build/release/swiftcommitgen "$HOME/.local/bin/"
export PATH="$HOME/.local/bin:$PATH"to your shell profile if the binary directory is not already on the path.
Usage
Execute the generator from any Git repository with pending work:
swiftcommitgenAs the author, I'll say I've personally aliased it to cg.
Helpful options:
--stagedlimits analysis to staged files only.--format jsonreturns the draft message in a JSON format, along with diagnostics.--helplists every available flag.--style (summary, conventional, detailed)allows you to change the style that a commit is generated in. Defaults tosummary.
Requirements
- macOS 26 (Sequoia) or later with Apple Intelligence enabled.
- Xcode 26 toolchain with command line tools registered.
- Swift 6 compiler
- Git 2.40 or newer on the shell
PATH. - Terminal (or preferred shell) granted Full Disk Access so the FoundationModels framework can initialize.
Known Limitations
- Configuration files for tailoring prompt behavior are still on the roadmap.
- Extremely large diffs are split with token-aware batching, but exceptionally large histories can still exceed the combined context window and may require manual trimming.
- Apple Intelligence must be available on the host system; no fallback to cloud models exists.
Looking Ahead
Future updates will focus on richer prompting controls, improved diff batching, user-configuration, and custom styling instructions. Feedback, issues, and pull requests are welcome as the project evolves.