[Legacy] CLI reference
Warning
This is the legacy set of commands as of V1.0.0 which was released on 09/13/2023. Please refer to the CLI reference for the most up-to-date set of commands.
Getting started
Before you start using the Graphite CLI, ensure that you install the CLI and set up your Graphite development environment. You can refer to this command reference to see a list of all available gt
commands, their aliases, optional flags, and descriptions. Click into each parent command to see more information about flags and examples of how the command can be used. At the bottom of this reference, you'll find a list of global flags that can be applied to any gt
command, including gt <command> --help
which allows you to have this information on hand while you're developing with the gt
CLI.
Available commands
Legacy Graphite commands generally follow a noun-verb format: gt [noun command] [verb command]
. The aliases that are listed for each of the commands below are the shortest possible way to invoke each command, and can be used in conjunction with other full commands/aliases. For example, all of these are valid ways to invoke gt branch create
: gt b create
, gt branch c
, gt b c
, and gt bc
.
Command | Alias | Sub command | Flags | Description |
---|---|---|---|---|
auth | --token | Add your auth token to enable Graphite CLI to create and update your PRs on GitHub. | ||
branch | b | bottom, checkout, create, delete, down, edit, fold, info, rename, restack, split, squash, submit, top, track, unbranch, untrack, up | Commands that operate on the current branch and its ancestors. | |
changelog | Show the Graphite CLI changelog. | |||
commit | c | amend, create | Commands that operate on commits. | |
completion | Set up bash or zsh tab completion. | |||
continue | cont | --all | Continues the most recent Graphite command halted by a merge conflict. | |
dash | d | pr | Open the web dashboard. | |
docs | Show the Graphite CLI docs. | |||
downstack | ds | edit, get, restack, submit, test, track | Commands that operate on the current branch and any of the branches beneath it (ancestors). | |
feedback | debug-context | --with-debug-context | Commands for providing feedback and debug state. | |
fish | Sets up fish tab completion | |||
log | l | long, short | --reverse, --stack, --steps, --show-untracked | Commands that log your stacks. |
repo | r | init, name, owner, pr-templates, remote, sync | Commands that read or write Graphite's configuration settings for the current repo. | |
stack | s | restack, submit, test | Commands that operate on your current stack of branches. | |
upstack | us | onto, restack, submit, test | Commands that operate on a branch and its descendants. | |
user | branch-date, branch-prefix, branch-replacement, editor, pager, restack-date, submit-body, tips | Commands that read or write Graphite's user configuration settings. |
Global flags
You can use the following flags with any of the available gt
commands.
Flag | Description |
---|---|
--version | Show version number |
--help | Show the help menu for a given command |
--interactive | Prompt the user. Disable with --no-interactive |
-q, --quiet | Minimize output to the terminal |
--verify | Run git hooks. Disable with --no-verify |
--debug | Display debug output |