carapace-sh/carapace-bin / skills/but
but
VerifiedUse when working with the GitButler CLI (`but`) — virtual branches, stacked branches, workspace model, commit editing (rub, amend, squash, reword), CLI IDs, forge integration, PRs, operations log, conflict resolution, TUI, AI agent setup, skills, aliases, configuration. Triggers on: "but", "gitbutler", "but rub", "but commit", "but status", "but branch", "but apply", "but unapply", "but push", "but pull", "but pr", "but oplog", "but undo", "but redo", "but resolve", "but stage", "but squash", "but amend", "but reword", "but config", "but alias", "but setup", "but teardown", "but tui", "but diff", "but show", "but agent", "but skill", "but clean", "but move", "but pick", "but absorb", "but update", "but completions", "virtual branch", "stacked branch", "integration branch", "gitbutler workspace", "but oplog restore", "but oplog snapshot", "CLI ID", "hunk ID".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.5 KB |
| references/ai-agents.md | markdown | 6.2 KB |
| references/branches.md | markdown | 5.4 KB |
| references/commits.md | markdown | 6.9 KB |
| references/config.md | markdown | 4.5 KB |
| references/conflicts.md | markdown | 2.1 KB |
| references/forge.md | markdown | 3.6 KB |
| references/inspection.md | markdown | 4.5 KB |
| references/misc.md | markdown | 3.4 KB |
| references/oplog.md | markdown | 3.3 KB |
| references/rubbing.md | markdown | 3.0 KB |
| references/tui.md | markdown | 2.1 KB |
| references/workspace.md | markdown | 4.6 KB |
references/config.md
View on GitHub# Configuration, Aliases, and AI Settings
Commands for viewing and managing GitButler configuration, aliases, user settings, forge auth, AI providers, and UI preferences.
> **Source of truth**: <https://docs.gitbutler.com/cli-guides/cli-tutorial/configuration>
## `but config` — View and Manage Configuration
Parent command for configuration management.
```bash
but config # View all configuration
```
### `but config user`
User name, email, and editor settings.
```bash
but config user set <key> <value> # Set a user config value
but config user unset <key> # Unset a user config value
```
Config keys:
| Key | Description |
|-----|-------------|
| `name` | User name for commits |
| `email` | User email for commits |
| `editor` | Editor command |
### `but config target`
View or change the target branch (merge base).
```bash
but config target # Show current target
but config target <branch> # Change target branch
```
Positional argument is a remote branch name (e.g. `origin/main`).
### `but config forge`
Forge (GitHub) settings and authentication.
```bash
but config forge # View forge config
but config forge auth # Authenticate to forge
but config forge forget # Forget stored auth
but config forge list-users # List authenticated users
```
`but config forge forget` accepts a positional argument: the forge user to forget.
### `but config metrics`
Enable or disable metrics collection.
```bash
but config metrics enable
but config metrics disable
```
Positional argument is `enable` or `disable` (styled as keywords).
### `but config ui`
UI configuration settings.
```bash
but config ui set <key> <value> # Set a UI config value
but config ui unset <key> # Unset a UI config value
```
UI config keys:
| Key | Values | Description |
|-----|--------|-------------|
| `tui` | `true`, `false` | Enable TUI mode for diffs by default |
### `but config ai`
AI provider configuration. Parent command for AI provider subcommands.
#### `but config ai anthropic`
Configure Anthropic (Claude) as the AI provider.
| Flag | Description |
|------|-------------|
| `--api-key-env` | Environment variable name containing the API key |
| `--key-option` | Key option (provider-specific) |
| `--model` | Model name to use |
#### `but config ai openai`
Configure OpenAI as the AI provider.
| Flag | Description |
|------|-------------|
| `--api-key-env` | Environment variable name containing the API key |
#### `but config ai openrouter`
Configure OpenRouter as the AI provider.
| Flag | Description |
|------|-------------|
| `--api-key-env` | Environment variable name containing the API key |
#### `but config ai ollama`
Configure Ollama (local) as the AI provider.
#### `but config ai lmstudio`
Configure LM Studio (local) as the AI provider.
#### `but config ai show`
Show current AI configuration.
## Aliases
### `but alias` — Manage Command Aliases
Parent command for alias management.
```bash
but alias # List aliases (default subcommand)
```
### `but alias list`
List all configured aliases. Shows both user-defined and default aliases.
```bash
but alias list
```
### `but alias add`
Add a new alias.
```bash
but alias add <name> <expansion>
but alias add --global <name> <expansion> # Store in ~/.gitconfig
```
| Flag | Short | Description |
|------|-------|-------------|
| `--global` | `-g` | Store globally (in `~/.gitconfig`) instead of locally |
Positional arguments:
1. Alias name
2. Expansion (the command the alias expands to)
### `but alias remove`
Remove an existing alias.
```bash
but alias remove <name>
but alias rm <name> # Alias for remove
```
| Flag | Short | Description |
|------|-------|-------------|
| `--global` | `-g` | Remove from global config instead of local |
Positional argument is the alias name.
### Default Aliases
GitButler ships with built-in default aliases:
| Alias | Expansion |
|-------|-----------|
| `default` | `status` |
| `st` | `status` |
| `stf` | `status --files` |
The `default` alias runs when you type just `but` with no arguments. User aliases override defaults.
### JSON Output
```bash
but --format json alias list
```
Returns a JSON object with `User` (array of `{name, value, scope}`) and `Default` (map of name→value).
## Related
- [ai-agents.md](ai-agents.md) — AI agent setup and skills
- [forge.md](forge.md) — Forge authentication details
- [misc.md](misc.md) — Root command global flags
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Unverified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |