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/misc.md
View on GitHub# Miscellaneous — Root Command, Global Flags, Update, Completions
The root `but` command, global flags, command groups, update management, and shell completions.
> **Source of truth**: <https://docs.gitbutler.com/cli-overview>
## Root Command
```bash
but [global flags] [command] [args]
```
The root command is `but` — "A GitButler CLI tool". Running `but` with no arguments runs the `default` alias (which expands to `status`).
### Global Flags
| Flag | Short | Description |
|------|-------|-------------|
| `--current-dir` | `-C` | Run as if `but` was started in PATH instead of the current working directory |
| `--format` | | Explicitly control how output should be formatted (persistent) |
| `--help` | `-h` | Print help |
| `--version` | `-V` | Print version |
The `--current-dir` flag changes the working directory for all operations. The `--format` flag is persistent (available on all subcommands).
### Output Formats
| Format | Description |
|--------|-------------|
| `human` | Default human-readable output |
| `agent` | Formatted for AI agent consumption |
| `shell` | Shell-friendly output |
| `json` | Machine-parseable JSON |
| `none` | No output |
### Positional Arguments
The root command accepts positional arguments without a subcommand. These are CLI IDs, directory paths, or branch names — enabling direct operations like `but <cli-id> <target>` which routes through the alias/default system.
## Command Groups
Commands are organized into groups shown in `--help` output:
| Group ID | Commands |
|----------|----------|
| `inspection` | `status`, `diff`, `show` |
| `branching and committing` | `apply`, `unapply`, `branch`, `clean`, `commit`, `discard`, `merge`, `pick`, `resolve`, `stage` |
| `editing commits` | `absorb`, `amend`, `move`, `reword`, `rub`, `squash`, `uncommit` |
| `operation history` | `oplog`, `redo`, `undo` |
| `server interactions` | `pr`, `pull`, `push` |
| `rules` | _(empty — mark/unmark removed in 0.20.4)_ |
| `other commands` | `alias`, `config`, `gui`, `setup`, `skill`, `teardown`, `tui`, `update`, `agent`, `completions` |
## Dynamic Aliases
User-defined and default aliases are registered as commands at runtime. This means `but st` works exactly like `but status`.
## `but completions` — Generate Shell Completions
```bash
but completions
```
Generate shell completion scripts for the `but` command. Now appears in `--help` output (since 0.20.4), making it discoverable when using the `but` binary without an installer.
## `but update` — Manage Updates
Parent command for CLI and app update management.
### `but update check`
Check if a new version of the GitButler CLI is available.
```bash
but update check
```
### `but update install`
Install or update the GitButler desktop application.
```bash
but update install
```
### `but update suppress`
Suppress update notifications temporarily.
```bash
but update suppress
```
## `but gui` — Open Desktop GUI
```bash
but gui
but gui <path>
```
Open the GitButler desktop GUI for the current project. Accepts an optional project path as a positional argument.
## `but merge` — Merge Branch
Merge a branch into your local target branch.
```bash
but merge <branch>
```
Positional argument is the local branch name to merge.
## Related
- [config.md](config.md) — Configuration and aliases
- [workspace.md](workspace.md) — Workspace model and setup/teardown
- [inspection.md](inspection.md) — `--format` flag and output formats
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 | Verified | 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 |