|
| 1 | +# gitkit |
| 2 | + |
| 3 | +[](https://github.com/JheisonMB/gitkit/actions/workflows/ci.yml) |
| 4 | +[](https://github.com/JheisonMB/gitkit/actions/workflows/release.yml) |
| 5 | +[](https://crates.io/crates/gitkit) |
| 6 | +[](LICENSE) |
| 7 | + |
| 8 | +Standalone CLI for configuring git repos — hooks, .gitignore, and .gitattributes. No Node.js, no Python, no runtime dependencies. One binary. |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +## Installation |
| 13 | + |
| 14 | +### Quick install (recommended) |
| 15 | + |
| 16 | +**Linux / macOS:** |
| 17 | + |
| 18 | +```bash |
| 19 | +curl -fsSL https://raw.githubusercontent.com/JheisonMB/gitkit/main/install.sh | sh |
| 20 | +``` |
| 21 | + |
| 22 | +### Via cargo |
| 23 | + |
| 24 | +```bash |
| 25 | +cargo install gitkit |
| 26 | +``` |
| 27 | + |
| 28 | +### GitHub Releases |
| 29 | + |
| 30 | +Check the [Releases](https://github.com/JheisonMB/gitkit/releases) page for precompiled binaries (Linux x86_64, macOS x86_64/ARM64, Windows x86_64). |
| 31 | + |
| 32 | +### Uninstall |
| 33 | + |
| 34 | +```bash |
| 35 | +rm -f ~/.local/bin/gitkit |
| 36 | +``` |
| 37 | + |
| 38 | +--- |
| 39 | + |
| 40 | +## Quick Start |
| 41 | + |
| 42 | +```bash |
| 43 | +# Install a built-in hook |
| 44 | +gitkit hooks init commit-msg conventional-commits |
| 45 | + |
| 46 | +# Install a custom hook command |
| 47 | +gitkit hooks init pre-push "cargo test" |
| 48 | + |
| 49 | +# List installed hooks |
| 50 | +gitkit hooks list |
| 51 | + |
| 52 | +# Generate a .gitignore |
| 53 | +gitkit ignore add rust macos |
| 54 | + |
| 55 | +# Apply line endings preset |
| 56 | +gitkit attributes init |
| 57 | +``` |
| 58 | + |
| 59 | +--- |
| 60 | + |
| 61 | +## Commands |
| 62 | + |
| 63 | +| Command | Description | |
| 64 | +|---|---| |
| 65 | +| `gitkit hooks init <hook> <builtin\|command>` | Install a hook (built-in or custom command) | |
| 66 | +| `gitkit hooks list` | List installed hooks | |
| 67 | +| `gitkit hooks remove <hook>` | Remove a hook | |
| 68 | +| `gitkit hooks show <hook>` | Show hook content | |
| 69 | +| `gitkit ignore add <templates>` | Generate .gitignore via gitignore.io | |
| 70 | +| `gitkit ignore list` | List available templates | |
| 71 | +| `gitkit attributes init` | Apply line endings preset | |
| 72 | + |
| 73 | +--- |
| 74 | + |
| 75 | +## Built-in Hooks |
| 76 | + |
| 77 | +| Name | Hook | Description | |
| 78 | +|---|---|---| |
| 79 | +| `conventional-commits` | `commit-msg` | Validates Conventional Commits format | |
| 80 | +| `no-secrets` | `pre-commit` | Detects common secret patterns | |
| 81 | +| `branch-naming` | `pre-commit` | Validates branch name pattern | |
| 82 | + |
| 83 | +--- |
| 84 | + |
| 85 | +## Global Flags |
| 86 | + |
| 87 | +| Flag | Description | |
| 88 | +|---|---| |
| 89 | +| `--yes`, `-y` | Skip confirmation prompts | |
| 90 | +| `--force`, `-f` | Overwrite existing files | |
| 91 | +| `--dry-run` | Preview changes without applying | |
| 92 | + |
| 93 | +--- |
| 94 | + |
| 95 | +## Tech Stack |
| 96 | + |
| 97 | +| Concern | Crate | |
| 98 | +|---|---| |
| 99 | +| CLI parsing | `clap` (derive) | |
| 100 | +| Error handling | `anyhow` | |
| 101 | +| HTTP client | `ureq` | |
| 102 | + |
| 103 | +--- |
| 104 | + |
| 105 | +## License |
| 106 | + |
| 107 | +MIT |
0 commit comments