GH-REPO(1) GitHub CLI manual GH-REPO(1)

# [NAME](#NAME)

gh-repo - Manage repositories

# [SYNOPSIS](#SYNOPSIS)

**gh repo &lt;command&gt; \[flags]**

# [DESCRIPTION](#DESCRIPTION)

Work with GitHub repositories.

# [GENERAL COMMANDS](#GENERAL_COMMANDS)

[**gh-repo-create(1)**](#gh_repo_create%281%29)

Create a new repository

[**gh-repo-list(1)**](#gh_repo_list%281%29)

List repositories owned by user or organization

# [TARGETED COMMANDS](#TARGETED_COMMANDS)

[**gh-repo-archive(1)**](#gh_repo_archive%281%29)

Archive a repository

[**gh-repo-autolink(1)**](#gh_repo_autolink%281%29)

Manage autolink references

[**gh-repo-clone(1)**](#gh_repo_clone%281%29)

Clone a repository locally

[**gh-repo-delete(1)**](#gh_repo_delete%281%29)

Delete a repository

[**gh-repo-deploy-key(1)**](#gh_repo_deploy_key%281%29)

Manage deploy keys in a repository

[**gh-repo-edit(1)**](#gh_repo_edit%281%29)

Edit repository settings

[**gh-repo-fork(1)**](#gh_repo_fork%281%29)

Create a fork of a repository

[**gh-repo-gitignore(1)**](#gh_repo_gitignore%281%29)

List and view available repository gitignore templates

[**gh-repo-license(1)**](#gh_repo_license%281%29)

Explore repository licenses

[**gh-repo-read-dir(1)**](#gh_repo_read_dir%281%29)

List a directory in a repository (preview)

[**gh-repo-read-file(1)**](#gh_repo_read_file%281%29)

Read a file from a repository (preview)

[**gh-repo-rename(1)**](#gh_repo_rename%281%29)

Rename a repository

[**gh-repo-set-default(1)**](#gh_repo_set_default%281%29)

Configure default repository for this directory

[**gh-repo-sync(1)**](#gh_repo_sync%281%29)

Sync a repository

[**gh-repo-unarchive(1)**](#gh_repo_unarchive%281%29)

Unarchive a repository

[**gh-repo-view(1)**](#gh_repo_view%281%29)

View a repository

# [EXIT CODES](#EXIT_CODES)

0: Successful execution

1: Error

2: Command canceled

4: Authentication required

NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.

# [EXAMPLE](#EXAMPLE)

```
$ gh repo create
$ gh repo clone cli/cli
$ gh repo view --web
```

# [SEE ALSO](#SEE_ALSO)

[**gh(1)**](/man/os/gh/gh.1)

Sep 2026

---

Document: gh-repo(1) from gh 2.102.0-r0 (Chainguard OS)
Source: https://github.com/cli/cli
