@smoothcdn/cli
v1.1.7
Published
Smooth CDN CLI is a command-line tool for managing projects and assets on Smooth CDN.
Maintainers
Readme
Smooth CDN – CLI Tool
Smooth CDN CLI is a command-line tool for managing projects and assets on Smooth CDN.
It helps you initialize projects, upload assets, optionally manage versions, and control access to protected resources.
The CLI uses a local configuration file (.scdn.json) to define project settings, asset sources, and ignore patterns.
For CI/CD, you can provide the SCDN_TOKEN environment variable to authenticate the CLI in non-interactive environments.
Requirements
- Smooth CDN account – create an account
- Node.js ≥ 18.17.0 (recommended: Node.js 20 LTS)
Installation
npm install -g @smoothcdn/cliCommands
scdn loginLogs in to your Smooth CDN account.
scdn logoutLogs out from your Smooth CDN account.
scdn initInitializes a new project and creates a local configuration file.
scdn loadLoads an existing project into the local config file.
scdn create-version [version]Creates a new version and sets it as the active deployment target. If no version is provided, the version from the config file will be used.
scdn publish-version [version]Publishes the selected version.
If no version is provided, the version from the config file will be published.
Optionally add --blank to create blank version (without any assets from previous version).
scdn pushUploads assets to Smooth CDN.
Use the --sync flag to remove assets from CDN that no longer exist in the project.
Use --concurrency <number> to set parallel upload workers (default: 4).
scdn get-snippetOutputs an embed snippet for the selected asset.
scdn check-assetsValidates asset paths and lists assets before deployment.
scdn grant-accessGrants an access token for protected assets.
scdn revoke-accessRevokes a previously granted access token.
scdn statusDisplays account status, including current user, plan, and limits.
Quick example
scdn login
scdn init