Skip to main content

Python CLI for optimizing git workflows and Claude Code integration

Project description

gitwise

English | Español

Python CLI for optimized Git workflows and coding agents integration.

CI Coverage Version License: MIT Python 3.10+ Docs: EN/ES

gitwise addresses three daily pain points:

  1. AI context bloat from raw git diff
  2. Slow repositories without modern Git maintenance settings
  3. Unsafe commit flows that bypass GPG signing rules

Requirements

  • Python >= 3.10
  • git >= 2.29
  • macOS or Linux

Install

git clone https://github.com/drzioner/gitwise.git ~/.local/share/gitwise
bash ~/.local/share/gitwise/install.sh

Update an existing installation:

gitwise update

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)
gitwise pr List/check/view PRs via GitHub CLI

For all commands, examples, aliases, and JSON usage, see:

Documentation

GPG and Safety Model

setup and setup-agents never modify commit.gpgsign or user.signingkey.

  • Git layer: setup manages 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
GITWISE_BIN_DIR Install location (default: ~/.local/bin)

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

Demo

asciicast

License

MIT - Deiner

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

gitwise_cli-0.24.2.tar.gz (140.6 kB view details)

Uploaded Source

Built Distribution

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

gitwise_cli-0.24.2-py3-none-any.whl (151.7 kB view details)

Uploaded Python 3

File details

Details for the file gitwise_cli-0.24.2.tar.gz.

File metadata

  • Download URL: gitwise_cli-0.24.2.tar.gz
  • Upload date:
  • Size: 140.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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

Hashes for gitwise_cli-0.24.2.tar.gz
Algorithm Hash digest
SHA256 22fef1c7983685ca3d673cf9c7d6ad7e12f39c86dae706c1241f3c00e1faf97d
MD5 bcdfc40f74e2a1a4d4a629bcabcb8587
BLAKE2b-256 274382babbae4c3cccd53346b31d69691d75d1e2682c97bbdd149ac40cbb7b92

See more details on using hashes here.

File details

Details for the file gitwise_cli-0.24.2-py3-none-any.whl.

File metadata

  • Download URL: gitwise_cli-0.24.2-py3-none-any.whl
  • Upload date:
  • Size: 151.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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

Hashes for gitwise_cli-0.24.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6f6a4d98e741672c844fb74503a745ffda520903e76a8ceb36ac84d6f6f7e3ee
MD5 1a1fc835ed97de27c5ef200eac155229
BLAKE2b-256 38e3364c200b0ad17b6c962b5d1581a5954298a4342d3beabdcd26a4a84f79fa

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