Get started with the Content CLI
The Quant Content CLI (quant) deploys static sites and manages content on QuantCDN. This page walks through installation, initialising a project, and your first deploy. For full per-command details, see the commands reference.
Requirements
Section titled “Requirements”- Node.js 20 or higher — check with
node --version - npm — included with Node.js
Install
Section titled “Install”Install the CLI globally via npm:
npm install -g @quantcdn/quant-cliVerify the installation:
quant --versionInitialise a project
Section titled “Initialise a project”Navigate to a directory containing your build output and run:
quant initYou’ll be prompted for:
- QuantCDN endpoint — use the default
https://api.quantcdn.io/v1. On QuantGov (dash.quantgov.cloud) usehttps://api.quantgov.cloud/v1. Always include/v1 - Client ID — your organisation ID (from your dashboard URL)
- Project — the project machine name
- Token — your project API token (from the Integrations section of the dashboard)
- Directory — the folder containing your static assets (e.g.
dist,build,public)
This creates a quant.json configuration file in the current directory.
Non-interactive initialisation
Section titled “Non-interactive initialisation”For CI/CD environments, pass all values as flags:
quant init \ -c "$QUANT_CLIENT_ID" \ -p "$QUANT_PROJECT" \ -t "$QUANT_TOKEN" \ -e "https://api.quantcdn.io/v1" \ -d ./distSee quant init for the full flag list.
Deploy your first site
Section titled “Deploy your first site”Deploy all content from the configured directory:
quant deployThis pushes any files changed since the previous deployment. By default, content removed locally is unpublished from the CDN, and affected paths are purged from cache.
For deploy flags (concurrency, skip-unpublish patterns, advanced options like --revision-log), see quant deploy.
Configuration file
Section titled “Configuration file”The quant.json file stores your project configuration:
{ "endpoint": "https://api.quantcdn.io/v1", "clientid": "your-org", "project": "your-project", "token": "your-token", "dir": "dist"}Configuration precedence
Section titled “Configuration precedence”The CLI resolves each setting from these sources, highest first:
- Command-line flags:
-c/--clientid,-p/--project,-t/--token,-e/--endpoint,--dir. - Environment variables:
QUANT_CLIENT_ID,QUANT_PROJECT,QUANT_TOKEN,QUANT_ENDPOINT,QUANT_DIR. quant.jsonin the current directory. The CLI does not read other locations.- Defaults: endpoint
https://api.quantcdn.io/v1, directorybuild.
So an exported QUANT_PROJECT overrides the project in quant.json. The endpoint must include the version path (/v1); without it every request returns 404. quant.json can also hold enableIndexHtml, which the first deploy that uses --enable-index-html saves. A later deploy cannot change it.
Use a different platform
Section titled “Use a different platform”QuantCDN and QuantGov have the same commands. Only the endpoint differs, and a project token works only on the platform that issued it.
| Dashboard | Endpoint |
|---|---|
https://dashboard.quantcdn.io |
https://api.quantcdn.io/v1 |
https://dash.quantgov.cloud |
https://api.quantgov.cloud/v1 |
Run in Docker
Section titled “Run in Docker”The quantcdn/cli image runs quant as its entrypoint. It has no working directory, so mount your project and set one:
docker run --rm -v "$PWD":/site -w /site \ -e QUANT_CLIENT_ID -e QUANT_PROJECT -e QUANT_TOKEN -e QUANT_ENDPOINT \ quantcdn/cli:7.0.1 deploy distStatic site generators
Section titled “Static site generators”The CLI works with any static site generator that outputs HTML, CSS, JavaScript, and assets to a build directory:
| Generator | Default output |
|---|---|
| Astro | dist/ |
| Next.js (static export) | out/ |
| Gatsby | public/ |
| Hugo | public/ |
| Jekyll | _site/ |
| Eleventy | _site/ |
| Docusaurus | build/ |
| VitePress | .vitepress/dist/ |
| MkDocs | site/ |
Point the CLI at your generator’s output directory during quant init.
Where to next
Section titled “Where to next”- Commands reference — every command, flag, and example.
- CI/CD pipelines — automate deployments with GitHub Actions, GitLab CI, and more.
- Edge functions — deploy serverless functions at the edge with
quant function.
