Metadata-Version: 2.4
Name: gitwise-cli
Version: 0.24.2
Summary: Python CLI for optimizing git workflows and Claude Code integration
Author-email: Deiner <drzioner@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: automation,claude-code,cli,developer-tools,git
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Version Control :: Git
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: rich-argparse<2,>=1.8.0
Requires-Dist: rich<15,>=13.0
Requires-Dist: shtab<2,>=1.8.0
Description-Content-Type: text/markdown

# gitwise

[English](README.md) | [Español](README.es.md)

Python CLI for optimized Git workflows and coding agents integration.

[![CI](https://github.com/drzioner/gitwise/actions/workflows/ci.yml/badge.svg)](https://github.com/drzioner/gitwise/actions/workflows/ci.yml)
[![Coverage](https://codecov.io/gh/drzioner/gitwise/graph/badge.svg)](https://codecov.io/gh/drzioner/gitwise)
[![Version](https://img.shields.io/github/v/release/drzioner/gitwise?display_name=tag)](https://github.com/drzioner/gitwise/releases)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
[![Docs: EN/ES](https://img.shields.io/badge/docs-EN%20%7C%20ES-0A7EA4)](docs/README.md)

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

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

Update an existing installation:

```bash
gitwise update
```

## Quick Start

```bash
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:

- [Command reference (English)](docs/reference/commands.md)
- [Referencia de comandos (Español)](docs/es/reference/commands.md)

## Documentation

- [Documentation index (English)](docs/README.md)
- [Indice de documentacion (Español)](docs/es/README.md)
- [Contributing guide](CONTRIBUTING.md)
- [Guia de contribucion](CONTRIBUTING.es.md)
- [Security policy](SECURITY.md)
- [Politica de seguridad](SECURITY.es.md)
- [Code of Conduct](CODE_OF_CONDUCT.md)
- [Código de conducta](CODE_OF_CONDUCT.es.md)
- [Git conventions](CONVENTIONS.md)
- [Convenciones Git](CONVENTIONS.es.md)

## 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:

```bash
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](https://asciinema.org/a/6tm4TnYMygEQT7ef.svg)](https://asciinema.org/a/6tm4TnYMygEQT7ef)

## License

[MIT](LICENSE) - Deiner
