id = "graphite-cli" name = "Graphite CLI" homepage = "https://graphite.com/docs/cli-overview" description = "A tool to help you break up large engineering tasks into a series of small, incremental code changes from the command line." icon = "SimpleIcons:graphite" # The npm package @withgraphite/graphite-cli installs both names. executables = ["gt", "graphite"] [dotfiles] # https://graphite.com/docs/configure-cli — "User configuration for Graphite # CLI gets stored in the `user_config` file in the `~/.config/graphite/` # directory", and $XDG_CONFIG_HOME moves that directory. The file is JSON and # its name does not say so, hence the explicit format on the rule below. paths = ["~/.config/graphite/user_config"] # Same page: from CLI 1.8.4 the auth token lives on its own in # `~/.config/graphite/auth`, "the same profile schema" as user_config — a file # that is nothing but tokens, one per profile. secret = ["~/.config/graphite/auth"] # user_config carried the token before the auth file existed and still does for # anyone who authenticated with an older CLI; alternativeProfiles holds one # token per named profile. [[dotfiles.secret_paths]] file = "~/.config/graphite/user_config" format = "json" match = { key_path = ["authToken", "alternativeProfiles.*.authToken"] } # No machine_lines: what is left in user_config — the default profile name, # editor, pager, tips, update prompts — is preference, not machine identity. [commands] format = 1 label = "Graphite stacks" description = "Create, modify, submit and sync stacked branches. Only create, modify, checkout, submit and sync are covered." quality = "ai-draft" base = "fig:gt" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/gt.ts" license = "MIT" [[commands.subcommand]] path = ["create"] label = "Create a stacked branch" description = "Create a new branch on top of the current one and commit staged changes." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/gt.ts" license = "MIT" [[commands.subcommand.field]] id = "name" label = "Branch name" description = "Optional; derived from the message when omitted." type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "message" label = "Commit message" type = "string" option = ["--message", "-m"] sources = ["fig"] [[commands.subcommand.field]] id = "all" label = "Stage all changes" type = "boolean" option = ["--all", "-a"] sources = ["fig"] [[commands.subcommand.field]] id = "patch" label = "Pick hunks" type = "boolean" option = ["--patch", "-p"] sources = ["fig"] [[commands.subcommand.field]] id = "insert" label = "Insert before children" type = "boolean" option = ["--insert", "-i"] sources = ["fig"] [[commands.subcommand.task]] id = "commit" label = "Branch with commit" fields = ["name", "message", "all"] required = ["message"] set = { all = [true] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["name", "message", "all"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["patch", "insert"] [[commands.subcommand]] path = ["modify"] label = "Modify the branch" description = "Amend the current commit or add a new one, restacking descendants." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/gt.ts" license = "MIT" [[commands.subcommand.field]] id = "message" label = "Message" description = "When given, no editor opens." type = "string" option = ["--message", "-m"] sources = ["fig"] [[commands.subcommand.field]] id = "all" label = "Stage all changes" type = "boolean" option = ["--all", "-a"] sources = ["fig"] [[commands.subcommand.field]] id = "commit" label = "New commit" description = "Create a new commit instead of amending." type = "boolean" option = ["--commit", "-c"] sources = ["fig"] [[commands.subcommand.field]] id = "edit" label = "Edit message" type = "boolean" option = ["--edit", "-e"] sources = ["fig"] [[commands.subcommand.field]] id = "patch" label = "Pick hunks" type = "boolean" option = ["--patch", "-p"] sources = ["fig"] [[commands.subcommand.task]] id = "amend" label = "Amend" fields = ["all", "message"] required = [] set = { all = [true] } [[commands.subcommand.task]] id = "new-commit" label = "Add a commit" fields = ["commit", "all", "message"] required = [] set = { commit = [true], all = [true] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["message", "all", "commit"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["patch", "edit"] [[commands.subcommand]] path = ["checkout"] label = "Switch branch" description = "Switch to a branch, or open the selector when none is given." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/gt.ts" license = "MIT" [[commands.subcommand.field]] id = "branch" label = "Branch" description = "Leave empty for the interactive selector." type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "show_untracked" label = "Include untracked" type = "boolean" option = ["--show-untracked", "-u"] sources = ["fig"] [[commands.subcommand.task]] id = "go" label = "Check out" fields = ["branch", "show_untracked"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["branch", "show_untracked"] [[commands.subcommand]] path = ["submit"] label = "Submit the stack" description = "Force push the branch and create or update its pull request." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/gt.ts" license = "MIT" [[commands.subcommand.field]] id = "stack" label = "Include descendants" type = "boolean" option = ["--stack", "-s"] sources = ["fig"] [[commands.subcommand.field]] id = "draft" label = "Draft" type = "boolean" option = ["--draft", "-d"] sources = ["fig"] [[commands.subcommand.field]] id = "publish" label = "Publish" type = "boolean" option = ["--publish", "-p"] sources = ["fig"] [[commands.subcommand.field]] id = "dry_run" label = "Dry run" type = "boolean" option = ["--dry-run"] sources = ["fig"] [[commands.subcommand.field]] id = "confirm" label = "Confirm first" type = "boolean" option = ["--confirm", "-c"] sources = ["fig"] [[commands.subcommand.field]] id = "no_edit" label = "Skip editing" type = "boolean" option = ["--no-edit", "-n"] sources = ["fig"] [[commands.subcommand.field]] id = "edit" label = "Edit PR fields" type = "boolean" option = ["--edit", "-e"] sources = ["fig"] [[commands.subcommand.field]] id = "update_only" label = "Update only" type = "boolean" option = ["--update-only", "-u"] sources = ["fig"] [[commands.subcommand.field]] id = "restack" label = "Restack first" type = "boolean" option = ["--restack"] sources = ["fig"] [[commands.subcommand.field]] id = "merge_when_ready" label = "Merge when ready" type = "boolean" option = ["--merge-when-ready", "-m"] sources = ["fig"] [[commands.subcommand.field]] id = "force" label = "Force push" description = "Overwrites the remote branch." type = "boolean" option = ["--force", "-f"] effect = "overwrite" sources = ["fig"] [[commands.subcommand.task]] id = "stack" label = "Submit whole stack" fields = ["stack", "draft", "dry_run", "confirm"] required = [] set = { stack = [true] } [[commands.subcommand.task]] id = "preview" label = "Dry run" fields = ["stack", "dry_run"] required = [] set = { dry_run = [true], stack = [true] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["stack", "draft", "dry_run", "confirm", "no_edit"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["update_only", "restack", "merge_when_ready", "force", "edit", "publish"] [[commands.subcommand]] path = ["sync"] label = "Sync with trunk" description = "Pull trunk, offer to delete merged branches and restack." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/gt.ts" license = "MIT" [[commands.subcommand.field]] id = "force" label = "Skip prompts" description = "Do not prompt before deleting branches or overwriting trunk." type = "boolean" option = ["--force", "-f"] effect = "overwrite" sources = ["fig"] [[commands.subcommand.field]] id = "show_delete_progress" label = "Show delete progress" type = "boolean" option = ["--show-delete-progress"] sources = ["fig"] [[commands.subcommand.task]] id = "sync" label = "Sync" fields = ["show_delete_progress"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["force", "show_delete_progress"]