gitwise
Python CLI for optimized Git workflows and coding agents integration.
gitwise addresses three daily pain points:
- AI context bloat from raw
git diff - Slow repositories without modern Git maintenance settings
- Unsafe commit flows that bypass GPG signing rules
Requirements
- Python >= 3.10
- git >= 2.29
- macOS or Linux
Install
Pick one:
Homebrew (macOS/Linux, recommended if you already use Homebrew):
brew install drzioner/tap/gitwise
Update later with brew upgrade gitwise. Uninstall with brew uninstall gitwise.
curl | bash (auto-installs uv if missing, no package manager required):
curl -fsSL https://raw.githubusercontent.com/drzioner/gitwise/main/install.sh | bash
uv (if you already use uv):
uv tool install gitwise-cli
From source (development only):
git clone https://github.com/drzioner/gitwise.git
cd gitwise
uv sync
uv run python -m gitwise doctor
Windows (PowerShell 5.1+, auto-installs uv if missing):
irm https://raw.githubusercontent.com/drzioner/gitwise/main/install.ps1 | iex
For a version-pinned install (e.g. for reproducible setups), see Get-Help .\install.ps1 -Detailed after download.
Update an existing installation:
brew upgrade gitwise # if installed via Homebrew (macOS/Linux)
uv tool upgrade gitwise-cli # if installed via uv (any OS)
# or re-run the curl | bash installer, which always pulls latest
Uninstall:
brew uninstall gitwise # if installed via Homebrew
uv tool uninstall gitwise-cli # if installed via uv (any OS)
Quick Start
gitwise doctor
gitwise setup --dry-run
gitwise setup-agents --local --dry-run
gitwise summarize
Most Used Commands
| Command | Purpose |
|---|---|
gitwise doctor |
Check Python, git, platform, optional tools |
gitwise setup |
Apply modern Git defaults safely |
gitwise setup-agents |
Install canonical agents layout + optional provider config |
gitwise audit |
Detect stale branches, graph/cache gaps, large blobs |
gitwise summarize |
Compact context for humans and AI |
gitwise diff |
Focused changed-file view (--stat, --staged, --patch) |
gitwise worktree |
Create and clean worktree-based branch setups |
gitwise status |
Enhanced status with staged/unstaged and ahead/behind |
gitwise commands --json |
List subcommands with aliases and metadata |
gitwise schema <command> --json |
Return versioned JSON Schema for command inputs |
gitwise completions <shell> |
Generate shell completion scripts (bash/zsh/fish/powershell) |
gitwise pr |
List/check/view PRs via GitHub CLI |
For all commands, examples, aliases, and JSON usage, see:
Documentation
- Documentation index (English)
- Indice de documentacion (Español)
- Contributing guide
- Guia de contribucion
- Security policy
- Politica de seguridad
- Code of Conduct
- Código de conducta
- Git conventions
- Convenciones Git
GPG and Safety Model
setup and setup-agents never modify commit.gpgsign or user.signingkey.
- Git layer:
setupmanages hooks safely (--hooks-mode preserve|native|legacy|skip) to validate signing key availability and conventional commits. - Agent layer: deny-rules block
--no-gpg-sign,--no-verify, and-c commit.gpgsign=false.
Environment Variables
| Variable | Description |
|---|---|
GITWISE_DEBUG=1 |
Print each git subprocess command to stderr |
GITWISE_LOG_JSON=1 |
Emit structured stderr logs as JSON lines |
GITWISE_JSON_PRETTY=1 |
Pretty-print JSON output by default |
GITWISE_LANG=es / GITWISE_LANG=en |
Force output locale |
GITWISE_THEME=dark / GITWISE_THEME=light / GITWISE_THEME=auto |
Override color theme selection |
GITWISE_NO_COLOR=1 |
Disable ANSI color output |
GITWISE_OUTPUT=agent |
Force machine-oriented output mode |
GITWISE_AGENT=1 |
Alias to enable agent output mode |
GITWISE_GIT_TIMEOUT=<seconds> |
Override git subprocess timeout |
GITWISE_WIDTH=<columns> |
Override output width |
Shell Completions
Generate completions script per shell:
gitwise completions bash > ~/.local/share/bash-completion/completions/gitwise
gitwise completions zsh > ~/.zsh/completions/_gitwise
gitwise completions fish > ~/.config/fish/completions/gitwise.fish
PowerShell (Windows / PowerShell Core): generate and dot-source the
Register-ArgumentCompleter script. Add it to your $PROFILE for persistence:
gitwise completions powershell > gitwise.ps1
. .\gitwise.ps1
# or, to load on every session:
Add-Content $PROFILE ('. ' + ((Resolve-Path 'gitwise.ps1').Path))
Completion covers subcommands as the first token and per-command flags
(--json, --dry-run, --max-count, etc.) thereafter.
Demo
License
MIT - Deiner
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitwise_cli-0.35.0.tar.gz.
File metadata
- Download URL: gitwise_cli-0.35.0.tar.gz
- Upload date:
- Size: 208.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c792a55b1d4dfec88c3fdf4c44e01d7f145e543f1d7aa3dfbf70f2994b9c32c7
|
|
| MD5 |
149b007dff9a17d548876125a06bc2a3
|
|
| BLAKE2b-256 |
b4738fa1cf038835341620d68838c5a7a3f59da967edd12c6fea89988d746259
|
File details
Details for the file gitwise_cli-0.35.0-py3-none-any.whl.
File metadata
- Download URL: gitwise_cli-0.35.0-py3-none-any.whl
- Upload date:
- Size: 219.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46e85936c09107a2fe0e978c7a993e582630486400b305d2370e5ef97c5f81eb
|
|
| MD5 |
13066e28bdff4b284ae774adbf56be6f
|
|
| BLAKE2b-256 |
c89a92d313205a25302578544c39c3703b263b431e1d1a11bc5ee77f75eadfbf
|