{
  "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
    },
    "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.",
        "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]\nname: Name of the new branch\n--insert: Restack the upstack of the target branch onto the new branch\n--below: Place the branch below the target branch and restack its upstack\n-t, --target=BRANCH: Branch to create the new branch above/below\n-a, --all: Automatically stage modified and deleted files\n-m, --message=MSG: Use the given message as the commit message. May be repeated to add multiple paragraphs.\n--no-verify: Bypass pre-commit and commit-msg hooks.\n"
          }
        ],
        "field": [
          {
            "id": "name",
            "label": "Branch name",
            "description": "Leave empty to generate one from the commit message.",
            "type": "string",
            "position": 0,
            "sources": [
              "ref"
            ]
          },
          {
            "id": "message",
            "label": "Commit message",
            "type": "string",
            "option": [
              "--message",
              "-m"
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "all",
            "label": "Stage modified and deleted files",
            "type": "boolean",
            "option": [
              "--all",
              "-a"
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "target",
            "label": "Target branch",
            "type": "string",
            "option": [
              "--target",
              "-t"
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "insert",
            "label": "Insert above target",
            "type": "boolean",
            "option": [
              "--insert"
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "below",
            "label": "Create below target",
            "type": "boolean",
            "option": [
              "--below"
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "no_verify",
            "label": "Bypass commit hooks",
            "type": "boolean",
            "option": [
              "--no-verify"
            ],
            "sources": [
              "ref"
            ]
          }
        ],
        "task": [
          {
            "id": "create",
            "label": "Create branch with commit",
            "fields": [
              "name",
              "message",
              "all"
            ],
            "required": [
              "name"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "name",
              "message",
              "all"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "target",
              "insert",
              "below",
              "no_verify"
            ]
          }
        ]
      },
      {
        "path": [
          "stack",
          "submit"
        ],
        "label": "Submit the stack",
        "description": "Create or update change requests for every branch in the current stack.",
        "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-n, --dry-run: Don't actually submit the stack\n-c, --fill: Fill in the change title and body from the commit messages\n--[no-]draft: Whether to mark change requests as drafts\n--force: Force push, bypassing safety checks\n--no-verify: Bypass pre-push hooks when pushing to the remote. v0.15.0\n-l, --label=LABEL,...: Add labels to the change request. Pass multiple times or separate with commas.\n-r, --reviewer=REVIEWER,...: Add reviewers to the change request. Pass multiple times or separate with commas. v0.21.0\n"
          }
        ],
        "field": [
          {
            "id": "dry_run",
            "label": "Dry run",
            "type": "boolean",
            "option": [
              "--dry-run",
              "-n"
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "fill",
            "label": "Fill title and body from commits",
            "type": "boolean",
            "option": [
              "--fill",
              "-c"
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "label",
            "label": "Labels",
            "description": "Comma-separated, or repeat.",
            "type": "string",
            "option": [
              "--label",
              "-l"
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "reviewer",
            "label": "Reviewers",
            "description": "Comma-separated, or repeat.",
            "type": "string",
            "option": [
              "--reviewer",
              "-r"
            ],
            "sources": [
              "ref"
            ]
          },
          {
            "id": "force",
            "label": "Force push",
            "type": "boolean",
            "option": [
              "--force"
            ],
            "effect": "overwrite",
            "sources": [
              "ref"
            ]
          },
          {
            "id": "no_verify",
            "label": "Bypass pre-push hooks",
            "type": "boolean",
            "option": [
              "--no-verify"
            ],
            "sources": [
              "ref"
            ]
          }
        ],
        "task": [
          {
            "id": "preview",
            "label": "Preview submission",
            "fields": [
              "dry_run",
              "fill"
            ],
            "required": [
              "dry_run"
            ],
            "set": {
              "dry_run": [
                true
              ]
            }
          },
          {
            "id": "submit",
            "label": "Submit with filled details",
            "fields": [
              "fill",
              "label",
              "reviewer"
            ],
            "required": [],
            "set": {
              "fill": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "dry_run",
              "fill",
              "label",
              "reviewer"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "force",
              "no_verify"
            ]
          }
        ]
      },
      {
        "path": [
          "repo",
          "sync"
        ],
        "label": "Sync with remote",
        "description": "Pull the latest changes and delete branches whose change requests were merged.",
        "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]\n--restack (): How to restack branches above deleted branches. One of 'none', 'aboves', and 'upstack'.\n"
          }
        ],
        "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"
            ]
          }
        ],
        "task": [
          {
            "id": "sync",
            "label": "Sync",
            "fields": [
              "restack"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "restack"
            ]
          }
        ]
      }
    ]
  }
}
