Toolbelt CLI
The screenshot above demonstrates live execution of Toolbelt CLI in Windows Terminal:
toolbelt --help: Rich command overview, argument formatting, and shell completion options.toolbelt version: Fast local package version readout and automated PyPI release checking.toolbelt audit .: 10-point repository quality audit checking README sections, license files,.gitignoreentries, test directories, and CI workflows.
Opinionated Developer Productivity CLI: Multi-Language Scaffolding, AI Git Commits, and Repository Auditing.
Table of Contents
- Overview
- Installation
- Command Reference
- Feature Tour & Usage Examples
- Configuration & Environment Variables
- Architecture & Tech Stack
- Development & Testing
- GitHub Setup & Publication Guide
- Publishing to PyPI
- Contributing
- License
Overview
Toolbelt CLI (toolbelt) is a command-line tool built with Python 3.11+, Typer, Rich, and Jinja2 that automates repetitive developer workflows:
- 🚀 Scaffold New Projects (
toolbelt new): Instantly generate clean, production-ready project templates for Python, Node.js / TypeScript, and Java with pre-configured linters, test harnesses, CI pipelines, and Dockerfiles. - 🤖 AI-Powered Commits (
toolbelt commit): Automatically analyze staged git diffs and draft structured Conventional Commit messages using Claude (claude-sonnet-4), with an offline rule-based fallback when no API key is set. - 🔍 Repository Auditing (
toolbelt audit): Scan any codebase for missing documentation sections (Installation,Usage,License), required configuration files (.gitignore,pyproject.toml, test suites, CI workflows), and automatically repair missing files with--fix. - 📦 Version & PyPI Sync (
toolbelt version): Inspect currently installed version and verify release availability against the Python Package Index.
Installation
With pipx (Recommended)
Isolate CLI tools in their own dedicated virtual environments:
pipx install toolbelt-cli
With uv
Fast single-step tool installation:
uv tool install toolbelt-cli
With standard pip
pip install toolbelt-cli
Local Development Installation
git clone https://github.com/crnjihia/toolbelt-cli.git
cd toolbelt-cli
pip install -e ".[dev]"
Command Reference
| Command | Arguments | Flags | Description |
|---|---|---|---|
toolbelt new |
<type> <name> |
--author, --license, --ci/--no-ci, --docker/--no-docker, -y/--yes |
Scaffold an opinionated Python, Node, or Java project. |
toolbelt commit |
(none) | --dry-run, -t/--type, -s/--scope, -y/--yes |
Inspect staged diff and generate Conventional Commit message. |
toolbelt audit |
[path=.] |
--json, --fix |
Run 10-point repository audit with Rich table or JSON output. |
toolbelt version |
(none) | (none) | Display installed version and check PyPI for updates. |
toolbelt --help |
(none) | (none) | Show global options and available commands. |
Feature Tour
1. toolbelt new <type> <name>
Scaffolds a new project directory with interactive prompts powered by Typer and Rich:
toolbelt new python my_service
Author name [Jane Doe]: Jane Doe
License (MIT | Apache-2.0 | none) [MIT]: MIT
Include CI? (y/n) [True]: y
Include Docker? (y/n) [False]: y
┌──────────────────────────── 🎉 Toolbelt Scaffold ────────────────────────────┐
│ ✨ Project successfully scaffolded! │
│ │
│ Next steps: │
│ cd my_service && make install && make test │
└─────────────────────────────────────────────────────────────────────────────┘
Supported Stacks & Project Layouts
-
Python (
toolbelt new python <name>):src/<name>/__init__.py,main.pytests/test_main.pypyproject.toml(configured with Ruff, MyPy, and Pytest).pre-commit-config.yamlMakefile(install,test,lint,format,clean)README.md,.gitignore,LICENSE.github/workflows/ci.yml(optional)Dockerfile(optional)
-
Node.js / TypeScript (
toolbelt new node <name>):package.json(TypeScript, ESLint, Prettier, Vitest)tsconfig.jsonsrc/index.ts,src/index.test.ts.eslintrc.json,.prettierrcREADME.md,.gitignore,LICENSE
-
Java (
toolbelt new java <name>):pom.xml(Maven, JUnit 5 Jupiter, compiler plugins)src/main/java/com/<name>/App.javasrc/test/java/com/<name>/AppTest.javaREADME.md,.gitignore,LICENSE
2. toolbelt commit
Reads your staged git diff (git diff --staged) and drafts a Conventional Commit message:
git add src/
toolbelt commit
┌────────────────────────── Proposed Commit Message ──────────────────────────┐
│ feat(auth): add bearer token validator and refresh middleware │
└─────────────────────────────────────────────────────────────────────────────┘
Apply commit? [y/n/edit] (y): y
✅ Commit created successfully!
- Claude Sonnet 4 Integration: Export your Anthropic API key (
export ANTHROPIC_API_KEY="sk-ant-...") for contextual messages following standard types:feat,fix,docs,style,refactor,test,chore. - Smart Fallback: If no key is set, Toolbelt falls back to an offline heuristic analyzer that inspects diff sizes, lines added/removed, and modified file types.
- Dry-run Mode: Preview generated messages without applying commits using
toolbelt commit --dry-run. - Safety: Rejects any commit message shorter than 10 characters and offers interactive
[y/n/edit]revision.
3. toolbelt audit [path]
Performs a structured quality check on any repository:
toolbelt audit .
Repository Audit: Toolbelt-CLI
┌────────────────────────────┬──────────┬──────────────────────────┐
│ Check │ Status │ Details │
├────────────────────────────┼──────────┼──────────────────────────┤
│ README.md exists │ ✅ │ 227 lines │
│ README has Install │ ✅ │ found "## Installation" │
│ README has Usage │ ✅ │ found "## Usage" │
│ README has License │ ✅ │ found "## License" │
│ LICENSE file │ ✅ │ MIT │
│ .gitignore exists │ ✅ │ 29 entries │
│ .gitignore has __pycache__ │ ✅ │ │
│ Tests directory │ ✅ │ tests/ found │
│ CI config │ ✅ │ .github/workflows/ci.yml │
│ pyproject.toml │ ✅ │ │
└────────────────────────────┴──────────┴──────────────────────────┘
- Exit Code: Returns
0if all checks pass, and1if any check fails (ready for pre-commit hooks and CI gates). - Auto-Fix (
--fix): Automatically prompts to create missing.gitignorefiles andLICENSEfiles (MIT or Apache-2.0). - JSON Mode (
--json): Outputs machine-readable JSON for integration into reporting tools or CI/CD pipelines.
4. toolbelt version
Displays installed package version and checks whether updates are available on PyPI:
toolbelt version
Configuration & Environment Variables
Copy .env.example to .env to configure your environment:
# Optional: Set Claude API key for AI-assisted git commit message generation
ANTHROPIC_API_KEY=sk-ant-api03-...
# Optional: Set debug logging
LOG_LEVEL=INFO
Architecture & Tech Stack
toolbelt-cli/
├── src/toolbelt/
│ ├── cli.py # Typer application definition and routing
│ ├── commands/ # Subcommand handlers (new, commit, audit, version)
│ ├── services/ # Scaffolder, LLM Commit Generator, and Auditor
│ ├── templates/ # Jinja2 project templates (python, node, java)
│ └── utils/ # Git interface, Rich console helpers
├── tests/ # Full offline pytest test suite with CliRunner
└── .github/workflows/ # CI matrix & PyPI Trusted Publishing release
- CLI Framework: Typer
- Terminal UI: Rich
- Templating: Jinja2
- HTTP Client: HTTPX
- LLM Integration: Anthropic Python SDK
- Quality: Ruff & MyPy
- Testing: Pytest &
CliRunner
Development & Testing
Run the automated test suite locally:
# Run unit and integration tests (100% offline)
pytest -v
# Check linting and style
ruff check .
ruff format --check .
# Run static type analysis
mypy src
GitHub Setup & Publication Guide
Follow these steps to publish this repository to your personal or organization GitHub account:
1. Initialize & Link GitHub Remote
Create a new repository named toolbelt-cli on GitHub (leave "Initialize with README" unchecked). Then connect your local repository:
# Add your GitHub remote
git remote add origin https://github.com/crnjihia/toolbelt-cli.git
# Ensure default branch is main
git branch -M main
# Push code, tags, and complete history to GitHub
git push -u origin main
2. Configure PyPI Trusted Publishing (OIDC)
Toolbelt CLI uses GitHub Actions Trusted Publishing (OIDC) so no API tokens or passwords need to be saved in repository secrets:
- Log into your PyPI account.
- Navigate to Account settings → Publishing → Add a GitHub publisher.
- Set:
- PyPI Project Name:
toolbelt-cli - Owner:
crnjihia - Repository name:
toolbelt-cli - Workflow name:
release.yml - Environment name:
pypi
- PyPI Project Name:
- In your GitHub repository, ensure the
pypienvironment is enabled under Settings → Environments. - When ready to release, simply tag and push:
git tag v0.1.0 git push origin v0.1.0
GitHub Actions will automatically build source distributions and wheels, runtwine check, and publish to PyPI!
3. Continuous Integration Checks
On every push and pull request, .github/workflows/ci.yml automatically executes:
- Matrix testing across Python 3.11 and 3.12.
- Fast code hygiene validation via
ruff check .. - Code format verification via
ruff format --check .. - Static type analysis via
mypy src. - Complete test suite execution via
pytest -v(19 offline tests with 100% pass guarantee).
Publishing to PyPI
This project is configured with GitHub Actions Trusted Publishing using OpenID Connect (OIDC). No long-lived API tokens are stored in repository secrets.
To release a new version:
- Bump the version in
pyproject.tomlandsrc/toolbelt/__init__.py. - Update
CHANGELOG.md. - Create and push a git tag:
git tag v0.1.0 git push origin v0.1.0
- The
.github/workflows/release.ymlworkflow will automatically build wheels and sdist distributions and publish them directly to PyPI.
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository on GitHub.
- Create a feature branch:
git checkout -b feat/my-new-feature - Ensure all tests and linters pass:
pytest && ruff check . && mypy src - Commit your changes using conventional commits:
git commit -m "feat(scope): describe change" - Open a Pull Request.
License
Distributed under the MIT License.
Metadata
Release files for toolbelt-cli 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| toolbelt_cli-0.2.0.tar.gz | 168.3 kB | With provenance | Details for toolbelt_cli-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| toolbelt_cli-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for toolbelt_cli-0.2.0-py3-none-any.whl |
Total release size: 201.5 kB
Release files / toolbelt_cli-0.2.0.tar.gz
| Download URL | toolbelt_cli-0.2.0.tar.gz |
|---|---|
| Size | 168.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a434d572a5c16cd1d1d08c45464ba69f1d7fb6ca00a0b7e1b349976993dccb7c
|
|
BLAKE2b-256 checksum How to use checksums |
cf339bd2679e8db855982d2580d57ec6fdabfe007a933282006e01963a166635
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logRelease files / toolbelt_cli-0.2.0-py3-none-any.whl
| Download URL | toolbelt_cli-0.2.0-py3-none-any.whl |
|---|---|
| Size | 33.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b98ccd4ce10df9886bc419da74810cdc82d14e48e0594a3b749783516fffc4a6
|
|
BLAKE2b-256 checksum How to use checksums |
7f82f43a5486465b226764cd0e30f858a68c302ee0ab6b051e3c4359c44c1f63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logSecurity for toolbelt-cli 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for toolbelt_cli-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.