---
name: "glab-repo-archive"
section: "1"
platform: "linux"
package: "glab"
version: "1.126.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/glab-repo-archive"
---

# glab-repo-archive(1)

Get an archive of the repository.

## NAME

glab-repo-archive - Get an archive of the repository.

## SYNOPSIS

**glab repo archive \[\] \[\] \[flags\]**

## DESCRIPTION

Without a repository argument, archives the current repository. The repository accepts these shorthand references:

- •

  repo

- •

  namespace/repo

- •

  namespace/group/repo

The second argument sets the directory to download the archive into.

## OPTIONS

**-f**, **--format**="zip"\
 	Optional. Specify format if you want a downloaded archive: tar.gz, tar.bz2, tbz, tbz2, tb2, bz2, tar, zip.

**-s**, **--sha**=""\
 	The commit SHA to download. A tag, branch reference, or SHA can be used. Defaults to the tip of the default branch if not specified.

## OPTIONS INHERITED FROM PARENT COMMANDS

**-h**, **--help**\[=false\]\
 	Show help for this command.

## EXAMPLE

```
glab repo archive profclems/glab
# Downloads zip file of current repository
glab repo archive
# Downloads repo zip file into mydirectory
glab repo archive profclems/glab mydirectory
# Finds repo for current user and download in ZIP format
glab repo archive profclems/glab --format=zip
```

## SEE ALSO

**[glab-repo(1)](/glab-repo/1.md)**
