# gitkit
[](https://github.com/JheisonMB/gitkit/actions/workflows/ci.yml)
[](https://github.com/JheisonMB/gitkit/actions/workflows/release.yml)
[](https://crates.io/crates/gitkit)
[](LICENSE)
Standalone CLI for configuring git repos — hooks, .gitignore, and .gitattributes. No Node.js, no Python, no runtime dependencies. One binary.
---
## Installation
### Quick install (recommended)
**Linux / macOS:**
```bash
**Windows (PowerShell):**
```powershell
### Via cargo
```bash
cargo install gitkit
```
### GitHub Releases
Check the [Releases](https://github.com/JheisonMB/gitkit/releases) page for precompiled binaries (Linux x86_64, macOS x86_64/ARM64, Windows x86_64).
### Uninstall
```bash
rm -f ~/.local/bin/gitkit
```
---
## Quick Start
```bash
# Install a built-in hook
gitkit hooks init commit-msg conventional-commits
# Install a custom hook command
gitkit hooks init pre-push "cargo test"
# List installed hooks
gitkit hooks list
# Generate a .gitignore
gitkit ignore add rust,vscode
# Apply line endings preset
gitkit attributes init
```
---
## Commands
| `gitkit hooks init <hook> <builtin\|command>` | Install a hook (built-in or custom command) |
| `gitkit hooks list` | List installed hooks |
| `gitkit hooks remove <hook>` | Remove a hook |
| `gitkit hooks show <hook>` | Show hook content |
| `gitkit ignore add <templates>` | Generate .gitignore via gitignore.io |
| `gitkit ignore list [filter]` | List available templates |
| `gitkit attributes init` | Apply line endings preset |
| `gitkit config apply <preset>` | Apply git config preset (defaults, advanced, delta) |
---
## Built-in Hooks
| `conventional-commits` | `commit-msg` | Validates Conventional Commits format |
| `no-secrets` | `pre-commit` | Detects common secret patterns |
| `branch-naming` | `pre-commit` | Validates branch name pattern |
---
## Global Flags
| `--yes`, `-y` | Skip confirmation prompts |
| `--force`, `-f` | Overwrite existing files |
| `--dry-run` | Preview changes without applying |
---
## Tech Stack
| CLI parsing | `clap` (derive) |
| Error handling | `anyhow` |
| HTTP client | `ureq` |
---
## License
MIT