[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.

CommandAliasSub commandFlagsDescription
auth--tokenAdd your auth token to enable Graphite CLI to create and update your PRs on GitHub.
branchbbottom, checkout, create, delete, down, edit, fold, info, rename, restack, split, squash, submit, top, track, unbranch, untrack, upCommands that operate on the current branch and its ancestors.
changelogShow the Graphite CLI changelog.
commitcamend, createCommands that operate on commits.
completionSet up bash or zsh tab completion.
continuecont--allContinues the most recent Graphite command halted by a merge conflict.
dashdprOpen the web dashboard.
docsShow the Graphite CLI docs.
downstackdsedit, get, restack, submit, test, trackCommands that operate on the current branch and any of the branches beneath it (ancestors).
feedbackdebug-context--with-debug-contextCommands for providing feedback and debug state.
fishSets up fish tab completion
logllong, short--reverse, --stack, --steps, --show-untrackedCommands that log your stacks.
reporinit, name, owner, pr-templates, remote, syncCommands that read or write Graphite's configuration settings for the current repo.
stacksrestack, submit, testCommands that operate on your current stack of branches.
upstackusonto, restack, submit, testCommands that operate on a branch and its descendants.
userbranch-date, branch-prefix, branch-replacement, editor, pager, restack-date, submit-body, tipsCommands that read or write Graphite's user configuration settings.

Global flags

You can use the following flags with any of the available gt commands.

FlagDescription
--versionShow version number
--helpShow the help menu for a given command
--interactivePrompt the user. Disable with --no-interactive
-q, --quietMinimize output to the terminal
--verifyRun git hooks. Disable with --no-verify
--debugDisplay debug output