GH-AGENT-TASK-CREATE(1)
GH-AGENT-TASK-CREATE(1) π¦
β¨ NAME β¨
gh-agent-task-create β create an agent task (preview). This page is from the GitHub CLI manual, bestie, and yes it's giving preview energy, so keep that in mind. π
πΈ SYNOPSIS πΈ
gh agent-task create [<task description>] [flags]
okay so you can hand over a <task description> if you want, or not β it's optional, no pressure β and then the [flags] do their little thing. π
π OPTIONS π
-b,--base <string>β base branch for the pull request. If you don't provide one, it uses the default branch, periodt.-a,--custom-agent <string>β use a custom agent for the task. e.g., use'my-agent'for the'my-agent.md'agent. iykyk.--followβ follow agent session logs. lowkey useful.-F,--from-file <file>β read the task description from a file. Use"-"to read from standard input β yes, the dash is doing main character work.-R,--repo <[HOST/]OWNER/REPO>β select another repository using the[HOST/]OWNER/REPOformat. slay.
π EXIT CODES π
0: Successful execution1: Error2: Command canceled4: Authentication required
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
π₯ EXAMPLE π₯
okay bestie, here are all the examples exactly as the manual gives them β copy-paste energy only:
# Create a task from an inline description
$ gh agent-task create "build me a new app"
# Create a task from an inline description and follow logs
$ gh agent-task create "build me a new app" --follow
# Create a task from a file
$ gh agent-task create -F task-desc.md
# Create a task with problem statement from stdin
$ echo "build me a new app" | gh agent-task create -F -
# Create a task with an editor
$ gh agent-task create
# Create a task with an editor and a file as a template
$ gh agent-task create -F task-desc.md
# Select a different base branch for the PR
$ gh agent-task create "fix errors" --base branch
# Create a task using the custom agent defined in '.github/agents/my-agent.md'
$ gh agent-task create "build me a new app" --custom-agent my-agent
π SEE ALSO π
stay iconic, bestie π β GitHub CLI v2.102.0, Oct 2026 π
π¦ where this page comes from
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms