Skip to main content

Local AI layer for git: orchestrates policies & plugins between commit and push.

Project description

giton

AI Cost Tracking

PyPI Version Python License AI Cost Human Time Model

  • 🤖 LLM usage: $0.4093 (6 commits)
  • 👤 Human dev: ~$300 (3.0h @ $100/h, 30min dedup)

Generated on 2026-05-27 using openrouter/qwen/qwen3-coder-next


giton is a local AI layer for Git that works between commit and push. It helps standardize commits, propose safe code fixes, and orchestrate external tools via plugins.

Does something like this already exist?

Partially: there are tools for AI commit messages, git hooks, and commit-history rewriting. What is still missing is one local operator that:

  • interacts with the user right after commit,
  • proposes code fixes as additional commits (fixup!),
  • cleans up history before push,
  • integrates plugins via MCP/REST/CLI/gRPC.

Proposed direction for gix

  1. Local-first with safe defaults

    • AI proposes changes, user approves them.
    • Prefer fixup! commits over automatic history rewriting.
  2. Git hook layer

    • pre-commit: policy validation and quick fixes.
    • post-commit: inspect the fresh commit and propose follow-up patches.
    • pre-push: standardize history (autosquash, commit naming, final checks).
  3. Plugin architecture

    • Shared input/output contract (JSON schema).
    • Plugin adapters: MCP, REST, CLI shell, gRPC/protobuf.

MVP usage example

After giton init, hooks are installed and run automatically from Git lifecycle events. The commands below show equivalent manual execution for demonstration/debugging.

# 1) initialize hooks in the repository
giton init

# 2) user makes a normal commit
git add -p
git commit -m "update stuff"

# 3) equivalent manual run: post-commit hook logic
giton hook post-commit

# 4) equivalent manual run: pre-push hook logic
giton hook pre-push

Example interaction:

giton: Found 2 issues (example: null check, commit message policy).
giton: Apply patch and add commit "fixup! ..."? [Y/n]

MVP plan

  • MVP 1: hooks + policy engine + interactive CLI
  • MVP 2: patching + fixup workflow + pre-push autosquash
  • MVP 3: stable plugin API and MCP/REST/CLI/gRPC integrations

Install

pip install giton

Quick start

giton init                # install git hooks + 3 default plugins
giton shell               # interactive REPL
giton plugin catalog      # browse all available plugins
giton plugin install domd # install a specific extension
giton plugin install-category lang:python   # install everything for a language

Default plugins

The 3 plugins activated by gix init cover the most common day-to-day needs in a commit → push loop:

name category trigger role
pyqual lang:python pre-commit Python lint / type / complexity checks
vallm task:validate post-commit Validate AI-generated code/patches
pretest task:test pre-push Run / generate tests before push

Quick-extend categories

Each plugin in the catalog is tagged with a category, so you can install groups at once:

  • languages: lang:python, lang:markdown, lang:any
  • tasks: task:validate, task:test, task:refactor, task:autofix, task:fix, task:docs, task:security
  • integrations: integration:mcp
giton plugin install-category task:autofix

Interactive shell

$ giton shell
giton> help
giton> install-defaults
giton> hook pre-commit
giton> catalog
giton> install prefact

Plugin contract

A plugin is any executable command (CLI). The catalog entry declares its trigger, category, install target (PyPI/local path) and command template. The runner expands {paths}, {diff_file} and {root} placeholders with the current git context before invocation.

Future exec types (mcp, rest) will share the same JSON in/out contract: input = git context + policy findings, output = list of proposed actions (patches, fixup commits, warnings).

License

Licensed under Apache-2.0.

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

giton-0.1.2.tar.gz (253.5 kB view details)

Uploaded Source

Built Distribution

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

giton-0.1.2-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file giton-0.1.2.tar.gz.

File metadata

  • Download URL: giton-0.1.2.tar.gz
  • Upload date:
  • Size: 253.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for giton-0.1.2.tar.gz
Algorithm Hash digest
SHA256 68953d8f2cfbc67d34c83edd76fa8982bfdc08ac3525e56844f26620bfdc8f1e
MD5 a66f74df869588532864a8ebd450e3b5
BLAKE2b-256 5867fd984bab658241f3a29cd333449499591eec0c7d66341273825d5d78ac80

See more details on using hashes here.

File details

Details for the file giton-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: giton-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for giton-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 86f477e93f5fd69a12cc76d5a41fb60e39302488cea263861ee9f34f08d5cead
MD5 4eaac3882944ccdd334deeb8997f2fd4
BLAKE2b-256 b8ac1810f52976fd9744bf184080018284c59f1a0ac73770b49090cdfc2a5f62

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