CLI
The popug command line tool manages Storage, the CDN and API tokens from your terminal.
Install
# macOS and Linux (Homebrew) brew install popug-cloud/tap/popug # or with npm npm install --global @popug-cloud/cli
Verify the installation:
popug --version
Sign in
popug login
In CI, skip the prompt and provide the token through the environment instead:
export POPUG_TOKEN=pc_live_xxxxxxxxxxxxxxxx
Command reference
| Command | Description |
|---|---|
popug storage mb s3://<bucket> | Create a bucket |
popug storage ls [s3://<bucket>] | List buckets or objects |
popug storage upload <file> s3://<bucket>/<key> | Upload a file |
popug storage rm s3://<bucket>/<key> | Delete an object |
popug storage presign s3://<bucket>/<key> | Create a temporary download link |
popug url s3://<bucket>/<key> | Print the public CDN URL |
popug cdn purge s3://<bucket>/<key> | Purge an object from the CDN |
popug token create | Create an API token |
Configuration
| Variable | Description |
|---|---|
POPUG_TOKEN | API token; overrides the saved login |
POPUG_ENDPOINT | Storage endpoint (default https://s3.popug.cloud) |
POPUG_NO_COLOR | Disable colored output |
The saved login lives in ~/.config/popug/config.toml.
Exit codes
0 on success, 1 on a general error, 2 on invalid usage and 4 when authentication fails.