imp-git 0.0.26__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. imp_git-0.0.26/.gitignore +11 -0
  2. imp_git-0.0.26/CHANGELOG.md +165 -0
  3. imp_git-0.0.26/LICENSE +21 -0
  4. imp_git-0.0.26/PKG-INFO +226 -0
  5. imp_git-0.0.26/README.md +211 -0
  6. imp_git-0.0.26/logo.png +0 -0
  7. imp_git-0.0.26/pyproject.toml +80 -0
  8. imp_git-0.0.26/src/imp/__init__.py +7 -0
  9. imp_git-0.0.26/src/imp/__main__.py +3 -0
  10. imp_git-0.0.26/src/imp/ai.py +130 -0
  11. imp_git-0.0.26/src/imp/commands/__init__.py +0 -0
  12. imp_git-0.0.26/src/imp/commands/amend.py +68 -0
  13. imp_git-0.0.26/src/imp/commands/branch.py +72 -0
  14. imp_git-0.0.26/src/imp/commands/clean.py +47 -0
  15. imp_git-0.0.26/src/imp/commands/commit.py +67 -0
  16. imp_git-0.0.26/src/imp/commands/config.py +62 -0
  17. imp_git-0.0.26/src/imp/commands/doctor.py +87 -0
  18. imp_git-0.0.26/src/imp/commands/done.py +98 -0
  19. imp_git-0.0.26/src/imp/commands/fix.py +78 -0
  20. imp_git-0.0.26/src/imp/commands/help.py +103 -0
  21. imp_git-0.0.26/src/imp/commands/log.py +25 -0
  22. imp_git-0.0.26/src/imp/commands/pr.py +125 -0
  23. imp_git-0.0.26/src/imp/commands/push.py +42 -0
  24. imp_git-0.0.26/src/imp/commands/release.py +273 -0
  25. imp_git-0.0.26/src/imp/commands/resolve.py +161 -0
  26. imp_git-0.0.26/src/imp/commands/revert.py +83 -0
  27. imp_git-0.0.26/src/imp/commands/review.py +76 -0
  28. imp_git-0.0.26/src/imp/commands/ship.py +131 -0
  29. imp_git-0.0.26/src/imp/commands/split.py +176 -0
  30. imp_git-0.0.26/src/imp/commands/status.py +96 -0
  31. imp_git-0.0.26/src/imp/commands/sync.py +64 -0
  32. imp_git-0.0.26/src/imp/commands/undo.py +45 -0
  33. imp_git-0.0.26/src/imp/config.py +51 -0
  34. imp_git-0.0.26/src/imp/console.py +168 -0
  35. imp_git-0.0.26/src/imp/git.py +428 -0
  36. imp_git-0.0.26/src/imp/main.py +74 -0
  37. imp_git-0.0.26/src/imp/prompts.py +168 -0
  38. imp_git-0.0.26/src/imp/theme.py +14 -0
  39. imp_git-0.0.26/src/imp/validate.py +28 -0
  40. imp_git-0.0.26/src/imp/version.py +67 -0
  41. imp_git-0.0.26/tests/__init__.py +0 -0
  42. imp_git-0.0.26/tests/conftest.py +64 -0
  43. imp_git-0.0.26/tests/test_ai.py +73 -0
  44. imp_git-0.0.26/tests/test_commands.py +165 -0
  45. imp_git-0.0.26/tests/test_git.py +77 -0
  46. imp_git-0.0.26/tests/test_git_extended.py +371 -0
  47. imp_git-0.0.26/tests/test_prompts.py +113 -0
  48. imp_git-0.0.26/tests/test_release.py +75 -0
  49. imp_git-0.0.26/tests/test_undo.py +41 -0
  50. imp_git-0.0.26/tests/test_validate.py +58 -0
  51. imp_git-0.0.26/tests/test_version.py +75 -0
@@ -0,0 +1,11 @@
1
+ *.egg-info/
2
+ *.pyc
3
+ *.swp
4
+ *.swo
5
+ *~
6
+ .DS_Store
7
+ .pytest_cache/
8
+ .ruff_cache/
9
+ .venv/
10
+ __pycache__/
11
+ dist/
@@ -0,0 +1,165 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+
6
+ ## [0.0.24] - 2026-03-26
7
+
8
+ ### Added
9
+ - Add push command
10
+
11
+ ## [0.0.23] - 2026-03-26
12
+
13
+ ### Added
14
+ - Set commit dates from file modification times
15
+
16
+ ## [0.0.22] - 2026-03-24
17
+
18
+ ### Changed
19
+ - Restructure readme and remove table of contents
20
+
21
+ ## [0.0.21] - 2026-03-24
22
+
23
+ ### Changed
24
+ - Implement dynamic vcs-based versioning with hatch-vcs
25
+
26
+ ## [0.0.20] - 2026-03-24
27
+
28
+ ### Added
29
+ - Add resolve command for ai-assisted conflict resolution
30
+
31
+ ## [0.0.19] - 2026-03-24
32
+
33
+ ### Changed
34
+ - Refactor workflows section
35
+
36
+ ## [0.0.18] - 2026-03-24
37
+
38
+ ### Added
39
+ - Add interactive config management
40
+
41
+ ## [0.0.17] - 2026-03-23
42
+
43
+ ### Changed
44
+ - Rewrite why section to emphasize opinionated approach
45
+
46
+ ## [0.0.16] - 2026-03-23
47
+
48
+ ### Added
49
+ - Warn when releasing from non-base branch
50
+
51
+ ## [0.0.15] - 2026-03-21
52
+
53
+ ### Fixed
54
+ - Replace broad exception handling with specific types
55
+
56
+ ## [0.0.14] - 2026-03-20
57
+
58
+ ### Added
59
+ - Add ship command for one-shot commit and release
60
+
61
+ ## [0.0.13] - 2026-03-20
62
+
63
+ ### Added
64
+ - Add whisper option to AI commands
65
+
66
+ ## [0.0.12] - 2026-03-20
67
+
68
+ ### Added
69
+ - Overhaul done to merge locally and delete branch
70
+
71
+ ### Changed
72
+ - Expand command docstrings with behavior descriptions
73
+ - Replace git edit flag with interactive console.edit
74
+
75
+ ### Fixed
76
+ - Include exception details in error messages
77
+ - Parse status file paths with lstrip instead of fixed index
78
+
79
+ ## [0.0.11] - 2026-03-15
80
+
81
+ ### Added
82
+ - Add __main__ entry point and dynamic version from metadata
83
+
84
+ ### Changed
85
+ - Use builtin print instead of console.out.print
86
+ - Update install instructions for python package
87
+ - Add ai tests, command tests, and update imports
88
+ - Move sanitize to ai module and add truncate helper
89
+ - Remove deprecated bash scripts and bin wrapper
90
+ - Sync (alias).
91
+ - Rewrite in python
92
+
93
+ ### Fixed
94
+ - Rename range to rev_range, add git timeout, fix split paths
95
+
96
+ ## [0.0.10] - 2026-02-26
97
+
98
+ - Added: add split, done, clean commands and branch switching
99
+ - Changed: normalize output to use item helper
100
+ - Changed: remove stash, diff, describe, and init commands
101
+ - Fixed: improve reliability and ux across commands
102
+
103
+ ## [0.0.9] - 2026-02-24
104
+
105
+ - Changed: Pipe AI prompts via stdin instead of passing as shell arguments, removing argument size limits
106
+ - Changed: Increase Claude request timeout from 60s to 120s
107
+ - Added: `--tools ""` flag to Claude CLI calls to disable tool use
108
+ - Changed: Ollama prompt now piped through `jq -Rs` and `curl -d @-` instead of inline JSON argument
109
+ - Fixed: Changelog file path now resolved relative to repo root instead of current working directory
110
+ - Changed: `prompt_changelog` now receives full diff as primary input alongside commit log
111
+ - Changed: Changelog prompt format changed from Keep a Changelog sections to flat prefixed lines (`Added:`, `Changed:`, `Fixed:`, `Removed:`)
112
+ - Changed: `prompt_commit` now counts and reports number of changed files in the prompt
113
+ - Changed: Commit message rules updated to require prose body (semicolon-separated) instead of bullet points, with example included
114
+ - Changed: Release squash now stages all changes with `git add -A` instead of only staging the changelog file
115
+ - Added: Integration test verifying release creates a tag and includes changelog in the commit
116
+ - Added: Integration test verifying release squashes multiple commits into one since the last tag
117
+ - Removed: Directory structure section from README
118
+ - Changed: README description, examples, and command reference updated for clarity
119
+
120
+ ## [0.0.8] - 2026-02-21
121
+
122
+ ### Changed
123
+ - Consolidated v0.0.5 changes into main development branch
124
+
125
+ ## [0.0.7] - 2026-02-21
126
+
127
+ ### Changed
128
+ - Release process no longer pushes unrelated tags
129
+
130
+ ## [0.0.6] - 2026-02-21
131
+
132
+ ### Changed
133
+ - Simplified version calculation and fallback logic
134
+
135
+ ## [0.0.5] - 2026-02-21
136
+
137
+ ### Added
138
+ - Gum spinners for improved UX during operations
139
+
140
+ ### Changed
141
+ - Command names aligned with actual behavior
142
+ - Version accuracy and tag conflict prevention
143
+
144
+ ## [0.0.4] - 2026-02-17
145
+
146
+ ### Changed
147
+ - Use `--force-with-lease` for squashed commits to preserve history integrity
148
+
149
+ ## [0.0.3] - 2026-02-17
150
+
151
+ ### Added
152
+ - Daily workflow commands and analysis tools to the command set
153
+
154
+ ## [0.0.2] - 2026-02-07
155
+
156
+ ### Changed
157
+ - Improved user experience with consistent output formatting and clearer hints
158
+
159
+ ## [0.0.1] - 2026-02-07
160
+
161
+ ### Added
162
+ - AI-powered git commands functionality
163
+
164
+ ### Changed
165
+ - Refactored user input prompts for improved clarity and safety
imp_git-0.0.26/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Anders
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,226 @@
1
+ Metadata-Version: 2.4
2
+ Name: imp-git
3
+ Version: 0.0.26
4
+ Summary: AI-powered git workflow CLI
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Requires-Python: >=3.10
8
+ Requires-Dist: questionary>=2.0.0
9
+ Requires-Dist: rich>=13.0.0
10
+ Requires-Dist: typer>=0.15.0
11
+ Provides-Extra: dev
12
+ Requires-Dist: pytest>=8.0; extra == 'dev'
13
+ Requires-Dist: ruff; extra == 'dev'
14
+ Description-Content-Type: text/markdown
15
+
16
+ <p align="center">
17
+ <img src="logo.png" alt="imp" width="200">
18
+ </p>
19
+
20
+ <p align="center">
21
+ AI-powered git workflow.<br>
22
+ Commit, branch, review, and release without writing commit messages, branch names, or PR descriptions.
23
+ </p>
24
+
25
+ <p align="center">
26
+ <a href="#install">Install</a> &middot;
27
+ <a href="#quick-start">Quick Start</a> &middot;
28
+ <a href="#commands">Commands</a> &middot;
29
+ <a href="#configuration">Configuration</a> &middot;
30
+ <a href="#license">License</a>
31
+ </p>
32
+
33
+ ---
34
+
35
+ ```bash
36
+ imp commit -a # stages everything, generates message, commits
37
+ imp branch "auth" # creates feat/user-auth
38
+ imp review # AI code review of your changes
39
+ imp release # squash, changelog, tag, push
40
+ ```
41
+
42
+ ## Why
43
+
44
+ AI agents can run git for you, but they improvise every time. Imp is opinionated: same format, same workflow, same result, every time.
45
+
46
+ - **Consistent commits** across your whole team, validated against [Conventional Commits](https://www.conventionalcommits.org/) before anything touches git
47
+ - **One-command releases** that squash, changelog, tag, and push with automatic rollback on failure
48
+ - **Fast and deterministic.** One command, not a conversation. No reasoning, no retries, no surprises.
49
+ - **AI writes the words, Imp controls the workflow.** What gets staged, how it's validated, when it's safe to push.
50
+ - **Works offline** with local models via Ollama. No API key required.
51
+
52
+ ## Install
53
+
54
+ ```bash
55
+ uv tool install git+https://github.com/anders458/imp.git
56
+ ```
57
+
58
+ Or with pip:
59
+
60
+ ```bash
61
+ pip install git+https://github.com/anders458/imp.git
62
+ ```
63
+
64
+ Then set up your AI provider and verify:
65
+
66
+ ```bash
67
+ imp config
68
+ imp doctor
69
+ ```
70
+
71
+ ## Quick Start
72
+
73
+ ```bash
74
+ # Make some changes, then commit with an AI message
75
+ imp commit -a
76
+ # -> "feat: add rate limiting to API endpoints"
77
+ # -> Use this message? [Yes / Edit / No]
78
+
79
+ # Branch from a description
80
+ imp branch "add user authentication"
81
+ # -> Suggested: feat/user-auth
82
+ # -> Create branch? [Yes / No]
83
+
84
+ # Branch from a GitHub issue
85
+ imp fix 42
86
+ # -> Fetches issue, suggests fix/login-redirect-42
87
+
88
+ # Ship a release
89
+ imp release
90
+ # -> Version bump: patch / minor / major
91
+ # -> Generates changelog, squashes, tags, pushes
92
+ ```
93
+
94
+ ## Commands
95
+
96
+ ### Daily Workflow
97
+
98
+ | Command | Description |
99
+ |---|---|
100
+ | `imp commit [-a]` | Generate commit message from diff. `-a` stages all. |
101
+ | `imp amend` | Rewrite last commit message from the full diff. |
102
+ | `imp undo [N]` | Undo last N commits, keep changes staged. |
103
+ | `imp revert [hash]` | Safely revert a pushed commit. |
104
+ | `imp push` | Push commits to origin. Sets upstream on first push. |
105
+ | `imp sync` | Pull, rebase, push in one step. |
106
+ | `imp resolve` | AI-assisted merge conflict resolution. |
107
+
108
+ ### Branching
109
+
110
+ | Command | Description |
111
+ |---|---|
112
+ | `imp branch <desc>` | Create branch from plain English description. |
113
+ | `imp branch` | Interactive branch switcher. |
114
+ | `imp fix <issue>` | Create branch from GitHub issue number. |
115
+ | `imp pr` | Create pull request with AI title and body. |
116
+ | `imp done [target]` | Merge feature branch, clean up local and remote. |
117
+
118
+ ### Analysis
119
+
120
+ | Command | Description |
121
+ |---|---|
122
+ | `imp review` | AI code review of staged or unstaged changes. |
123
+ | `imp split` | Group dirty files into logical commits via AI. |
124
+ | `imp status` | Repo overview: branch, changes, sync state. |
125
+ | `imp log [-n N]` | Pretty commit graph. |
126
+
127
+ ### Release
128
+
129
+ | Command | Description |
130
+ |---|---|
131
+ | `imp release` | Squash commits, generate changelog, tag, push, create GitHub release. |
132
+ | `imp ship [level]` | Commit all + release in one shot, no prompts. Default: patch. |
133
+
134
+ ### Setup
135
+
136
+ | Command | Description |
137
+ |---|---|
138
+ | `imp config` | Interactive AI provider and model setup. |
139
+ | `imp doctor` | Verify tools, config, and AI connection. |
140
+ | `imp clean` | Delete merged branches (local and remote). |
141
+ | `imp help` | Show workflow guide and commit format reference. |
142
+
143
+ Any AI command accepts `--whisper` / `-w` to hint the AI without overriding its rules:
144
+
145
+ ```bash
146
+ imp commit -a -w "use IMP-42 as ticket"
147
+ imp review -w "focus on error handling"
148
+ ```
149
+
150
+ ## Workflows
151
+
152
+ | Flow | Steps |
153
+ |---|---|
154
+ | **Solo** | `commit -a` → `push` → `release` |
155
+ | **Feature branch** | `branch` → `commit -a` → `pr` → `done` |
156
+ | **Hotfix** | `fix 42` → `commit -a` → `pr` → `done` |
157
+ | **Merge conflict** | `sync` or `done` → `resolve` → continue |
158
+
159
+ ## Commit Format
160
+
161
+ Imp generates [Conventional Commits](https://www.conventionalcommits.org/) messages, validated before use.
162
+
163
+ ```
164
+ type: message feat, fix, refactor, build, chore,
165
+ type(scope): message docs, test, style, perf, ci
166
+ type!: message (breaking change)
167
+ ```
168
+
169
+ 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`.
170
+
171
+ ## Configuration
172
+
173
+ ```bash
174
+ imp config
175
+ ```
176
+
177
+ Interactive menu to set your AI provider and models. Stored in `~/.config/imp/config.json`.
178
+
179
+ | Setting | Default | Description |
180
+ |---|---|---|
181
+ | `provider` | `claude` | AI provider: `claude` or `ollama` |
182
+ | `model:fast` | `haiku` | Model for quick tasks (commit, branch) |
183
+ | `model:smart` | `sonnet` | Model for complex tasks (review, PR, split) |
184
+
185
+ Environment variables (`IMP_AI_PROVIDER`, `IMP_AI_MODEL_FAST`, `IMP_AI_MODEL_SMART`) override the config file when set, useful for CI.
186
+
187
+ ## Requirements
188
+
189
+ - Python 3.10+
190
+ - git
191
+ - [gh](https://cli.github.com) (optional, for `imp fix`, `imp pr`, `imp release`)
192
+
193
+ ### Claude Code (default)
194
+
195
+ Imp uses [Claude Code](https://docs.anthropic.com/en/docs/claude-code) as its default AI provider. You need an active Claude Code subscription.
196
+
197
+ ```bash
198
+ curl -fsSL https://claude.ai/install.sh | bash
199
+ claude # authenticate
200
+ imp doctor # verify
201
+ ```
202
+
203
+ ### Ollama (local, free)
204
+
205
+ For fully offline usage with no API key:
206
+
207
+ ```bash
208
+ # Install from https://ollama.com, then:
209
+ ollama pull llama3.2
210
+ imp config # select ollama and your models
211
+ imp doctor # verify
212
+ ```
213
+
214
+ ## Development
215
+
216
+ ```bash
217
+ git clone https://github.com/anders458/imp.git
218
+ cd imp
219
+ pip install -e ".[dev]"
220
+ pytest -v
221
+ ruff check src/ tests/
222
+ ```
223
+
224
+ ## License
225
+
226
+ [MIT](LICENSE)
@@ -0,0 +1,211 @@
1
+ <p align="center">
2
+ <img src="logo.png" alt="imp" width="200">
3
+ </p>
4
+
5
+ <p align="center">
6
+ AI-powered git workflow.<br>
7
+ Commit, branch, review, and release without writing commit messages, branch names, or PR descriptions.
8
+ </p>
9
+
10
+ <p align="center">
11
+ <a href="#install">Install</a> &middot;
12
+ <a href="#quick-start">Quick Start</a> &middot;
13
+ <a href="#commands">Commands</a> &middot;
14
+ <a href="#configuration">Configuration</a> &middot;
15
+ <a href="#license">License</a>
16
+ </p>
17
+
18
+ ---
19
+
20
+ ```bash
21
+ imp commit -a # stages everything, generates message, commits
22
+ imp branch "auth" # creates feat/user-auth
23
+ imp review # AI code review of your changes
24
+ imp release # squash, changelog, tag, push
25
+ ```
26
+
27
+ ## Why
28
+
29
+ AI agents can run git for you, but they improvise every time. Imp is opinionated: same format, same workflow, same result, every time.
30
+
31
+ - **Consistent commits** across your whole team, validated against [Conventional Commits](https://www.conventionalcommits.org/) before anything touches git
32
+ - **One-command releases** that squash, changelog, tag, and push with automatic rollback on failure
33
+ - **Fast and deterministic.** One command, not a conversation. No reasoning, no retries, no surprises.
34
+ - **AI writes the words, Imp controls the workflow.** What gets staged, how it's validated, when it's safe to push.
35
+ - **Works offline** with local models via Ollama. No API key required.
36
+
37
+ ## Install
38
+
39
+ ```bash
40
+ uv tool install git+https://github.com/anders458/imp.git
41
+ ```
42
+
43
+ Or with pip:
44
+
45
+ ```bash
46
+ pip install git+https://github.com/anders458/imp.git
47
+ ```
48
+
49
+ Then set up your AI provider and verify:
50
+
51
+ ```bash
52
+ imp config
53
+ imp doctor
54
+ ```
55
+
56
+ ## Quick Start
57
+
58
+ ```bash
59
+ # Make some changes, then commit with an AI message
60
+ imp commit -a
61
+ # -> "feat: add rate limiting to API endpoints"
62
+ # -> Use this message? [Yes / Edit / No]
63
+
64
+ # Branch from a description
65
+ imp branch "add user authentication"
66
+ # -> Suggested: feat/user-auth
67
+ # -> Create branch? [Yes / No]
68
+
69
+ # Branch from a GitHub issue
70
+ imp fix 42
71
+ # -> Fetches issue, suggests fix/login-redirect-42
72
+
73
+ # Ship a release
74
+ imp release
75
+ # -> Version bump: patch / minor / major
76
+ # -> Generates changelog, squashes, tags, pushes
77
+ ```
78
+
79
+ ## Commands
80
+
81
+ ### Daily Workflow
82
+
83
+ | Command | Description |
84
+ |---|---|
85
+ | `imp commit [-a]` | Generate commit message from diff. `-a` stages all. |
86
+ | `imp amend` | Rewrite last commit message from the full diff. |
87
+ | `imp undo [N]` | Undo last N commits, keep changes staged. |
88
+ | `imp revert [hash]` | Safely revert a pushed commit. |
89
+ | `imp push` | Push commits to origin. Sets upstream on first push. |
90
+ | `imp sync` | Pull, rebase, push in one step. |
91
+ | `imp resolve` | AI-assisted merge conflict resolution. |
92
+
93
+ ### Branching
94
+
95
+ | Command | Description |
96
+ |---|---|
97
+ | `imp branch <desc>` | Create branch from plain English description. |
98
+ | `imp branch` | Interactive branch switcher. |
99
+ | `imp fix <issue>` | Create branch from GitHub issue number. |
100
+ | `imp pr` | Create pull request with AI title and body. |
101
+ | `imp done [target]` | Merge feature branch, clean up local and remote. |
102
+
103
+ ### Analysis
104
+
105
+ | Command | Description |
106
+ |---|---|
107
+ | `imp review` | AI code review of staged or unstaged changes. |
108
+ | `imp split` | Group dirty files into logical commits via AI. |
109
+ | `imp status` | Repo overview: branch, changes, sync state. |
110
+ | `imp log [-n N]` | Pretty commit graph. |
111
+
112
+ ### Release
113
+
114
+ | Command | Description |
115
+ |---|---|
116
+ | `imp release` | Squash commits, generate changelog, tag, push, create GitHub release. |
117
+ | `imp ship [level]` | Commit all + release in one shot, no prompts. Default: patch. |
118
+
119
+ ### Setup
120
+
121
+ | Command | Description |
122
+ |---|---|
123
+ | `imp config` | Interactive AI provider and model setup. |
124
+ | `imp doctor` | Verify tools, config, and AI connection. |
125
+ | `imp clean` | Delete merged branches (local and remote). |
126
+ | `imp help` | Show workflow guide and commit format reference. |
127
+
128
+ Any AI command accepts `--whisper` / `-w` to hint the AI without overriding its rules:
129
+
130
+ ```bash
131
+ imp commit -a -w "use IMP-42 as ticket"
132
+ imp review -w "focus on error handling"
133
+ ```
134
+
135
+ ## Workflows
136
+
137
+ | Flow | Steps |
138
+ |---|---|
139
+ | **Solo** | `commit -a` → `push` → `release` |
140
+ | **Feature branch** | `branch` → `commit -a` → `pr` → `done` |
141
+ | **Hotfix** | `fix 42` → `commit -a` → `pr` → `done` |
142
+ | **Merge conflict** | `sync` or `done` → `resolve` → continue |
143
+
144
+ ## Commit Format
145
+
146
+ Imp generates [Conventional Commits](https://www.conventionalcommits.org/) messages, validated before use.
147
+
148
+ ```
149
+ type: message feat, fix, refactor, build, chore,
150
+ type(scope): message docs, test, style, perf, ci
151
+ type!: message (breaking change)
152
+ ```
153
+
154
+ 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`.
155
+
156
+ ## Configuration
157
+
158
+ ```bash
159
+ imp config
160
+ ```
161
+
162
+ Interactive menu to set your AI provider and models. Stored in `~/.config/imp/config.json`.
163
+
164
+ | Setting | Default | Description |
165
+ |---|---|---|
166
+ | `provider` | `claude` | AI provider: `claude` or `ollama` |
167
+ | `model:fast` | `haiku` | Model for quick tasks (commit, branch) |
168
+ | `model:smart` | `sonnet` | Model for complex tasks (review, PR, split) |
169
+
170
+ Environment variables (`IMP_AI_PROVIDER`, `IMP_AI_MODEL_FAST`, `IMP_AI_MODEL_SMART`) override the config file when set, useful for CI.
171
+
172
+ ## Requirements
173
+
174
+ - Python 3.10+
175
+ - git
176
+ - [gh](https://cli.github.com) (optional, for `imp fix`, `imp pr`, `imp release`)
177
+
178
+ ### Claude Code (default)
179
+
180
+ Imp uses [Claude Code](https://docs.anthropic.com/en/docs/claude-code) as its default AI provider. You need an active Claude Code subscription.
181
+
182
+ ```bash
183
+ curl -fsSL https://claude.ai/install.sh | bash
184
+ claude # authenticate
185
+ imp doctor # verify
186
+ ```
187
+
188
+ ### Ollama (local, free)
189
+
190
+ For fully offline usage with no API key:
191
+
192
+ ```bash
193
+ # Install from https://ollama.com, then:
194
+ ollama pull llama3.2
195
+ imp config # select ollama and your models
196
+ imp doctor # verify
197
+ ```
198
+
199
+ ## Development
200
+
201
+ ```bash
202
+ git clone https://github.com/anders458/imp.git
203
+ cd imp
204
+ pip install -e ".[dev]"
205
+ pytest -v
206
+ ruff check src/ tests/
207
+ ```
208
+
209
+ ## License
210
+
211
+ [MIT](LICENSE)
Binary file