Skip to main content

AI-powered git workflow CLI

Project description

imp

AI-powered git workflow.
Commit, branch, review, and release without writing commit messages, branch names, or PR descriptions.

Install · Quick Start · Commands · Configuration · License


imp commit -a        # stages everything, generates message, commits
imp branch "auth"    # creates feat/user-auth
imp review           # AI code review of your changes
imp release          # squash, changelog, tag, push

Why

AI agents can run git for you, but they improvise every time. Imp is opinionated: same format, same workflow, same result, every time.

  • Consistent commits across your whole team, validated against Conventional Commits before anything touches git
  • One-command releases that squash, changelog, tag, and push with automatic rollback on failure
  • Fast and deterministic. One command, not a conversation. No reasoning, no retries, no surprises.
  • AI writes the words, Imp controls the workflow. What gets staged, how it's validated, when it's safe to push.
  • Works offline with local models via Ollama. No API key required.

Install

uv tool install git+https://github.com/anders458/imp.git

Or with pip:

pip install git+https://github.com/anders458/imp.git

Then set up your AI provider and verify:

imp config
imp doctor

Quick Start

# Make some changes, then commit with an AI message
imp commit -a
# -> "feat: add rate limiting to API endpoints"
# -> Use this message? [Yes / Edit / No]

# Branch from a description
imp branch "add user authentication"
# -> Suggested: feat/user-auth
# -> Create branch? [Yes / No]

# Branch from a GitHub issue
imp fix 42
# -> Fetches issue, suggests fix/login-redirect-42

# Ship a release
imp release
# -> Version bump: patch / minor / major
# -> Generates changelog, squashes, tags, pushes

Commands

Daily Workflow

Command Description
imp commit [-a] Generate commit message from diff. -a stages all.
imp amend Rewrite last commit message from the full diff.
imp undo [N] Undo last N commits, keep changes staged.
imp revert [hash] Safely revert a pushed commit.
imp push Push commits to origin. Sets upstream on first push.
imp sync Pull, rebase, push in one step.
imp resolve AI-assisted merge conflict resolution.

Branching

Command Description
imp branch <desc> Create branch from plain English description.
imp branch Interactive branch switcher.
imp fix <issue> Create branch from GitHub issue number.
imp pr Create pull request with AI title and body.
imp done [target] Merge feature branch, clean up local and remote.

Analysis

Command Description
imp review AI code review of staged or unstaged changes.
imp split Group dirty files into logical commits via AI.
imp status Repo overview: branch, changes, sync state.
imp log [-n N] Pretty commit graph.

Release

Command Description
imp release Squash commits, generate changelog, tag, push, create GitHub release.
imp ship [level] Commit all + release in one shot, no prompts. Default: patch.

Setup

Command Description
imp config Interactive AI provider and model setup.
imp doctor Verify tools, config, and AI connection.
imp clean Delete merged branches (local and remote).
imp help Show workflow guide and commit format reference.

Any AI command accepts --whisper / -w to hint the AI without overriding its rules:

imp commit -a -w "use IMP-42 as ticket"
imp review -w "focus on error handling"

Workflows

Flow Steps
Solo commit -apushrelease
Feature branch branchcommit -aprdone
Hotfix fix 42commit -aprdone
Merge conflict sync or doneresolve → continue

Commit Format

Imp generates Conventional Commits messages, validated before use.

type: message              feat, fix, refactor, build, chore,
type(scope): message       docs, test, style, perf, ci
type!: message             (breaking change)

All lowercase after the colon (except ticket IDs). Imperative mood. Max 72 chars, no period. Tickets after the colon: fix: IMP-42 resolve timeout. Scopes optional: refactor(auth): simplify flow.

Configuration

imp config

Interactive menu to set your AI provider and models. Stored in ~/.config/imp/config.json.

Setting Default Description
provider claude AI provider: claude or ollama
model:fast haiku Model for quick tasks (commit, branch)
model:smart sonnet Model for complex tasks (review, PR, split)

Environment variables (IMP_AI_PROVIDER, IMP_AI_MODEL_FAST, IMP_AI_MODEL_SMART) override the config file when set, useful for CI.

Requirements

  • Python 3.10+
  • git
  • gh (optional, for imp fix, imp pr, imp release)

Claude Code (default)

Imp uses Claude Code as its default AI provider. You need an active Claude Code subscription.

curl -fsSL https://claude.ai/install.sh | bash
claude          # authenticate
imp doctor      # verify

Ollama (local, free)

For fully offline usage with no API key:

# Install from https://ollama.com, then:
ollama pull llama3.2
imp config      # select ollama and your models
imp doctor      # verify

Development

git clone https://github.com/anders458/imp.git
cd imp
pip install -e ".[dev]"
pytest -v
ruff check src/ tests/

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

imp_git-0.0.26.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

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

imp_git-0.0.26-py3-none-any.whl (38.8 kB view details)

Uploaded Python 3

File details

Details for the file imp_git-0.0.26.tar.gz.

File metadata

  • Download URL: imp_git-0.0.26.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for imp_git-0.0.26.tar.gz
Algorithm Hash digest
SHA256 945cbfee3a062d25473a765ee5a9402f254253281e4ad8e365a6dc0542aa215c
MD5 4de1d14a67f808ac4cf15e0b7a79dd5f
BLAKE2b-256 8340c49064fe52898a7d11747e1d56535f7a6cf480e5b13c2231b488296c1377

See more details on using hashes here.

File details

Details for the file imp_git-0.0.26-py3-none-any.whl.

File metadata

  • Download URL: imp_git-0.0.26-py3-none-any.whl
  • Upload date:
  • Size: 38.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for imp_git-0.0.26-py3-none-any.whl
Algorithm Hash digest
SHA256 b230faac01c8279b5db88cab2780c257e98c18cd339e6747c200849470f8d075
MD5 760c2db5d49718878b80f2887081f97f
BLAKE2b-256 76aeb7dbcae2ea800a189030f034c624c39f645e2a7c87f0cb5823494656f768

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