Skip to main content

Open Source Love MIT License Maintained GitHub last commit Python PRs Welcome Latest Release PyPi Codacy Badge

One-Time Setup

  1. Obtain your API Key
    Register and get an API key from the DeepSeek AI developer dashboard

  2. Set the Environment Variable
    Set your key as the DEEPSEEK_API_KEY environment variable

    export DEEPSEEK_API_KEY="sk-xxxxxxxxxxxxxxxxxxxxxxxx"
    
  3. Verify the key is picked up
    Confirms a key is configured before you rely on it, and prints setup instructions if not

    aicommitter doctor
    

    It reports which keys are set, where each one came from, and which provider will be used. Add --live to ask the provider whether the key is actually accepted — a key can be present but expired or revoked, which otherwise only surfaces as an HTTP 401 at commit time:

    aicommitter doctor --live
    

    Exits non-zero when no usable key is found, so it can gate a setup script or CI step.

  4. Install the Git Hook in your repository
    Navigate to the root of any Git project and run the install command

    aicommitter install
    

Daily Usage

For every commit after setup:

  1. Stage your changes
    Add all or selected changes to the staging area

    git add .
    
  2. Commit!
    Commit directly with confirmation

    aicommitter generate --commit
    

Building & Publishing

For maintainers cutting a release to PyPI.

Before you build, bump the version in all four places — they are not derived from each other: pyproject.toml, the release badge above, the Latest Release section, and a new CHANGELOG.md entry.

Requires the release toolchain: pip install --upgrade build twine

  1. Clean stale artifacts Old builds in dist/ get picked up by twine upload dist/* and will publish the wrong version

    rm -rf dist/ build/ src/*.egg-info src/aicommitter/*.egg-info
    
  2. Build the distributions Produces both an sdist and a wheel

    python -m build
    
  3. Verify what was built Confirm only the new version is present, that resources/docs.md is bundled, and that the metadata is valid

    ls dist/
    python -m zipfile -l dist/aicommitter-*-py3-none-any.whl | grep docs.md
    twine check dist/*
    

    The docs.md check is not optional — it ships only via [tool.setuptools.package-data], and a missing copy is what broke aicommitter docs in 1.0.5.

  4. Upload to TestPyPI first (recommended) PyPI versions are immutable, so each version number can only ever be uploaded once

    twine upload --repository testpypi dist/*
    pip install --index-url https://test.pypi.org/simple/ --no-deps aicommitter==<version>
    
  5. Publish to PyPI Authenticate with __token__ as the username and a PyPI API token as the password

    twine upload dist/*
    

Create an API token at pypi.org/manage/account/token. To avoid re-entering it, store it in ~/.pypirc:

[pypi]
username = __token__
password = pypi-xxxxxxxxxxxx
Building inside a virtual environment (recommended, and required on externally managed Python)

Most current Python installs — Homebrew, Debian/Ubuntu, and python.org 3.12+ — are marked externally managed, so installing the build tools globally fails:

error: externally-managed-environment
× This environment is externally managed

A virtual environment gives the build its own isolated site-packages, so build and twine never touch your system Python and cannot collide with other projects' dependency versions.

1. Create the virtual environment — once per clone. .venv is already in .gitignore:

python3 -m venv .venv

2. Install the release toolchain into it:

.venv/bin/pip install --upgrade build twine

3. Run the build steps through it — prefix each command with .venv/bin/ so the venv's interpreter and tools are used:

rm -rf dist/ build/ src/*.egg-info src/aicommitter/*.egg-info
.venv/bin/python -m build
.venv/bin/twine check dist/*
.venv/bin/twine upload dist/*

Prefixing with .venv/bin/ works without activating anything. If you would rather activate the environment and drop the prefix:

source .venv/bin/activate     # Windows: .venv\Scripts\activate
python -m build
twine check dist/*
twine upload dist/*
deactivate                    # when finished

Testing the built package in the venv without publishing it, which also verifies the console entry point:

.venv/bin/pip install dist/aicommitter-*-py3-none-any.whl
.venv/bin/aicommitter --version
.venv/bin/aicommitter docs

Note that aicommitter --version reads installed distribution metadata, so after a version bump you must reinstall (.venv/bin/pip install -e .) before it reports the new number.

To start over at any point, delete and recreate it — a venv is disposable:

rm -rf .venv

Changelog

See CHANGELOG.md for a detailed history of changes. View on PyPI.

Latest Release

Version 1.3.0 (2026-09-28)

  • Added aicommitter doctor to check API key configuration, with --live to verify the key against the provider

Version 1.2.0 (2026-09-28)

  • Unified the Conventional Commit prompt across DeepSeek and Gemini
  • Added an output sanitizer that strips markdown code fences and preambles
  • Warn on stderr when a generated subject is not a Conventional Commit subject

Version 1.1.0 (2026-09-18)

  • Removed the obsolete Gemini model; default is now gemini-2.5-flash-lite

Version 1.0.9 (2026-04-25)

  • Add y flag to auto approve the commit message

Version 1.0.8 (2026-04-25)

  • Fixed NotOpenSSLWarning by suppressing it before urllib3 is imported
  • Added --version / -v flag to CLI

Version 1.0.7 (2026-04-25)

  • Version bump

Version 1.0.6 (2026-01-25)

  • Updated the version of aicommitter to 1.0.6
  • Fixed the issue of NotOpenSSLWarning warning

Version 1.0.5 (2026-01-25)

  • Updated the version of aicommitter to 1.0.5
  • Fixed the issue of docs.md file not being found
  • Fixed the timeout issue
  • Swtiched to deepseek-chat model from deepseek-reasoner model

Version 1.0.4 (2025-12-07)

  • Updated the version of aicommitter to 1.0.4
  • Added support for long_description in pypi library

Version 1.0.4 (2025-12-07)

  • Updated the version of aicommitter to 1.0.4
  • Added support for long_description in pypi library

Version 1.0.3 (2025-12-05)

  • Updated the version of aicommitter to 1.0.3
  • Refactored exception handling
  • Increased the session timeout to 180s for DEEPSEEK and GEMINI

For full details, see the CHANGELOG.

aicommitter generate -c -y        # generate, commit without confirmation
aicommitter generate -P -y        # generate, commit without confirmation, push to current branch
aicommitter generate --push       # generate, confirm commit, then push

Metadata

Release files for aicommitter 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aicommitter 1.3.0
File Size Uploaded Provenance Actions
aicommitter-1.3.0.tar.gz 16.0 kB Without provenance Details for aicommitter-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aicommitter 1.3.0
File Interpreter ABI Platform Actions
aicommitter-1.3.0-py3-none-any.whl Python 3 none any Details for aicommitter-1.3.0-py3-none-any.whl

Total release size: 29.7 kB

Release files / aicommitter-1.3.0.tar.gz

Download URL aicommitter-1.3.0.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f1b991d2a5286d4fcbbecdcc0e61ad0ea4d7c5dd2ace0a62286c5c76ca52e48a
BLAKE2b-256 checksum
How to use checksums
cb98cbf7f757f2397316063dd420bff75594e75b19b336b7e145fb06b0d98d83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / aicommitter-1.3.0-py3-none-any.whl

Download URL aicommitter-1.3.0-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c8549793b8cb2cc41efa30db1eafeac23c4dc3795e071d4bfa6a7cddf8870ac
BLAKE2b-256 checksum
How to use checksums
0500a2e2d47f3e333303c2424077bff4891f54fce5f2f0c1a524026e12bc1670
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Security for aicommitter 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page