{
  "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",
  "executables": [
    "gt",
    "graphite"
  ],
  "dotfiles": {
    "paths": [
      "~/.config/graphite/user_config"
    ],
    "secret": [
      "~/.config/graphite/auth"
    ],
    "secret_paths": [
      {
        "file": "~/.config/graphite/user_config",
        "format": "json",
        "match": {
          "key_path": [
            "authToken",
            "alternativeProfiles.*.authToken"
          ]
        }
      }
    ]
  },
  "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
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/gt.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "create"
        ],
        "label": "Create a stacked branch",
        "description": "Create a new branch on top of the current one and commit staged changes.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/gt.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "name",
            "label": "Branch name",
            "description": "Optional; derived from the message when omitted.",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "message",
            "label": "Commit message",
            "type": "string",
            "option": [
              "--message",
              "-m"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "all",
            "label": "Stage all changes",
            "type": "boolean",
            "option": [
              "--all",
              "-a"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "patch",
            "label": "Pick hunks",
            "type": "boolean",
            "option": [
              "--patch",
              "-p"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "insert",
            "label": "Insert before children",
            "type": "boolean",
            "option": [
              "--insert",
              "-i"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "commit",
            "label": "Branch with commit",
            "fields": [
              "name",
              "message",
              "all"
            ],
            "required": [
              "message"
            ],
            "set": {
              "all": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "name",
              "message",
              "all"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "patch",
              "insert"
            ]
          }
        ]
      },
      {
        "path": [
          "modify"
        ],
        "label": "Modify the branch",
        "description": "Amend the current commit or add a new one, restacking descendants.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/gt.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "message",
            "label": "Message",
            "description": "When given, no editor opens.",
            "type": "string",
            "option": [
              "--message",
              "-m"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "all",
            "label": "Stage all changes",
            "type": "boolean",
            "option": [
              "--all",
              "-a"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "commit",
            "label": "New commit",
            "description": "Create a new commit instead of amending.",
            "type": "boolean",
            "option": [
              "--commit",
              "-c"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "edit",
            "label": "Edit message",
            "type": "boolean",
            "option": [
              "--edit",
              "-e"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "patch",
            "label": "Pick hunks",
            "type": "boolean",
            "option": [
              "--patch",
              "-p"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "amend",
            "label": "Amend",
            "fields": [
              "all",
              "message"
            ],
            "required": [],
            "set": {
              "all": [
                true
              ]
            }
          },
          {
            "id": "new-commit",
            "label": "Add a commit",
            "fields": [
              "commit",
              "all",
              "message"
            ],
            "required": [],
            "set": {
              "commit": [
                true
              ],
              "all": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "message",
              "all",
              "commit"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "patch",
              "edit"
            ]
          }
        ]
      },
      {
        "path": [
          "checkout"
        ],
        "label": "Switch branch",
        "description": "Switch to a branch, or open the selector when none is given.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/gt.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "branch",
            "label": "Branch",
            "description": "Leave empty for the interactive selector.",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "show_untracked",
            "label": "Include untracked",
            "type": "boolean",
            "option": [
              "--show-untracked",
              "-u"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "go",
            "label": "Check out",
            "fields": [
              "branch",
              "show_untracked"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "branch",
              "show_untracked"
            ]
          }
        ]
      },
      {
        "path": [
          "submit"
        ],
        "label": "Submit the stack",
        "description": "Force push the branch and create or update its pull request.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/gt.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "stack",
            "label": "Include descendants",
            "type": "boolean",
            "option": [
              "--stack",
              "-s"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "draft",
            "label": "Draft",
            "type": "boolean",
            "option": [
              "--draft",
              "-d"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "publish",
            "label": "Publish",
            "type": "boolean",
            "option": [
              "--publish",
              "-p"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "dry_run",
            "label": "Dry run",
            "type": "boolean",
            "option": [
              "--dry-run"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "confirm",
            "label": "Confirm first",
            "type": "boolean",
            "option": [
              "--confirm",
              "-c"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_edit",
            "label": "Skip editing",
            "type": "boolean",
            "option": [
              "--no-edit",
              "-n"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "edit",
            "label": "Edit PR fields",
            "type": "boolean",
            "option": [
              "--edit",
              "-e"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "update_only",
            "label": "Update only",
            "type": "boolean",
            "option": [
              "--update-only",
              "-u"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "restack",
            "label": "Restack first",
            "type": "boolean",
            "option": [
              "--restack"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "merge_when_ready",
            "label": "Merge when ready",
            "type": "boolean",
            "option": [
              "--merge-when-ready",
              "-m"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "force",
            "label": "Force push",
            "description": "Overwrites the remote branch.",
            "type": "boolean",
            "option": [
              "--force",
              "-f"
            ],
            "effect": "overwrite",
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "stack",
            "label": "Submit whole stack",
            "fields": [
              "stack",
              "draft",
              "dry_run",
              "confirm"
            ],
            "required": [],
            "set": {
              "stack": [
                true
              ]
            }
          },
          {
            "id": "preview",
            "label": "Dry run",
            "fields": [
              "stack",
              "dry_run"
            ],
            "required": [],
            "set": {
              "dry_run": [
                true
              ],
              "stack": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "stack",
              "draft",
              "dry_run",
              "confirm",
              "no_edit"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "update_only",
              "restack",
              "merge_when_ready",
              "force",
              "edit",
              "publish"
            ]
          }
        ]
      },
      {
        "path": [
          "sync"
        ],
        "label": "Sync with trunk",
        "description": "Pull trunk, offer to delete merged branches and restack.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/gt.ts",
            "license": "MIT"
          }
        ],
        "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"
            ]
          },
          {
            "id": "show_delete_progress",
            "label": "Show delete progress",
            "type": "boolean",
            "option": [
              "--show-delete-progress"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "sync",
            "label": "Sync",
            "fields": [
              "show_delete_progress"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "force",
              "show_delete_progress"
            ]
          }
        ]
      }
    ]
  }
}
