@@ -13,14 +13,13 @@ Classifier: Intended Audience :: Developers
1313Classifier: License :: OSI Approved :: MIT License
1414Classifier: Operating System :: POSIX :: Linux
1515Classifier: Programming Language :: Python :: 3
16- Classifier: Programming Language :: Python :: 3.8
1716Classifier: Programming Language :: Python :: 3.9
1817Classifier: Programming Language :: Python :: 3.10
1918Classifier: Programming Language :: Python :: 3.11
2019Classifier: Programming Language :: Python :: 3.12
2120Classifier: Topic :: Software Development :: Version Control :: Git
2221Classifier: Topic :: Utilities
23- Requires-Python: >=3.8
22+ Requires-Python: >=3.9
2423Description-Content-Type: text/markdown
2524Requires-Dist: requests>=2.25.0
2625Requires-Dist: tiktoken>=0.5.0
@@ -147,13 +146,87 @@ ab util <command> # General utilities
147146# Root commands:
148147ab prompt # Send context to LLM (OpenRouter)
149148ab config # Manage configuration
149+ ab models # List available LLM models
150150ab help # Show help
151151```
152152
153+ ### Git Commands (`ab git`)
154+
155+ | Command | Description |
156+ |---------|-------------|
157+ | `auto-commit` | Generate commit messages via LLM |
158+ | `branch-name` | Generate branch name from task description |
159+ | `changelog` | Generate changelog from commits |
160+ | `pr-description` | Generate PR title/description via LLM |
161+ | `resolve-conflict` | Resolve merge conflicts via LLM |
162+ | `rewrite-history` | Rewrite commit messages via LLM |
163+
164+ ### Utility Commands (`ab util`)
165+
166+ | Command | Description |
167+ |---------|-------------|
168+ | `explain` | Explain code, errors, or concepts via LLM |
169+ | `gen-script` | Generate scripts from natural language |
170+ | `passgenerator` | Secure password generator |
171+
153172---
154173
155174## Commands
156175
176+ ### ab models
177+
178+ List and explore available LLM models from OpenRouter API.
179+
180+ ```bash
181+ ab models [COMMAND] [OPTIONS]
182+ ```
183+
184+ #### Commands
185+
186+ | Command | Description |
187+ |---------|-------------|
188+ | `list` | List available models (default) |
189+ | `info <model-id>` | Show detailed model information |
190+
191+ #### List Options
192+
193+ | Option | Description |
194+ |--------|-------------|
195+ | `--free` | Show only free models |
196+ | `--search TEXT` | Search by name/description |
197+ | `--context-min N` | Minimum context length |
198+ | `--modality TYPE` | Filter by modality (text, image, audio, video) |
199+ | `--sort FIELD` | Sort by: name, context, price |
200+ | `--limit N` | Limit results (default: 50) |
201+ | `--json` | Output as JSON |
202+
203+ #### Examples
204+
205+ ```bash
206+ # List all models
207+ ab models
208+
209+ # Show only free models
210+ ab models list --free
211+
212+ # Search for Claude models
213+ ab models list --search claude
214+
215+ # Models with 128k+ context
216+ ab models list --context-min 128000
217+
218+ # Vision models sorted by price
219+ ab models list --modality image --sort price
220+
221+ # Get details for specific model
222+ ab models info openai/gpt-4o
223+
224+ # Output as JSON
225+ ab models list --json
226+ ```
227+
228+ ---
229+
157230### ab prompt
158231
159232Send files and prompts to LLMs via OpenRouter API.
@@ -252,6 +325,8 @@ The tool searches for `.aiignore` files from the current directory up to the git
252325
253326Generate commit messages automatically by analyzing staged changes.
254327
328+ **Protected branch detection**: When on `master` or `main`, auto-commit will suggest creating a feature branch before committing.
329+
255330```bash
256331ab git auto-commit [OPTIONS]
257332```
@@ -272,6 +347,71 @@ ab git auto-commit -a -y
272347
273348---
274349
350+ ### ab git branch-name
351+
352+ Generate branch names from task descriptions using LLM.
353+
354+ ```bash
355+ ab git branch-name [OPTIONS] "description"
356+ ```
357+
358+ | Option | Description |
359+ |--------|-------------|
360+ | `-c` | Create and checkout the branch |
361+ | `-p PREFIX` | Force a specific prefix (feature, fix, chore, etc.) |
362+ | `-y` | Skip confirmation when creating |
363+ | `-l LANG` | Output language (default: `en`) |
364+
365+ ```bash
366+ # Suggest branch name
367+ ab git branch-name "fix login bug"
368+ # Output: fix/login-bug
369+
370+ # Create and checkout
371+ ab git branch-name -c "add user authentication"
372+
373+ # Force prefix
374+ ab git branch-name --prefix fix "button alignment"
375+ # Output: fix/button-alignment
376+
377+ # With JIRA ticket
378+ ab git branch-name "JIRA-123: implement payment gateway"
379+ # Output: feature/JIRA-123-implement-payment
380+ ```
381+
382+ ---
383+
384+ ### ab git changelog
385+
386+ Generate changelog/release notes from commits using LLM.
387+
388+ ```bash
389+ ab git changelog [OPTIONS] [RANGE]
390+ ```
391+
392+ | Option | Description |
393+ |--------|-------------|
394+ | `-f FORMAT` | Output format: `markdown`, `plain`, `json` |
395+ | `-c` | Group commits by type (feat/fix/chore) |
396+ | `-o FILE` | Write output to file |
397+ | `-l LANG` | Output language (default: `en`) |
398+
399+ ```bash
400+ # Since last tag to HEAD
401+ ab git changelog
402+
403+ # Between two tags
404+ ab git changelog v1.0.0..v2.0.0
405+
406+ # Last 10 commits in JSON
407+ ab git changelog HEAD~10..HEAD -f json
408+
409+ # Write to file with categories
410+ ab git changelog -c -o CHANGELOG.md
411+ ```
412+
413+ ---
414+
275415### ab git pr-description
276416
277417Generate pull request title and description by analyzing commits and diff.
@@ -355,6 +495,129 @@ ab git rewrite-history --smart
355495
356496---
357497
498+ ### ab git resolve-conflict
499+
500+ Analyze and resolve merge conflicts using LLM.
501+
502+ ```bash
503+ ab git resolve-conflict [OPTIONS] [FILE]
504+ ```
505+
506+ | Option | Description |
507+ |--------|-------------|
508+ | `-y` | Auto-apply resolutions without confirmation |
509+ | `--dry-run` | Preview resolutions without applying |
510+ | `-l LANG` | Output language (default: `en`) |
511+
512+ ```bash
513+ # Interactive mode for all conflicted files
514+ ab git resolve-conflict
515+
516+ # Resolve specific file
517+ ab git resolve-conflict src/app.py
518+
519+ # Preview suggestions only
520+ ab git resolve-conflict --dry-run
521+
522+ # Auto-apply all resolutions
523+ ab git resolve-conflict -y
524+ ```
525+
526+ **Features:**
527+ - Detects conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`)
528+ - Extracts both versions with surrounding context
529+ - Suggests intelligent merged resolution
530+ - Option to edit manually before applying
531+
532+ ---
533+
534+ ### ab util explain
535+
536+ Explain code, errors, or technical concepts using LLM with automatic context gathering.
537+
538+ ```bash
539+ ab util explain [OPTIONS] [INPUT]
540+ ```
541+
542+ | Option | Description |
543+ |--------|-------------|
544+ | `-c CONCEPT` | Explain a technical concept |
545+ | `--history N` | Include last N lines from bash history |
546+ | `--with-files` | Include directory listing and referenced files |
547+ | `--context-dir PATH` | Directory for context gathering |
548+ | `-v` | Verbose/detailed explanation |
549+ | `-l LANG` | Output language (default: `en`) |
550+
551+ ```bash
552+ # Explain entire file
553+ ab util explain src/app.py
554+
555+ # Explain specific line
556+ ab util explain src/app.py:42
557+
558+ # Explain line range
559+ ab util explain src/app.py:10-50
560+
561+ # Explain error message
562+ ab util explain "error: ECONNREFUSED"
563+
564+ # Explain concept
565+ ab util explain --concept "dependency injection"
566+
567+ # From stdin
568+ echo "stack trace" | ab util explain -
569+
570+ # With bash history context
571+ ab util explain --history 20 "command failed"
572+
573+ # With directory context
574+ ab util explain --with-files "file not found"
575+ ```
576+
577+ ---
578+
579+ ### ab util gen-script
580+
581+ Generate bash/python scripts from natural language descriptions.
582+
583+ **Default behavior**: Generates minimal one-liner commands. Use `--full` for complete scripts with error handling.
584+
585+ ```bash
586+ ab util gen-script [OPTIONS] "description"
587+ ```
588+
589+ | Option | Description |
590+ |--------|-------------|
591+ | `--lang LANG` | Script language: `bash`, `python`, `sh`, `perl`, `ruby`, `node` |
592+ | `--type TYPE` | Script type: `script`, `cron`, `oneshot` (default: oneshot) |
593+ | `--full` | Generate complete script with error handling |
594+ | `-o FILE` | Output file path (auto-enables full mode) |
595+ | `--run` | Execute the generated script immediately |
596+ | `-l LANG` | Output language for comments |
597+
598+ ```bash
599+ # One-liner output (default)
600+ ab util gen-script "list all files larger than 100MB"
601+ # Output: find . -size +100M
602+
603+ # Full script with error handling
604+ ab util gen-script --full "backup database"
605+
606+ # Generate Python one-liner
607+ ab util gen-script --lang python "parse CSV and sum column 3"
608+
609+ # Save to file (auto-full mode)
610+ ab util gen-script -o backup.sh "compress and upload to S3"
611+
612+ # Execute immediately
613+ ab util gen-script --run "show disk usage summary"
614+
615+ # Cron-suitable script
616+ ab util gen-script --type cron "backup database daily"
617+ ```
618+
619+ ---
620+
358621### ab util passgenerator
359622
360623Generate secure passwords with customizable requirements.
0 commit comments