DanubeData CLI
The DanubeData CLI (danube) lets you manage your entire DanubeData infrastructure from the terminal — VPS instances, object storage, static sites, and serverless containers. Built with Node.js, it provides interactive prompts, real-time build tracking, and CI/CD-friendly configuration.
Installation
Requires Node.js 18 or later.
npm install -g @danubedata/cli
Verify the installation:
danube --version
Authentication
Browser auth (recommended)
danube auth
Opens your browser to log in and authorize the CLI automatically — no manual token copying. Authorizing creates an API token for the CLI, so the browser asks you to confirm it's you first (your password, a passkey, an authenticator code, or an emailed code), and we email you that the CLI was signed in.
Interactive login
danube login
You will be prompted to enter your API token. To create a token:
- Log in to the DanubeData dashboard
- Go to Security > API tokens
- Click Create token and copy the token
Token flag
danube login --token YOUR_API_TOKEN
Environment variable
Set the DANUBE_TOKEN environment variable to skip the login step entirely. This is the recommended method for CI/CD pipelines.
export DANUBE_TOKEN="your-api-token"
Check your identity
danube whoami
Shows your name, email, and team memberships.
Log out
danube logout
Removes stored credentials from ~/.danube/config.json.
Configuration
Credentials
Stored at ~/.danube/config.json with 0600 permissions:
{
"token": "your-api-token"
}
Project configuration
Created by danube pages link, stored at .danube/project.json:
{
"siteId": 42,
"teamId": 1,
"siteName": "my-portfolio",
"defaultDomain": "my-portfolio-abc.pages.danubedata.ro"
}
Build configuration
Optional danube.json in your project root:
{
"outputDir": "dist",
"ignore": ["*.map", "test/**"]
}
- outputDir — Directory to deploy (default: current directory)
- ignore — Additional file patterns to exclude from the deployment
Environment variables
| Variable | Description |
|---|---|
DANUBE_TOKEN | API token (alternative to danube login) |
DANUBE_API_BASE | Override API base URL (default: https://danubedata.ro) |
DANUBE_SITE_ID | Static site ID for headless CI/CD — a UUID, the siteId in .danube/project.json (skips interactive linking) |
DANUBE_TEAM_ID | Project (team) ID the site belongs to — the teamId in .danube/project.json |
DANUBE_SITE_NAME | Site name for headless CI/CD |
CI | Suppresses update notifications |
DANUBE_NO_UPDATE_CHECK | Suppresses update notifications |
Commands overview
General
| Command | Description |
|---|---|
danube auth | Authenticate via browser (recommended) |
danube login | Authenticate with an API token |
danube logout | Remove stored credentials |
danube whoami | Show current user and teams |
VPS Instances (danube vps)
| Command | Description |
|---|---|
danube vps ls | List all VPS instances |
danube vps create | Create a new VPS (interactive or flags) |
danube vps get <id> | Show VPS details and connection info |
danube vps update <id> | Update VPS config (must be stopped) |
danube vps delete <id> | Delete a VPS instance |
danube vps start <id> | Start a stopped VPS |
danube vps stop <id> | Stop a running VPS |
danube vps reboot <id> | Reboot a running VPS |
danube vps reinstall <id> | Reinstall OS (destroys all data) |
danube vps status <id> | Show current status and capabilities |
danube vps metrics <id> | Show CPU/memory/storage/network usage |
danube vps password <id> | Show SSH password (with confirmation) |
danube vps images | List available OS images |
Object Storage (danube storage)
| Command | Description |
|---|---|
danube storage buckets ls | List all buckets |
danube storage buckets create | Create a new bucket |
danube storage buckets get <id> | Show bucket details |
danube storage buckets update <id> | Update bucket settings |
danube storage buckets delete <id> | Delete a bucket |
danube storage buckets metrics <id> | Show current bucket metrics snapshot |
danube storage buckets metrics trend <id> | Time-series trend (sparkline/table/csv/json) |
danube storage buckets metrics top <id> | Top objects by size/egress/requests |
danube storage buckets metrics health <id> | Pending multipart uploads, deleted versions, last check |
danube storage keys ls | List all access keys |
danube storage keys create | Create a new access key |
danube storage keys get <id> | Show access key details |
danube storage keys revoke <id> | Revoke an access key |
danube storage policy get <bucket> | Show a bucket's policy status and its custom statements |
danube storage policy set <bucket> | Replace the custom statements |
danube storage policy grant <bucket> | Give a key access to a folder, or to the whole bucket |
Static Sites (danube pages)
| Command | Description |
|---|---|
danube pages link | Link current directory to a static site |
danube pages deploy | Deploy static site files |
danube pages deployments ls | List deployments |
danube pages deployments rollback <rev> | Roll back to a previous deployment |
danube pages domains ls | List custom domains |
danube pages domains add <domain> | Add a custom domain |
danube pages domains remove <domain> | Remove a custom domain |
danube pages domains verify <domain> | Verify domain DNS |
Serverless Containers (danube rapids)
| Command | Description |
|---|---|
danube rapids ls | List serverless containers |
danube rapids create | Create a new container |
danube rapids deploy <name> | Deploy from local directory |
danube rapids show <name> | Show container details |
danube rapids update <name> | Update container configuration |
danube rapids rm <name> | Delete a container |
danube rapids deployments <name> | List container deployments |
danube rapids usage <name> | Show usage and billing |
File exclusion
When packaging files for deployment, the CLI automatically excludes:
.git,node_modules,.danube(always excluded)- Patterns from
.gitignore - Patterns from
.danubeignore(custom ignore file) - Extra patterns from
danube.jsonignorefield
CI/CD usage
For automated deployments without interactive prompts, set environment variables:
export DANUBE_TOKEN="your-api-token"
export DANUBE_SITE_ID="01a0d8fa-35fa-709d-b9d1-319c28ba28fa"
export DANUBE_TEAM_ID="4"
danube pages deploy --dir ./dist
The site ID is a UUID. Run danube pages link once on your machine: it prints both values, and saves them as siteId and teamId in .danube/project.json. Headless deploys need CLI 1.6.0 or newer — earlier versions misread the site ID and failed with Not Found.
GitHub Actions example
name: Deploy to DanubeData
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci && npm run build
- run: npm install -g @danubedata/cli
- run: danube pages deploy --dir ./dist
env:
DANUBE_TOKEN: ${{ secrets.DANUBE_TOKEN }}
DANUBE_SITE_ID: ${{ secrets.DANUBE_SITE_ID }}
DANUBE_TEAM_ID: ${{ secrets.DANUBE_TEAM_ID }}
Update notifications
When a newer version of the CLI is published, every interactive run tells you so — including a bare danube, --help and a failed command. The CLI asks npm at most every six hours. Run danube upgrade to install it; danube upgrade always checks npm directly.
Notifications are suppressed with --json, when output is not a terminal, in CI environments, or when DANUBE_NO_UPDATE_CHECK is set.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error: the command or the API call failed, or a diagnose found a fatal problem. Also a Rapids run that failed without a usable exit code |
| 1–255 | rapids run --wait and rapids runs logs --follow: the run failed, and this is the run's own exit code |
| 2 | Usage error: a required flag is missing and the CLI cannot prompt, the command is unknown, or the options conflict |
| 3 | Not authenticated: run danube auth or danube login |
| 4 | Resource not found |
| 5 | Confirmation required: add --force |
| 8 | Bucket metrics are stale or not available |
| 75 | The CLI gave up waiting (rapids run --wait, rapids runs logs --follow, storage policy set or grant with --wait). The run or change has not failed |
| 124 | A Rapids run timed out on the platform (rapids run --wait, rapids runs logs --follow) |
| 130 | Cancelled with Ctrl+C, or a Rapids run that was cancelled |
Next steps
- CLI: VPS Instances — Manage VPS instances
- CLI: Object Storage — Manage buckets and access keys
- CLI: Static Sites — Deploy and manage static sites
- CLI: Serverless Containers — Deploy and manage containers
- API Authentication — Create API tokens
Questions? Contact support at support@danubedata.ro