cdn.pizzaDocumentation

Developers

CLI reference

The CLI covers frequent workflows and provides JSON output for automation.

#Overview

The CLI covers frequent workflows and provides JSON output for automation.

#Installation and configuration

Install the official package, then use cdn-pizza login or cdn-pizza login --token YOUR_API_TOKEN. CDN_PIZZA_API_URL and CDN_PIZZA_TOKEN can supply configuration; cdn-pizza config shows the effective source without revealing the secret.

Primary read commands support --json. Validation errors exit non-zero. pizza is an alias, but use cdn-pizza in scripts for clarity.

#Safe CI usage

  1. Inject the token through the runner secret store.

  2. Use JSON output rather than colored prose.

  3. Pass explicit zone or network identifiers.

  4. Add --yes only to already-reviewed destructive actions.

#31 commands

cdn-pizza --help · cdn-pizza --version · pizza

#login

Sign in with credentials or a personal token.

bash
cdn-pizza login [options]

Options

-e, --email <email>
Email.
-p, --password <password>
Password; prefer the interactive prompt.
--token <token>
Personal API token.
--api-url <url>
Custom API URL.
Example
bash
cdn-pizza login --token "$CDN_PIZZA_TOKEN"

#whoami

Show the current user, role, and organization.

bash
cdn-pizza whoami
Example
bash
cdn-pizza whoami

#logout

Revoke the current local token.

bash
cdn-pizza logout [--revoke-env]

Options

--revoke-env
Also revoke CDN_PIZZA_TOKEN.
Example
bash
cdn-pizza logout

#zones

List zones.

bash
cdn-pizza zones [--json]

Options

--json
JSON output.
Example
bash
cdn-pizza zones --json

#zone:create

Create a connected zone.

bash
cdn-pizza zone:create -n <name> -d <domain>

Options

-n, --name <name> *
Zone name.
-d, --domain <domain> *
Domain.
--region <region>
Legacy ignored option.
Example
bash
cdn-pizza zone:create -n assets -d assets.example.com

#upload

Upload a file to storage nodes.

bash
cdn-pizza upload -z <zoneId> -f <path> [options]

Options

-z, --zone <zoneId> *
Zone ID.
-f, --file <path> *
Local file.
-n, --name <name>
Remote name.
--cache-ttl <seconds>
Cache TTL.
--direct-public-link
Create the direct storage link.
--storage-node <id...>
Up to three nodes.
Example
bash
cdn-pizza upload -z 42 -f ./app.css --cache-ttl 86400

#files

List files.

bash
cdn-pizza files [-z <zoneId>] [--json]

Options

-z, --zone <zoneId>
Filter by zone.
--json
JSON output.
Example
bash
cdn-pizza files -z 42

#file:show

Show file details.

bash
cdn-pizza file:show <uuid> [--json]

Options

<uuid> *
File UUID.
--json
JSON output.
Example
bash
cdn-pizza file:show 550e8400-e29b-41d4-a716-446655440000

#file:delete

Permanently delete a file.

bash
cdn-pizza file:delete <uuid> [--yes]

Options

<uuid> *
File UUID.
--yes
Confirm without prompting.
Example
bash
cdn-pizza file:delete 550e8400-e29b-41d4-a716-446655440000 --yes

#purge

Purge a path or the entire zone.

bash
cdn-pizza purge -z <zoneId> (--path <path> | --all) [--yes]

Options

-z, --zone <zoneId> *
Zone ID.
-p, --path <path>
Specific path.
--all
Entire zone.
--yes
Confirm a full purge.
Example
bash
cdn-pizza purge -z 42 --path /assets/app.css

#stats

Show zone statistics.

bash
cdn-pizza stats -z <zoneId> [--json]

Options

-z, --zone <zoneId> *
Zone ID.
--json
JSON output.
Example
bash
cdn-pizza stats -z 42 --json

#nodes

List nodes.

bash
cdn-pizza nodes [--json]

Options

--json
JSON output.
Example
bash
cdn-pizza nodes

#billing

Show the current subscription.

bash
cdn-pizza billing [--json]

Options

--json
JSON output.
Example
bash
cdn-pizza billing

#billing:plans

List plans.

bash
cdn-pizza billing:plans [--json]

Options

--json
JSON output.
Example
bash
cdn-pizza billing:plans

#billing:checkout

Create a checkout session.

bash
cdn-pizza billing:checkout --plan <plan>

Options

--plan <plan> *
Plan code.
Example
bash
cdn-pizza billing:checkout --plan pro

#networks

List private networks.

bash
cdn-pizza networks [--json]

Options

--json
JSON output.
Example
bash
cdn-pizza networks

#network:create

Create a private WireGuard network.

bash
cdn-pizza network:create -n <name> --cidr <cidr> [options]

Options

-n, --name <name> *
Name.
--cidr <cidr> *
Private CIDR.
-d, --description <text>
Description.
--route <cidr...>
Advertised routes.
Example
bash
cdn-pizza network:create -n backoffice --cidr 10.42.0.0/24

#network:key

Create a short-lived enrollment key.

bash
cdn-pizza network:key <networkId> [options]

Options

<networkId> *
Network ID.
-n, --name <name>
Key name.
--uses <number>
Maximum uses.
--hours <number>
Validity in hours.
Example
bash
cdn-pizza network:key 7 --name deploy --uses 1 --hours 1

#network:show

Show a network and its availability.

bash
cdn-pizza network:show <networkId> [--json]

Options

<networkId> *
Network ID.
--json
JSON output.
Example
bash
cdn-pizza network:show 7

#network:profile

Generate a WireGuard profile without enabling it.

bash
cdn-pizza network:profile --token <token> [options]

Options

--token <token> *
cpn_… key.
-n, --name <name>
Device name.
--type <type>
Peer type.
--endpoint <endpoint>
Public endpoint.
--output <path>
Output file.
--install
Enable with wg-quick.
Example
bash
cdn-pizza network:profile --token "$ENROLLMENT_TOKEN" --output ./wg-cdn.conf

#network:enroll

Enroll the machine and write its profile.

bash
cdn-pizza network:enroll --token <token> [options]

Options

--token <token> *
cpn_… key.
-n, --name <name>
Device name.
--type <type>
Peer type.
--endpoint <endpoint>
Public endpoint.
--output <path>
Output file.
--install
Enable with wg-quick.
Example
bash
cdn-pizza network:enroll --token "$ENROLLMENT_TOKEN" --install

#status-agent:enroll

Enroll this machine as a status agent.

bash
cdn-pizza status-agent:enroll --token <token> [options]

Options

--token <token> *
cps_… key.
-n, --name <name>
Agent name.
--api-url <url>
API URL.
Example
bash
cdn-pizza status-agent:enroll --token "$STATUS_ENROLLMENT_TOKEN"

#status-agent:key

Create an agent enrollment key.

bash
cdn-pizza status-agent:key --status-page <id> -n <name> [options]

Options

--status-page <id> *
Page ID.
-n, --name <name> *
Name.
--uses <number>
Maximum uses.
--hours <number>
Validity.
--yes
Script compatibility.
Example
bash
cdn-pizza status-agent:key --status-page 3 -n branch-geneva

#status-agent:status

List local agents without exposing their tokens.

bash
cdn-pizza status-agent:status [--json]

Options

--json
JSON output.
Example
bash
cdn-pizza status-agent:status

#status-agent:run

Send local heartbeats and results.

bash
cdn-pizza status-agent:run [options]

Options

--agent <id>
Local agent.
--interval <seconds>
Interval, minimum 5 s.
--once
Run once.
Example
bash
cdn-pizza status-agent:run --once

#agent:status

Inspect local WireGuard profiles.

bash
cdn-pizza agent:status [options]

Options

--config <path>
Specific profile.
--json
JSON output.
Example
bash
cdn-pizza agent:status --json

#agent:up

Enable a profile with wg-quick.

bash
cdn-pizza agent:up --config <path> [--unsafe-config]

Options

--config <path> *
WireGuard profile.
--unsafe-config
Allow an unregistered external profile.
Example
bash
sudo cdn-pizza agent:up --config ./wg-cdn.conf

#agent:down

Stop a WireGuard profile.

bash
cdn-pizza agent:down --config <path> [--unsafe-config]

Options

--config <path> *
WireGuard profile.
--unsafe-config
Allow an unregistered external profile.
Example
bash
sudo cdn-pizza agent:down --config ./wg-cdn.conf

#agent:run

Automatically keep a tunnel active.

bash
cdn-pizza agent:run --config <path> [options]

Options

--config <path> *
WireGuard profile.
--interval <seconds>
Check interval.
--unsafe-config
Allow an unregistered external profile.
Example
bash
sudo cdn-pizza agent:run --config ./wg-cdn.conf --interval 30

#config

Show configuration sources without revealing the secret.

bash
cdn-pizza config
Example
bash
cdn-pizza config

#dev

Serve a static directory locally.

bash
cdn-pizza dev [-p <port>] [-d <dir>]

Options

-p, --port <port>
Port, default 3000.
-d, --dir <dir>
Directory, current by default.
Example
bash
cdn-pizza dev -p 3000 -d ./dist
Customer documentationReference generated from published interfaces