|
| 1 | +--- |
| 2 | +title: CLI Reference |
| 3 | +description: Every gitkit command and flag. |
| 4 | +order: 8 |
| 5 | +--- |
| 6 | + |
| 7 | +# CLI Reference |
| 8 | + |
| 9 | +``` |
| 10 | +gitkit [command] [options] |
| 11 | +``` |
| 12 | + |
| 13 | +Running `gitkit` with no command starts the interactive wizard. |
| 14 | + |
| 15 | +## Core |
| 16 | + |
| 17 | +| Command | Description | |
| 18 | +|---|---| |
| 19 | +| `gitkit` / `gitkit init` | Interactive wizard to configure the repo | |
| 20 | +| `gitkit status` | Show current configuration status | |
| 21 | +| `gitkit clone <repo> [dir]` | Clone a repository and run the wizard | |
| 22 | +| `gitkit clone -b <branch> <repo>` | Clone a specific branch | |
| 23 | + |
| 24 | +## Hooks |
| 25 | + |
| 26 | +| Command | Description | |
| 27 | +|---|---| |
| 28 | +| `gitkit hooks add <builtin>` | Install a built-in hook (hook type inferred) | |
| 29 | +| `gitkit hooks add <hook> <command>` | Install a custom shell command as a hook | |
| 30 | +| `gitkit hooks list` | List installed hooks | |
| 31 | +| `gitkit hooks list --available` | Show all built-in hooks with descriptions | |
| 32 | +| `gitkit hooks remove <hook>` | Remove an installed hook | |
| 33 | +| `gitkit hooks show <hook>` | Print hook content | |
| 34 | + |
| 35 | +## Ignore |
| 36 | + |
| 37 | +| Command | Description | |
| 38 | +|---|---| |
| 39 | +| `gitkit ignore add <templates>` | Generate/merge `.gitignore` via gitignore.io | |
| 40 | +| `gitkit ignore list [filter]` | List available templates | |
| 41 | + |
| 42 | +## Attributes |
| 43 | + |
| 44 | +| Command | Description | |
| 45 | +|---|---| |
| 46 | +| `gitkit attributes init` | Apply line-endings preset to `.gitattributes` | |
| 47 | + |
| 48 | +## Config |
| 49 | + |
| 50 | +| Command | Description | |
| 51 | +|---|---| |
| 52 | +| `gitkit config apply defaults` | `push.autoSetupRemote`, `help.autocorrect`, `diff.algorithm` | |
| 53 | +| `gitkit config apply advanced` | `merge.conflictstyle zdiff3`, `rerere.enabled` | |
| 54 | +| `gitkit config apply delta` | `core.pager delta` | |
| 55 | +| `gitkit config show` | Show current git config values | |
| 56 | + |
| 57 | +Scope: `--global` (all repos) or `--local` (current repo). Default is |
| 58 | +`--local` inside a repo, `--global` otherwise. |
| 59 | + |
| 60 | +## Builds |
| 61 | + |
| 62 | +| Command | Description | |
| 63 | +|---|---| |
| 64 | +| `gitkit build list` | List saved builds | |
| 65 | +| `gitkit build save <name>` | Save current repo config as a build | |
| 66 | +| `gitkit build apply <name>` | Apply a saved build | |
| 67 | +| `gitkit build delete <name>` | Delete a saved build | |
| 68 | + |
| 69 | +## Global flags |
| 70 | + |
| 71 | +| Flag | Description | |
| 72 | +|---|---| |
| 73 | +| `--yes`, `-y` | Skip confirmation prompts | |
| 74 | +| `--force`, `-f` | Overwrite existing files | |
| 75 | +| `--dry-run` | Preview changes without applying | |
| 76 | +| `--help` | Show help for any command | |
| 77 | +| `--version` | Show gitkit version | |
0 commit comments