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.

Bash
npm install -g @danubedata/cli

Verify the installation:

Bash
danube --version

Authentication

Bash
danube auth

Opens your browser to log in and authorize the CLI automatically — no manual token copying.

Interactive login

Bash
danube login

You will be prompted to enter your API token. To create a token:

  1. Log in to the DanubeData dashboard
  2. Go to Settings > API Tokens
  3. Click Create New Token and copy the token

Token flag

Bash
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.

Bash
export DANUBE_TOKEN="your-api-token"

Check your identity

Bash
danube whoami

Shows your name, email, and team memberships.

Log out

Bash
danube logout

Removes stored credentials from ~/.danube/config.json.

Configuration

Credentials

Stored at ~/.danube/config.json with 0600 permissions:

JSON
{
  "token": "your-api-token"
}

Project configuration

Created by danube pages link, stored at .danube/project.json:

JSON
{
  "siteId": 42,
  "teamId": 1,
  "siteName": "my-portfolio",
  "defaultDomain": "my-portfolio-abc.pages.danubedata.ro"
}

Build configuration

Optional danube.json in your project root:

JSON
{
  "outputDir": "dist",
  "ignore": ["*.map", "test/**"]
}
  • outputDir — Directory to deploy (default: current directory)
  • ignore — Additional file patterns to exclude from the deployment

Environment variables

VariableDescription
DANUBE_TOKENAPI token (alternative to danube login)
DANUBE_API_BASEOverride API base URL (default: https://danubedata.ro)
DANUBE_SITE_IDSite ID for headless CI/CD (skips interactive linking)
DANUBE_TEAM_IDTeam ID for headless CI/CD
DANUBE_SITE_NAMESite name for headless CI/CD
CISuppresses update notifications
DANUBE_NO_UPDATE_CHECKSuppresses update notifications

Commands overview

General

CommandDescription
danube authAuthenticate via browser (recommended)
danube loginAuthenticate with an API token
danube logoutRemove stored credentials
danube whoamiShow current user and teams

VPS Instances (danube vps)

CommandDescription
danube vps lsList all VPS instances
danube vps createCreate 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 imagesList available OS images

Object Storage (danube storage)

CommandDescription
danube storage buckets lsList all buckets
danube storage buckets createCreate 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 lsList all access keys
danube storage keys createCreate a new access key
danube storage keys get <id>Show access key details
danube storage keys revoke <id>Revoke an access key

Static Sites (danube pages)

CommandDescription
danube pages linkLink current directory to a static site
danube pages deployDeploy static site files
danube pages deployments lsList deployments
danube pages deployments rollback <rev>Roll back to a previous deployment
danube pages domains lsList 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)

CommandDescription
danube rapids lsList serverless containers
danube rapids createCreate 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:

  1. .git, node_modules, .danube (always excluded)
  2. Patterns from .gitignore
  3. Patterns from .daubeignore (custom ignore file)
  4. Extra patterns from danube.json ignore field

CI/CD usage

For automated deployments without interactive prompts, set environment variables:

Bash
export DANUBE_TOKEN="your-api-token"
export DANUBE_SITE_ID="42"
export DANUBE_TEAM_ID="1"

danube pages deploy --dir ./dist --no-wait

GitHub Actions example

YAML
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

The CLI checks for updates automatically (once per 24 hours). Notifications are suppressed in CI environments or when DANUBE_NO_UPDATE_CHECK is set.

Exit codes

CodeMeaning
0Success
1Error (authentication, API, validation)
130Interrupted (Ctrl+C during polling)

Next steps


Questions? Contact support at support@danubedata.ro