GitHub CLI | Take GitHub to the command line
https://cli.github.com/manual/gh_copilot • 99 KB fetched Open original page
GitHub CLI | Take GitHub to the command line
Skip to content
CLI
Copilot CLI
Manual
Release notes
*
Getting started
*
gh
*
agent-task
*
create
*
list
*
view
*
alias
*
delete
*
import
*
list
*
set
*
api
*
attestation
*
download
*
trusted-root
*
verify
*
auth
*
login
*
logout
*
refresh
*
setup-git
*
status
*
switch
*
token
*
browse
*
cache
*
delete
*
list
*
codespace
*
code
*
cp
*
create
*
delete
*
edit
*
jupyter
*
list
*
logs
*
ports
*
ports forward
*
ports visibility
*
rebuild
*
ssh
*
stop
*
view
*
completion
*
config
*
clear-cache
*
get
*
list
*
set
*
copilot
*
discussion
*
comment
*
create
*
edit
*
list
*
view
*
extension
*
browse
*
create
*
exec
*
install
*
list
*
remove
*
search
*
upgrade
*
gist
*
clone
*
create
*
delete
*
edit
*
list
*
rename
*
view
*
gpg-key
*
add
*
delete
*
list
*
help
*
environment
*
exit-codes
*
formatting
*
mintty
*
reference
*
telemetry
*
issue
*
close
*
comment
*
create
*
delete
*
develop
*
edit
*
list
*
lock
*
pin
*
reopen
*
status
*
transfer
*
unlock
*
unpin
*
view
*
label
*
clone
*
create
*
delete
*
edit
*
list
*
licenses
*
org
*
list
*
pr
*
checkout
*
checks
*
close
*
comment
*
create
*
diff
*
edit
*
list
*
lock
*
merge
*
ready
*
reopen
*
revert
*
review
*
status
*
unlock
*
update-branch
*
view
*
preview
*
prompter
*
project
*
close
*
copy
*
create
*
delete
*
edit
*
field-create
*
field-delete
*
field-list
*
item-add
*
item-archive
*
item-create
*
item-delete
*
item-edit
*
item-list
*
link
*
list
*
mark-template
*
unlink
*
view
*
release
*
create
*
delete-asset
*
delete
*
download
*
edit
*
list
*
upload
*
verify-asset
*
verify
*
view
*
repo
*
archive
*
autolink
*
autolink create
*
autolink delete
*
autolink list
*
autolink view
*
clone
*
create
*
delete
*
deploy-key
*
deploy-key add
*
deploy-key delete
*
deploy-key list
*
edit
*
fork
*
gitignore
*
gitignore list
*
gitignore view
*
license
*
license list
*
license view
*
list
*
read-dir
*
read-file
*
rename
*
set-default
*
sync
*
unarchive
*
view
*
ruleset
*
check
*
list
*
view
*
run
*
cancel
*
delete
*
download
*
list
*
rerun
*
view
*
watch
*
search
*
code
*
commits
*
issues
*
prs
*
repos
*
secret
*
delete
*
list
*
set
*
skill
*
install
*
list
*
preview
*
publish
*
search
*
update
*
ssh-key
*
add
*
delete
*
list
*
status
*
variable
*
delete
*
get
*
list
*
set
*
workflow
*
disable
*
enable
*
list
*
run
*
view
CLI manual
*
Getting started
*
gh
*
agent-task
*
create
*
list
*
view
*
alias
*
delete
*
import
*
list
*
set
*
api
*
attestation
*
download
*
trusted-root
*
verify
*
auth
*
login
*
logout
*
refresh
*
setup-git
*
status
*
switch
*
token
*
browse
*
cache
*
delete
*
list
*
codespace
*
code
*
cp
*
create
*
delete
*
edit
*
jupyter
*
list
*
logs
*
ports
*
ports forward
*
ports visibility
*
rebuild
*
ssh
*
stop
*
view
*
completion
*
config
*
clear-cache
*
get
*
list
*
set
*
copilot
*
discussion
*
comment
*
create
*
edit
*
list
*
view
*
extension
*
browse
*
create
*
exec
*
install
*
list
*
remove
*
search
*
upgrade
*
gist
*
clone
*
create
*
delete
*
edit
*
list
*
rename
*
view
*
gpg-key
*
add
*
delete
*
list
*
help
*
environment
*
exit-codes
*
formatting
*
mintty
*
reference
*
telemetry
*
issue
*
close
*
comment
*
create
*
delete
*
develop
*
edit
*
list
*
lock
*
pin
*
reopen
*
status
*
transfer
*
unlock
*
unpin
*
view
*
label
*
clone
*
create
*
delete
*
edit
*
list
*
licenses
*
org
*
list
*
pr
*
checkout
*
checks
*
close
*
comment
*
create
*
diff
*
edit
*
list
*
lock
*
merge
*
ready
*
reopen
*
revert
*
review
*
status
*
unlock
*
update-branch
*
view
*
preview
*
prompter
*
project
*
close
*
copy
*
create
*
delete
*
edit
*
field-create
*
field-delete
*
field-list
*
item-add
*
item-archive
*
item-create
*
item-delete
*
item-edit
*
item-list
*
link
*
list
*
mark-template
*
unlink
*
view
*
release
*
create
*
delete-asset
*
delete
*
download
*
edit
*
list
*
upload
*
verify-asset
*
verify
*
view
*
repo
*
archive
*
autolink
*
autolink create
*
autolink delete
*
autolink list
*
autolink view
*
clone
*
create
*
delete
*
deploy-key
*
deploy-key add
*
deploy-key delete
*
deploy-key list
*
edit
*
fork
*
gitignore
*
gitignore list
*
gitignore view
*
license
*
license list
*
license view
*
list
*
read-dir
*
read-file
*
rename
*
set-default
*
sync
*
unarchive
*
view
*
ruleset
*
check
*
list
*
view
*
run
*
cancel
*
delete
*
download
*
list
*
rerun
*
view
*
watch
*
search
*
code
*
commits
*
issues
*
prs
*
repos
*
secret
*
delete
*
list
*
set
*
skill
*
install
*
list
*
preview
*
publish
*
search
*
update
*
ssh-key
*
add
*
delete
*
list
*
status
*
variable
*
delete
*
get
*
list
*
set
*
workflow
*
disable
*
enable
*
list
*
run
*
view
gh copilot
gh copilot [flags] [args]
Runs the GitHub Copilot CLI.
Executing the Copilot CLI through gh is currently in preview and subject to change.
If already installed, gh will execute the Copilot CLI found in your PATH .
If the Copilot CLI is not installed, it will be downloaded to /home/runner/.local/share/gh/copilot.
Use --remove to remove the downloaded Copilot CLI.
This command is only supported on Windows, Linux, and Darwin, on amd64/x64
or arm64 architectures.
To prevent gh from interpreting flags intended for Copilot,
use -- before Copilot flags and args.
Learn more at https://gh.io/copilot-cli
Options
--remove
Remove the downloaded Copilot CLI
Examples
# Download and run the Copilot CLI
$ gh copilot
# Run the Copilot CLI
$ gh copilot -p "Summarize this week's commits" --allow-tool 'shell(git)'
# Remove the Copilot CLI (if installed through gh)
$ gh copilot --remove
# Run the Copilot CLI help command
$ gh copilot -- --help
See also
* gh
Product
* Features
* Security
*
Enterprise
*
Customer stories
* Pricing
*
Resources
Platform
*
Developer API
* Partners
*
GitHub Desktop
*
GitHub Mobile
Support
* Help
*
Community Forum
*
Expert Services
* Status
*
Contact GitHub
Company
* About
* Blog
*
Careers
* Press
* Shop
* (c) 2026 GitHub, Inc.
*
Terms
*
Privacy
*
Telemetry
*
*
*
*
*
Links found on this page
- Skip to content [direct]
- CLI [direct]
- Copilot CLI [direct]
- Manual [direct]
- Release notes [direct]
- Getting started [direct]
- gh [direct]
- agent-task [direct]
- create [direct]
- list [direct]
- view [direct]
- alias [direct]
- delete [direct]
- import [direct]
- list [direct]
- set [direct]
- api [direct]
- attestation [direct]
- download [direct]
- trusted-root [direct]
- verify [direct]
- auth [direct]
- login [direct]
- logout [direct]
- refresh [direct]
- setup-git [direct]
- status [direct]
- switch [direct]
- token [direct]
- browse [direct]
- cache [direct]
- delete [direct]
- list [direct]
- codespace [direct]
- code [direct]
- cp [direct]
- create [direct]
- delete [direct]
- edit [direct]
- jupyter [direct]
- list [direct]
- logs [direct]
- ports [direct]
- ports forward [direct]
- ports visibility [direct]
- rebuild [direct]
- ssh [direct]
- stop [direct]
- view [direct]
- completion [direct]
- config [direct]
- clear-cache [direct]
- get [direct]
- list [direct]
- set [direct]
- discussion [direct]
- comment [direct]
- create [direct]
- edit [direct]
- list [direct]
- view [direct]
- extension [direct]
- browse [direct]
- create [direct]
- exec [direct]
- install [direct]
- list [direct]
- remove [direct]
- search [direct]
- upgrade [direct]
- gist [direct]
- clone [direct]
- create [direct]
- delete [direct]
- edit [direct]
- list [direct]
- rename [direct]
- view [direct]
- gpg-key [direct]
- add [direct]
|
|