{
  "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.",
  "name": "gs",
  "aliases": [
    "git-spice"
  ],
  "subcommands": [
    {
      "name": "branch",
      "subcommands": [
        {
          "name": "create",
          "description": "Create a new branch on top of the current one, committing staged changes to it.",
          "options": [
            {
              "names": [
                "--message",
                "-m"
              ],
              "description": "Commit message",
              "args": {
                "name": "message",
                "isOptional": false
              }
            },
            {
              "names": [
                "--all",
                "-a"
              ],
              "description": "Stage modified and deleted files"
            },
            {
              "names": [
                "--target",
                "-t"
              ],
              "description": "Target branch",
              "args": {
                "name": "target",
                "isOptional": false
              }
            },
            {
              "names": [
                "--insert"
              ],
              "description": "Insert above target"
            },
            {
              "names": [
                "--below"
              ],
              "description": "Create below target"
            },
            {
              "names": [
                "--no-verify"
              ],
              "description": "Bypass commit hooks"
            }
          ],
          "args": [
            {
              "name": "name",
              "description": "Leave empty to generate one from the commit message.",
              "isOptional": true
            }
          ]
        }
      ]
    },
    {
      "name": "stack",
      "subcommands": [
        {
          "name": "submit",
          "description": "Create or update change requests for every branch in the current stack.",
          "options": [
            {
              "names": [
                "--dry-run",
                "-n"
              ],
              "description": "Dry run"
            },
            {
              "names": [
                "--fill",
                "-c"
              ],
              "description": "Fill title and body from commits"
            },
            {
              "names": [
                "--label",
                "-l"
              ],
              "description": "Comma-separated, or repeat.",
              "args": {
                "name": "label",
                "description": "Comma-separated, or repeat.",
                "isOptional": false
              }
            },
            {
              "names": [
                "--reviewer",
                "-r"
              ],
              "description": "Comma-separated, or repeat.",
              "args": {
                "name": "reviewer",
                "description": "Comma-separated, or repeat.",
                "isOptional": false
              }
            },
            {
              "names": [
                "--force"
              ],
              "description": "Force push",
              "isDangerous": true
            },
            {
              "names": [
                "--no-verify"
              ],
              "description": "Bypass pre-push hooks"
            }
          ]
        }
      ]
    },
    {
      "name": "repo",
      "subcommands": [
        {
          "name": "sync",
          "description": "Pull the latest changes and delete branches whose change requests were merged.",
          "options": [
            {
              "names": [
                "--restack"
              ],
              "description": "Restack branches above deleted ones",
              "args": {
                "name": "restack",
                "isOptional": false,
                "suggestions": [
                  {
                    "name": "none",
                    "description": "None"
                  },
                  {
                    "name": "aboves",
                    "description": "Direct upstacks only"
                  },
                  {
                    "name": "upstack",
                    "description": "Whole upstack"
                  }
                ]
              }
            }
          ]
        }
      ]
    }
  ]
}
