# Zuplo CLI: Archive

> **Scope of this page**
>
> This page documents the Zuplo **gateway** runtime (API, AI, and MCP gateways), not the Developer Portal.
>
> It applies to every Zuplo hosting option: Managed Edge, Managed Dedicated, and Self-Hosted. See [Hosting options](https://zuplo.com/docs/articles/hosting-options).

<CliCommand
  command="archive"
  description="Creates the source archive that `zuplo deploy` uploads, without deploying it"
  options={[
  {
    "name": "dir",
    "type": "string",
    "description": "The directory containing your Zuplo API",
    "default": ".",
    "required": false,
    "deprecated": false,
    "hidden": true,
    "normalize": true
  },
  {
    "name": "branch",
    "type": "string",
    "description": "The branch name to record as the environment, instead of the current git branch",
    "required": false,
    "deprecated": false,
    "hidden": false
  },
  {
    "name": "output-file",
    "type": "string",
    "description": "Where to write the .tar.gz archive. Defaults to a new temporary file",
    "required": false,
    "deprecated": false,
    "hidden": false
  }
]}
  examples={[
  [
    "$0 archive",
    "Archive the project and print its path, environment, repository URL and commit SHA as JSON"
  ],
  [
    "$0 archive --branch my-feature --output-file ./my-api.tar.gz",
    "Archive as the my-feature branch and write the archive to ./my-api.tar.gz"
  ]
]}
  usage="$0 archive [options]"
>

</CliCommand>

## Global options

The following global options are available for all commands:

- [`--help`](./global-options.mdx#help)
- [`--api-key`](./global-options.mdx#api-key)
