You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/copilot/how-tos/use-copilot-agents/coding-agent/create-a-pr.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Asking GitHub Copilot to create a pull request
3
3
shortTitle: Create a PR
4
-
intro: 'You can ask {% data variables.product.prodname_copilot_short %} to create a pull request from many places, including the agents panel, {% data variables.copilot.copilot_chat_short %}, and agentic coding tools and IDEs with Model Context Protocol (MCP) support.'
4
+
intro: 'You can ask {% data variables.product.prodname_copilot_short %} to create a pull request from many places, including the agents panel, {% data variables.copilot.copilot_chat_short %}, the {% data variables.product.prodname_cli %}, and agentic coding tools and IDEs with Model Context Protocol (MCP) support.'
5
5
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=asking+copilot+to+create+a+pull+request&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
6
6
versions:
7
7
feature: copilot
@@ -28,6 +28,7 @@ You can ask {% data variables.product.prodname_copilot_short %} to work on a tas
28
28
* The agents panel, available across {% data variables.product.github %}
29
29
* The agents page on {% data variables.product.github %}
30
30
* {% data variables.copilot.copilot_chat_short %} in {% data variables.product.prodname_vscode %}, {% data variables.product.prodname_vs %}, JetBrains IDEs and {% data variables.product.prodname_dotcom_the_website %}
31
+
* The {% data variables.product.prodname_cli %}
31
32
* Your preferred IDE or agentic coding tool with Model Context Protocol (MCP) support
32
33
* The Raycast launcher on macOS
33
34
@@ -100,6 +101,25 @@ You can ask {% data variables.product.prodname_copilot_short %} to open a pull r
100
101
101
102
{% data variables.product.prodname_copilot_short %} will start a new session and respond with a link to the pull request it creates. It will work on the task and push changes to the pull request, and then add you as a reviewer when it has finished, triggering a notification.
102
103
104
+
## Asking {% data variables.product.prodname_copilot_short %} to create a pull request from the {% data variables.product.prodname_cli %}
105
+
106
+
> [!NOTE]
107
+
> The `agent-task` command set is only available in v2.80.0 or later of the {% data variables.product.prodname_cli %}. This command set is a {% data variables.release-phases.public_preview %} and is subject to change.
108
+
109
+
You can start a new {% data variables.copilot.copilot_coding_agent %} session with the `gh agent-task create` command in the {% data variables.product.prodname_cli %}.
110
+
111
+
When you run the command without any arguments, you are asked to enter a prompt. {% data variables.copilot.copilot_coding_agent %} acts on the prompt and opens a pull request in the current repository.
112
+
113
+
You can use command line options to:
114
+
115
+
* Provide the prompt (`gh agent-task create "Example prompt"`)
116
+
* Choose a base branch, instead of using the repository's default branch (`--base`)
117
+
* Select a repository, instead of targeting the current repository (`--repo`)
118
+
* Follow the session log in real time (`--log --follow`)
119
+
120
+
121
+
To see all of the available options, run `gh agent-task create --help`.
122
+
103
123
## Asking {% data variables.product.prodname_copilot_short %} to create a pull request from the {% data variables.product.github %} MCP server
104
124
105
125
As an alternative to using {% data variables.copilot.copilot_chat_short %}, you can use the remote {% data variables.product.github %} MCP server to trigger {% data variables.copilot.copilot_coding_agent %} from any MCP host.
Copy file name to clipboardExpand all lines: content/copilot/how-tos/use-copilot-agents/coding-agent/track-copilot-sessions.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Tracking GitHub Copilot's sessions
3
3
shortTitle: Track Copilot sessions
4
-
intro: 'You can use the agents panel or page, {% data variables.product.prodname_vscode %}, Raycast and session logs to track {% data variables.product.prodname_copilot_short %}''s progress and understand its approach.'
4
+
intro: 'You can use the agents panel or page, {% data variables.product.prodname_vscode %}, the {% data variables.product.prodname_cli %}, Raycast and session logs to track {% data variables.product.prodname_copilot_short %}''s progress and understand its approach.'
5
5
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=using+the+copilot+coding+agent+logs&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
6
6
versions:
7
7
feature: copilot
@@ -24,7 +24,7 @@ contentType: how-tos
24
24
25
25
After you give {% data variables.product.prodname_copilot_short %} a task, it works autonomously in the background to complete it. See [AUTOTITLE](/copilot/concepts/about-copilot-coding-agent).
26
26
27
-
The agents panel, [agents page](https://github.com/copilot/agents), and {% data variables.product.prodname_copilot %} extension for Raycast provide an overview of your agent sessions across repositories. You can use them to kick off new tasks and track {% data variables.product.prodname_copilot_short %}'s progress.
27
+
The agents panel, [agents page](https://github.com/copilot/agents), the {% data variables.product.prodname_cli %}, and {% data variables.product.prodname_copilot %} extension for Raycast provide an overview of your agent sessions across repositories. You can use them to kick off new tasks and track {% data variables.product.prodname_copilot_short %}'s progress.
28
28
29
29
You can also track {% data variables.product.prodname_copilot_short %}'s sessions in a specific repository from {% data variables.product.prodname_vscode %}.
30
30
@@ -46,6 +46,19 @@ To view the session logs, click through to the pull request in the list, then fi
46
46
47
47
You can also start new agent sessions from the page and panel. See [AUTOTITLE](/copilot/how-tos/agents/copilot-coding-agent/asking-copilot-to-create-a-pull-request).
48
48
49
+
## Tracking agent sessions from the {% data variables.product.prodname_cli %}
50
+
51
+
> [!NOTE]
52
+
> The `agent-task` command set is only available in v2.80.0 or later of the {% data variables.product.prodname_cli %}. This command set is a {% data variables.release-phases.public_preview %} and is subject to change.
53
+
54
+
You can see a list of your running and past agent sessions from the {% data variables.product.prodname_cli %} with the `gh agent-task list` command. The output will show a list of your recent sessions.
55
+
56
+
To see more information on a specific session, use the `gh agent-task view` command. For example, to view information about the session associated with pull request #123 in the `monalisa/bookstore` repository, run `gh agent-task view --repo monalisa/bookstore 123`.
57
+
58
+
To view the session logs, add the `--log` option. Optionally, use the `--follow` option to stream live logs as the agent works.
59
+
60
+
To see all of the available options, run `gh agent-task list --help` or `gh agent-task view --help`.
61
+
49
62
## Tracking agent sessions from Raycast
50
63
51
64
{% data reusables.copilot.coding-agent.raycast-intro %}
0 commit comments