id = "git-spice"
name = "git-spice"
homepage = "https://abhinav.github.io/git-spice/"
executables = ["gs", "git-spice"]
[dotfiles]
paths = []
exclude = []
secret = ["[configHome]/git-spice/secrets.json"]
[commands]
format = 1
label = "git-spice"
description = "Manage stacked branches. Pick a subcommand: create a branch, submit a stack of change requests, or sync with the remote. Other subcommands are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.subcommand]]
path = ["branch", "create"]
label = "Create a stacked branch"
description = "Create a new branch on top of the current one, committing staged changes to it."
[[commands.subcommand.source]]
id = "ref"
kind = "manual"
url = "https://abhinav.github.io/git-spice/cli/reference/"
revision = "2026-10-27"
evidence = """
gs branch (b) create (c) [<name>] [flags]
name: Name of the new branch
--insert: Restack the upstack of the target branch onto the new branch
--below: Place the branch below the target branch and restack its upstack
-t, --target=BRANCH: Branch to create the new branch above/below
-a, --all: Automatically stage modified and deleted files
-m, --message=MSG: Use the given message as the commit message. May be repeated to add multiple paragraphs.
--no-verify: Bypass pre-commit and commit-msg hooks.
"""
[[commands.subcommand.field]]
id = "name"
label = "Branch name"
description = "Leave empty to generate one from the commit message."
type = "string"
position = 0
sources = ["ref"]
[[commands.subcommand.field]]
id = "message"
label = "Commit message"
type = "string"
option = ["--message", "-m"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "all"
label = "Stage modified and deleted files"
type = "boolean"
option = ["--all", "-a"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "target"
label = "Target branch"
type = "string"
option = ["--target", "-t"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "insert"
label = "Insert above target"
type = "boolean"
option = ["--insert"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "below"
label = "Create below target"
type = "boolean"
option = ["--below"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "no_verify"
label = "Bypass commit hooks"
type = "boolean"
option = ["--no-verify"]
sources = ["ref"]
[[commands.subcommand.task]]
id = "create"
label = "Create branch with commit"
fields = ["name", "message", "all"]
required = ["name"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["name", "message", "all"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["target", "insert", "below", "no_verify"]
[[commands.subcommand]]
path = ["stack", "submit"]
label = "Submit the stack"
description = "Create or update change requests for every branch in the current stack."
[[commands.subcommand.source]]
id = "ref"
kind = "manual"
url = "https://abhinav.github.io/git-spice/cli/reference/"
revision = "2026-10-27"
evidence = """
gs stack (s) submit (s) [flags]
-n, --dry-run: Don't actually submit the stack
-c, --fill: Fill in the change title and body from the commit messages
--[no-]draft: Whether to mark change requests as drafts
--force: Force push, bypassing safety checks
--no-verify: Bypass pre-push hooks when pushing to the remote. v0.15.0
-l, --label=LABEL,...: Add labels to the change request. Pass multiple times or separate with commas.
-r, --reviewer=REVIEWER,...: Add reviewers to the change request. Pass multiple times or separate with commas. v0.21.0
"""
[[commands.subcommand.field]]
id = "dry_run"
label = "Dry run"
type = "boolean"
option = ["--dry-run", "-n"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "fill"
label = "Fill title and body from commits"
type = "boolean"
option = ["--fill", "-c"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "label"
label = "Labels"
description = "Comma-separated, or repeat."
type = "string"
option = ["--label", "-l"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "reviewer"
label = "Reviewers"
description = "Comma-separated, or repeat."
type = "string"
option = ["--reviewer", "-r"]
sources = ["ref"]
[[commands.subcommand.field]]
id = "force"
label = "Force push"
type = "boolean"
option = ["--force"]
effect = "overwrite"
sources = ["ref"]
[[commands.subcommand.field]]
id = "no_verify"
label = "Bypass pre-push hooks"
type = "boolean"
option = ["--no-verify"]
sources = ["ref"]
[[commands.subcommand.task]]
id = "preview"
label = "Preview submission"
fields = ["dry_run", "fill"]
required = ["dry_run"]
set = { dry_run = [true] }
[[commands.subcommand.task]]
id = "submit"
label = "Submit with filled details"
fields = ["fill", "label", "reviewer"]
required = []
set = { fill = [true] }
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["dry_run", "fill", "label", "reviewer"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["force", "no_verify"]
[[commands.subcommand]]
path = ["repo", "sync"]
label = "Sync with remote"
description = "Pull the latest changes and delete branches whose change requests were merged."
[[commands.subcommand.source]]
id = "ref"
kind = "manual"
url = "https://abhinav.github.io/git-spice/cli/reference/"
revision = "2026-10-27"
evidence = """
gs repo (r) sync (s) [flags]
--restack (): How to restack branches above deleted branches. One of 'none', 'aboves', and 'upstack'.
"""
[[commands.subcommand.field]]
id = "restack"
label = "Restack branches above deleted ones"
type = "enum"
option = ["--restack"]
choices = [{ value = "none", label = "None" }, { value = "aboves", label = "Direct upstacks only" }, { value = "upstack", label = "Whole upstack" }]
sources = ["ref"]
[[commands.subcommand.task]]
id = "sync"
label = "Sync"
fields = ["restack"]
required = []
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["restack"]