Skip to content

Commit f3becda

Browse files
Update generated CLI documentation for version release/0.20.4 (#212)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 5a08f5a commit f3becda

12 files changed

Lines changed: 98 additions & 76 deletions

content/docs/commands/but-agent.mdx

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,53 @@ title: "`but agent`"
33
description: "Set up GitButler for AI coding agents."
44
---
55

6-
Use `but agent setup` to install GitButler agent skills and write workflow
7-
instructions into supported agent instruction files. To install or update the
8-
skill files without writing instructions, use
9-
[`but skill`](/commands/but-skill).
10-
11-
Running `but agent` with no subcommand starts the same wizard.
6+
Runs a guided setup wizard for installing GitButler agent skills and
7+
writing workflow steering instructions into supported agent instruction
8+
files.
129

1310
## Examples
1411

15-
Start the interactive setup wizard:
12+
Start the interactive setup wizard (`but agent setup` is equivalent):
1613

1714
```text
18-
but agent setup
15+
but agent
1916
```
2017

21-
Print the default workflow instructions without modifying files:
18+
Print the default generated steering text:
2219

2320
```text
2421
but agent setup --print
2522
```
2623

27-
**Usage:** `but agent [COMMAND]`
24+
**Usage:** `but agent <COMMAND>`
2825

2926
## Subcommands
3027

3128
### `but agent setup`
3229

3330
Configure GitButler skills and workflow instructions for coding agents.
3431

35-
The wizard asks which agents you use, whether setup applies to this repository,
36-
globally, or both, and which workflow preferences to include. Before
37-
writing, it shows the skill install paths, instruction files, any repository
38-
`but setup` step, and the exact generated text.
32+
Starts an interactive wizard that generates GitButler workflow steering,
33+
installs selected agent skills, and optionally writes the generated
34+
steering into agent instruction files.
35+
36+
## Examples
37+
38+
Start the setup wizard:
39+
40+
```text
41+
but agent setup
42+
```
43+
44+
Print the default steering text without modifying files:
3945

40-
In a non-interactive terminal, use `--print`.
46+
```text
47+
but agent setup --print
48+
```
4149

4250
**Usage:** `but agent setup [OPTIONS]`
4351

4452
**Options:**
4553

46-
* `--print` - Print the default workflow instructions without prompting or
47-
modifying files
54+
* `--print` Print the default generated steering text without prompting or modifying files
55+
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
---
22
title: "`but amend`"
3-
description: "Amend a file change into a specific commit and rebases any dependent commits."
3+
description: "Amend one or more file changes into a specific commit and rebases any dependent commits."
44
---
55

6-
Wrapper for `but rub <file> <commit>`.
6+
Use `but amend <commit> --changes <file-or-hunk>[,<file-or-hunk>...]`.
77

8-
**Usage:** `but amend <FILE> <COMMIT>`
8+
**Usage:** `but amend <TARGET_OR_SOURCE> [OPTIONS]`
99

1010
## Arguments
1111

12-
* `<FILE>` — File ID to amend (required)
13-
* `<COMMIT>` — Commit ID to amend into (required)
12+
* `<TARGET_OR_SOURCE>` — Commit ID to amend into.
13+
14+
In the legacy two-positional form, this can be the source ID. (required)
15+
16+
## Options
17+
18+
* `-p`, `--changes` `<CHANGES>` — Uncommitted file or hunk CLI IDs to amend into the commit.
19+
20+
Can be specified multiple times or as comma-separated values.
1421

content/docs/commands/but-commit.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ It will not commit changes staged to other branches.
1919

2020
Use `but commit empty --before <target>` or `but commit empty --after <target>`
2121
to insert a blank commit. This is useful for creating a placeholder
22-
commit that you can amend changes into later using `but mark`, `but rub` or `but absorb`.
22+
commit that you can amend changes into later using `but rub` or `but absorb`.
2323

2424
**Usage:** `but commit <COMMAND> [BRANCH] [OPTIONS]`
2525

@@ -30,14 +30,13 @@ commit that you can amend changes into later using `but mark`, `but rub` or `but
3030
Insert a blank commit before or after the specified commit.
3131

3232
This is useful for creating a placeholder commit that you can
33-
then amend changes into later using `but mark`, `but rub` or `but absorb`.
33+
then amend changes into later using `but rub` or `but absorb`.
3434

35-
You can modify the empty commit message at any time using `but reword`.
35+
You can provide a message with `-m` or modify it later using `but reword`.
3636

3737
This allows for a more Jujutsu style workflow where you create commits
38-
first and then fill them in as you work. Create an empty commit, mark it
39-
for auto-commit, and then just work on your changes. Write the commit
40-
message whenever you prefer.
38+
first and then fill them in as you work. Create an empty commit and
39+
then rub or absorb changes into it whenever you prefer.
4140

4241
## Examples
4342

@@ -77,12 +76,15 @@ If a target is provided without --before or --after, defaults to --before behavi
7776

7877
* `--before` `<BEFORE>` — Insert the blank commit before this commit or branch
7978
* `--after` `<AFTER>` — Insert the blank commit after this commit or branch
79+
* `-m`, `--message` `<MESSAGE>` — Commit message for the inserted blank commit
8080

8181
## Options
8282

8383
* `-m`, `--message` `<MESSAGE>` — Commit message
8484
* `--message-file` `<FILE>` — Read commit message from file
8585
* `-c`, `--create` — Whether to create a new branch for this commit. If the branch name given matches an existing branch, that branch will be used instead. If no branch name is given, a new branch with a generated name will be created
86+
* `--before` `<BEFORE>` — Insert the commit before this commit or branch
87+
* `--after` `<AFTER>` — Insert the commit after this commit or branch
8688
* `-o`, `--only` — Only commit staged files, not unstaged files
8789
* `-a`, `--all` — No-op compatibility flag for git commit -a
8890
* `-n`, `--no-hooks` — Bypass pre-commit hooks
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: "`but completions`"
3+
description: "Generate `but` shell completions."
4+
---
5+
6+
## Examples
7+
8+
```bash
9+
# bash, put in .bashrc or .bash_profile depending on system setup
10+
eval "$(but completions bash)"
11+
12+
# zsh, put in .zshrc
13+
eval "$(but completions zsh)"
14+
15+
# fish, put in config.fish
16+
but completions fish | source
17+
```
18+
19+
**Usage:** `but completions [SHELL]`
20+
21+
## Arguments
22+
23+
* `<SHELL>` — The shell to generate completions for, or the one extracted from the SHELL environment variable
24+

content/docs/commands/but-mark.mdx

Lines changed: 0 additions & 24 deletions
This file was deleted.

content/docs/commands/but-move.mdx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: "Move a commit or branch to a different location."
66
Commit moves:
77
- By default, commits are moved to be before (below) the target.
88
- Use `--after` to move the commit after (above) the target instead.
9-
9+
- Use comma-separated commit IDs to move multiple commits together.
1010
- When moving to a branch, the commit is placed at the top of that branch's stack.
1111

1212
Branch moves:
@@ -21,18 +21,36 @@ Move a commit before another commit:
2121
but move abc123 def456
2222
```
2323

24+
Move multiple commits before another commit:
25+
26+
```text
27+
but move abc123,789abc def456
28+
```
29+
2430
Move a commit after another commit:
2531

2632
```text
2733
but move abc123 def456 --after
2834
```
2935

36+
Move multiple commits after another commit:
37+
38+
```text
39+
but move abc123,789abc def456 --after
40+
```
41+
3042
Move a commit to a different branch (places at top):
3143

3244
```text
3345
but move abc123 my-feature-branch
3446
```
3547

48+
Move multiple commits to a different branch (places at top):
49+
50+
```text
51+
but move abc123,789abc my-feature-branch
52+
```
53+
3654
Stack one branch on top of another:
3755

3856
```text
@@ -49,7 +67,7 @@ but move feature/frontend zz
4967

5068
## Arguments
5169

52-
* `<SOURCE>` — Commit/branch identifier to move (required)
70+
* `<SOURCE>` — Commit/branch identifier to move. Use comma-separated commit IDs for multi-commit moves (required)
5371
* `<TARGET>` — Target commit/branch identifier, or zz to unstack a branch (required)
5472

5573
## Options

content/docs/commands/but-rub.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ You can rub a file from one commit to another.
1616
Each cell shows what happens when you rub SOURCE → TARGET:
1717

1818
```text
19-
SOURCE ↓ / TARGET → │ zz (unassigned) │ Commit │ Branch │ Stack
19+
SOURCE ↓ / TARGET → │ zz (uncommitted) │ Commit │ Branch │ Stack
2020
─────────────────────┼─────────────────┼────────────┼─────────────┼────────────
2121
File/Hunk │ Unstage │ Amend │ Stage │ Stage
2222
Commit │ Undo │ Squash │ Move │ -
2323
Branch (all changes) │ Unstage all │ Amend all │ Reassign │ Reassign
2424
Stack (all changes) │ Unstage all │ - │ Reassign │ Reassign
25-
Unassigned (zz) │ - │ Amend all │ Stage all │ Stage all
25+
Uncommitted (zz) │ - │ Amend all │ Stage all │ Stage all
2626
File-in-Commit │ Uncommit │ Move │ Uncommit to │ -
2727
```
2828

2929
Legend:
30-
- `zz` is a special target meaning "unassigned" (no branch)
30+
- `zz` is a special target meaning "uncommitted" (no branch)
3131
- `-` means the operation is not supported
3232
- "all changes" / "all" refers to all uncommitted changes from that source
3333

content/docs/commands/but-skill.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ description: "Manage AI agent skills for GitButler."
66
Skills provide enhanced AI capabilities for working with GitButler through
77
Claude Code, Codex, and other AI assistants.
88

9-
For most agent setup, use [`but agent setup`](/commands/but-agent). It wraps
10-
skill installation with workflow instructions. Use `but skill` when you only
11-
need to install, update, check, or place the skill files yourself.
12-
139
Use `but skill install` to install the GitButler skill files. By default,
1410
it prompts for scope (repository or global home directory) and then format.
1511
When run outside a git repository, local scope is unavailable and the

content/docs/commands/but-uncommit.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ Wrapper for `but rub <source> zz`.
1515

1616
## Options
1717

18-
* `-d`, `--discard` — Discard the selected committed changes instead of moving them to unassigned
18+
* `-d`, `--discard` — Discard the selected committed changes instead of moving them to uncommitted
19+
* `--diff` — Show the resulting uncommitted diff after uncommitting
1920

content/docs/commands/but-unmark.mdx

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)