id = "gh" name = "GitHub CLI" homepage = "https://cli.github.com" description = "GitHub on the command line: pull requests, issues and releases without leaving the terminal." icon = "theSVG:github" executables = ["gh"] [dotfiles] # `gh help environment`: $GH_CONFIG_DIR, defaulting to # $XDG_CONFIG_HOME/gh on Unix and %APPDATA%\GitHub CLI on Windows. paths = [ "~/.config/gh/config.yml", "~/.config/gh/hosts.yml", "%APPDATA%/GitHub CLI/config.yml", "%APPDATA%/GitHub CLI/hosts.yml", ] exclude = [] # hosts.yml is not a whole-file secret: the user name, git protocol and host # list are worth syncing. Only the token is lifted out. secret = [] side_effect = false # Both spellings of hosts.yml, or the token is only lifted out on Unix and # syncs in the clear from a Windows machine. The two key paths are the two # shapes gh has written: a bare oauth_token per host, and the per-user one it # moved to when it grew multi-account support. [[dotfiles.secret_paths]] file = ["~/.config/gh/hosts.yml", "%APPDATA%/GitHub CLI/hosts.yml"] match = { key_path = ["*.oauth_token", "*.users.*.oauth_token"] } [commands] format = 1 label = "GitHub CLI" description = "Work with pull requests, issues and repositories on GitHub. Only list, create and clone are covered; the api, auth, workflow, codespace and project commands are left out." quality = "ai-draft" base = "fig:gh" 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/gh.ts" license = "MIT" [[commands.subcommand]] path = ["pr", "create"] label = "Create a pull request" description = "Open a pull request for the current branch." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/gh.ts" license = "MIT" [[commands.subcommand.field]] id = "title" label = "Title" type = "string" option = ["--title", "-t"] sources = ["fig"] [[commands.subcommand.field]] id = "body" label = "Body" type = "string" option = ["--body", "-b"] sources = ["fig"] [[commands.subcommand.field]] id = "base" label = "Base branch" type = "string" option = ["--base", "-B"] sources = ["fig"] [[commands.subcommand.field]] id = "head" label = "Head branch" description = "Defaults to the current branch." type = "string" option = ["--head", "-H"] sources = ["fig"] [[commands.subcommand.field]] id = "fill" label = "Fill from commits" description = "Skip prompts and use commit info for title and body." type = "boolean" option = ["--fill", "-f"] sources = ["fig"] [[commands.subcommand.field]] id = "draft" label = "Draft" type = "boolean" option = ["--draft", "-d"] sources = ["fig"] [[commands.subcommand.field]] id = "reviewer" label = "Reviewers" type = "string" option = ["--reviewer", "-r"] multiple = true sources = ["fig"] [[commands.subcommand.field]] id = "assignee" label = "Assignees" type = "string" option = ["--assignee", "-a"] multiple = true sources = ["fig"] [[commands.subcommand.field]] id = "web" label = "Open in browser" type = "boolean" option = ["--web", "-w"] sources = ["fig"] [[commands.subcommand.task]] id = "fill" label = "Quick PR from commits" set = { fill = [true] } fields = ["fill", "base", "draft", "reviewer"] required = [] [[commands.subcommand.task]] id = "draft" label = "Draft PR" set = { draft = [true] } fields = ["title", "body", "base", "draft"] required = ["title"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["title", "body", "base", "fill", "draft", "reviewer"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["head", "assignee", "web"] [[commands.subcommand]] path = ["pr", "list"] label = "List pull requests" description = "List and filter pull requests in this repository." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/gh.ts" license = "MIT" [[commands.subcommand.field]] id = "state" label = "State" type = "enum" option = ["--state", "-s"] choices = [{ value = "open", label = "Open" }, { value = "closed", label = "Closed" }, { value = "merged", label = "Merged" }, { value = "all", label = "All" }] sources = ["fig"] [[commands.subcommand.field]] id = "author_assignee" label = "Assignee" type = "string" option = ["--assignee", "-a"] sources = ["fig"] [[commands.subcommand.field]] id = "base" label = "Base branch" type = "string" option = ["--base", "-B"] sources = ["fig"] [[commands.subcommand.field]] id = "label" label = "Label" type = "string" option = ["--label", "-l"] multiple = true sources = ["fig"] [[commands.subcommand.field]] id = "limit" label = "Limit" type = "integer" option = ["--limit", "-L"] sources = ["fig"] [[commands.subcommand.task]] id = "open-mine" label = "My open PRs" set = { state = ["open"], author_assignee = ["@me"] } fields = ["state", "limit"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["state", "author_assignee", "base", "label", "limit"] [[commands.subcommand]] path = ["issue", "create"] label = "Create an issue" description = "Open a new issue." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/gh.ts" license = "MIT" [[commands.subcommand.field]] id = "title" label = "Title" type = "string" option = ["--title", "-t"] sources = ["fig"] [[commands.subcommand.field]] id = "body" label = "Body" type = "string" option = ["--body", "-b"] sources = ["fig"] [[commands.subcommand.field]] id = "body_file" label = "Body file" type = "path" option = ["--body-file", "-F"] path = { kind = "file", role = "input", must_exist = true } sources = ["fig"] [[commands.subcommand.field]] id = "label" label = "Labels" type = "string" option = ["--label", "-l"] multiple = true sources = ["fig"] [[commands.subcommand.field]] id = "assignee" label = "Assignees" description = "Use @me to self-assign." type = "string" option = ["--assignee", "-a"] multiple = true sources = ["fig"] [[commands.subcommand.field]] id = "milestone" label = "Milestone" type = "string" option = ["--milestone", "-m"] sources = ["fig"] [[commands.subcommand.field]] id = "repo" label = "Repository" description = "OWNER/REPO, when not in a checkout." type = "string" option = ["--repo", "-R"] sources = ["fig"] [[commands.subcommand.field]] id = "web" label = "Open in browser" type = "boolean" option = ["--web", "-w"] sources = ["fig"] [[commands.subcommand.task]] id = "quick" label = "Quick issue" fields = ["title", "body", "label", "assignee"] required = ["title"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["title", "body", "body_file", "label", "assignee"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["milestone", "repo", "web"] [[commands.subcommand]] path = ["issue", "list"] label = "List issues" description = "List and filter issues in this repository." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/gh.ts" license = "MIT" [[commands.subcommand.field]] id = "state" label = "State" type = "string" option = ["--state", "-s"] suggestions = [{ value = "open", label = "Open" }, { value = "closed", label = "Closed" }, { value = "all", label = "All" }] sources = ["fig"] [[commands.subcommand.field]] id = "assignee" label = "Assignee" type = "string" option = ["--assignee", "-a"] sources = ["fig"] [[commands.subcommand.field]] id = "author" label = "Author" type = "string" option = ["--author", "-A"] sources = ["fig"] [[commands.subcommand.field]] id = "label" label = "Labels" type = "string" option = ["--label", "-l"] multiple = true sources = ["fig"] [[commands.subcommand.field]] id = "search" label = "Search query" type = "string" option = ["--search", "-S"] sources = ["fig"] [[commands.subcommand.field]] id = "limit" label = "Limit" type = "integer" option = ["--limit", "-L"] sources = ["fig"] [[commands.subcommand.field]] id = "repo" label = "Repository" description = "OWNER/REPO, when not in a checkout." type = "string" option = ["--repo", "-R"] sources = ["fig"] [[commands.subcommand.task]] id = "mine" label = "Issues assigned to me" set = { assignee = ["@me"] } fields = ["state", "label", "limit"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["state", "assignee", "author", "label", "search", "limit"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["repo"] [[commands.subcommand]] path = ["repo", "clone"] label = "Clone a repository" description = "Clone a GitHub repository locally." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/gh.ts" license = "MIT" [[commands.subcommand.field]] id = "repository" label = "Repository" description = "OWNER/REPO. The owner defaults to you if omitted." type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "directory" label = "Directory" type = "path" position = 1 path = { kind = "directory", role = "output", must_exist = false } sources = ["fig"] [[commands.subcommand.field]] id = "upstream" label = "Upstream remote name" description = "Remote name used when cloning a fork." type = "string" option = ["--upstream-remote-name", "-u"] sources = ["fig"] [[commands.subcommand.task]] id = "clone" label = "Clone" fields = ["repository", "directory"] required = ["repository"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["repository", "directory"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["upstream"]