All apps/Graphite CLI

Graphite CLI

graphite-cli

A tool to help you break up large engineering tasks into a series of small, incremental code changes from the command line.

Runs as gt, graphite|macOS, Linux, Windows|graphite.com

Command form

ai-draft · 7 tasks · 25 fields

Create, modify, submit and sync stacked branches. Only create, modify, checkout, submit and sync are covered.

Opens the form; the finished command lands at your prompt, unrun
otty gui graphite-cli

gt create

Create a stacked branch

Create a new branch on top of the current one and commit staged changes.

Create a stacked branchExample values, fixed in this page — nothing here reaches a terminal
Basic
Branch name
string
Commit message*
string
Stage all changes
--all
TasksEach one presets the form for one job
Branch with commit
namemessageall
ParametersOnly these flags are editable in the form
Branch name
Optional; derived from the message when omitted.
string · positional 0
Commit message
string
--message-m
Stage all changes
boolean
--all-a
Pick hunks
boolean
--patch-p
Insert before children
boolean
--insert-i

gt modify

Modify the branch

Amend the current commit or add a new one, restacking descendants.

Modify the branchExample values, fixed in this page — nothing here reaches a terminal
Basic
Message
string
Stage all changes
--all
TasksEach one presets the form for one job
Amend
allmessage
Add a commit
commitallmessage
ParametersOnly these flags are editable in the form
Message
When given, no editor opens.
string
--message-m
Stage all changes
boolean
--all-a
New commit
Create a new commit instead of amending.
boolean
--commit-c
Edit message
boolean
--edit-e
Pick hunks
boolean
--patch-p

gt checkout

Switch branch

Switch to a branch, or open the selector when none is given.

Switch branchExample values, fixed in this page — nothing here reaches a terminal
Basic
Branch
string
Include untracked
--show-untracked
TasksEach one presets the form for one job
Check out
branchshow_untracked
ParametersOnly these flags are editable in the form
Branch
Leave empty for the interactive selector.
string · positional 0
Include untracked
boolean
--show-untracked-u

gt submit

Submit the stack

Force push the branch and create or update its pull request.

Submit the stackExample values, fixed in this page — nothing here reaches a terminal
Basic
Include descendants
--stack
Draft
--draft
Dry run
--dry-run
Confirm first
--confirm
TasksEach one presets the form for one job
Submit whole stack
stackdraftdry_runconfirm
Dry run
stackdry_run
ParametersOnly these flags are editable in the form
Include descendants
boolean
--stack-s
Draft
boolean
--draft-d
Publish
boolean
--publish-p
Dry run
boolean
--dry-run
Confirm first
boolean
--confirm-c
Skip editing
boolean
--no-edit-n
Edit PR fields
boolean
--edit-e
Update only
boolean
--update-only-u
Restack first
boolean
--restack
Merge when ready
boolean
--merge-when-ready-m
Force push
Overwrites the remote branch.
boolean
--force-f

gt sync

Sync with trunk

Pull trunk, offer to delete merged branches and restack.

Sync with trunkExample values, fixed in this page — nothing here reaches a terminal
Basic
Show delete progress
--show-delete-progress
TasksEach one presets the form for one job
Sync
show_delete_progress
ParametersOnly these flags are editable in the form
Skip prompts
Do not prompt before deleting branches or overwriting trunk.
boolean
--force-f
Show delete progress
boolean
--show-delete-progress
SourcesEvery flag above is checked against these
fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

Before it fills your prompt, Otty checks the installed gt against its version. A form that does not match your version is not offered.