Skip to main content

An AI-powered interactive git CLI with agentic tools for commits, code suggestions, and workflow automation.

Project description

messygit

messygit is an interactive CLI that turns messy git workflows into clean Conventional Commits — stage, commit, push, and get AI-powered project suggestions, all from one interface powered by Claude.

Why use it

  • Interactive REPL — one command drops you into a persistent session where you can stage, commit, push, and more without leaving.
  • AI commit messages — sends your staged diff to Claude and suggests a clean Conventional Commits subject line.
  • Project suggestions — an AI agent inspects your repo and recommends concrete next steps.
  • Safe by default — only the staged diff is sent to the model. Your API key is never printed in full.

Requirements

  • Python 3.10 or newer
  • Git (run inside a repository)
  • An Anthropic API key with access to the Messages API

Installation

pip install messygit

Install from source

cd messygit
python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -e .

API key

messygit resolves the key in this order:

  1. Environment variable ANTHROPIC_API_KEY
  2. Config file ~/.messygit/config.json

You can set the key from within the messygit interface:

messygit > config YOUR_ANTHROPIC_API_KEY

Usage

messygit

This drops you into the interactive interface:

 mmm    mmm  eeeeeee  sssssss  sssssss  yy   yy  ggggggg  ii  tttttttt
 mm mm mm m  ee       ss       ss        yy yy   gg       ii     tt
 mm  mmm  m  eeeee    sssssss  sssssss    yyy    gg  ggg  ii     tt
 mm       m  ee            ss       ss    yy     gg   gg  ii     tt
 mm       m  eeeeeee  sssssss  sssssss   yy      ggggg   ii     tt

Type 'help' for commands, 'quit' to exit.

messygit >

Commands

Command Description
add <file> or add . Stage files for commit
commit Generate an AI commit message from staged changes, then commit / cancel / edit
push Push commits to remote
suggestion Get AI-powered next-step suggestions for your project
config <key> Save your Anthropic API key to ~/.messygit/config.json
show Display a masked API key and its source
help List available commands
quit / exit Exit messygit

Typical flow

messygit > add .
Staged everything

messygit > commit
feat(cli): add interactive REPL with ASCII banner
Commit with this message? [y/n/e] y

messygit > push

Commit message style

The model follows Conventional Commits: type(scope): description

Allowed types: feat, fix, docs, style, refactor, test, chore. Subjects are one line, imperative, lowercase, no trailing period.

Publishing to PyPI

This project uses GitHub Actions with PyPI trusted publishing — no API tokens needed in your repo.

One-time setup

  1. Go to your project on pypi.org
  2. Add a Trusted Publisher:
    • Owner: your GitHub username
    • Repository: messygit
    • Workflow name: publish.yml
    • Environment: leave blank

To release a new version

  1. Bump version in pyproject.toml
  2. Commit and push
  3. Create a GitHub release:
git tag v0.2.0
git push origin v0.2.0
  1. Go to GitHub → Releases → Draft a new release → select the tag → Publish

The workflow at .github/workflows/publish.yml will automatically build and upload to PyPI.

Manual publish (without CI)

rm -rf dist/
python -m build
twine upload dist/*

License

MIT (see pyproject.toml).

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

messygit-0.2.1.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

messygit-0.2.1-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file messygit-0.2.1.tar.gz.

File metadata

  • Download URL: messygit-0.2.1.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for messygit-0.2.1.tar.gz
Algorithm Hash digest
SHA256 818ee5607074a720f4b6c3ccc1ecac236023f32e03e9a13b3461d2363edc4457
MD5 7382c72a348365dbf04fcaca1470302d
BLAKE2b-256 19ffb71970afda4e88dc27d0751874f93e0d3c15364a75c0463dd6c58f1ccdab

See more details on using hashes here.

Provenance

The following attestation bundles were made for messygit-0.2.1.tar.gz:

Publisher: publish.yml on jaytan3966/messygit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file messygit-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: messygit-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for messygit-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e2b8bb18a2bcacdda163edb59957225fe90138d4ab7abe4684931ec6a13b3be8
MD5 aa67a9c8bce7469dd788cdaa716092c1
BLAKE2b-256 e7cf1dbda74fa6500e6540fc77af6f5c6cd3ddb20aa98cb9a8943e18064e6982

See more details on using hashes here.

Provenance

The following attestation bundles were made for messygit-0.2.1-py3-none-any.whl:

Publisher: publish.yml on jaytan3966/messygit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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