Commands Reference

Complete reference for all dcupl CLI commands, options, and flags.

Global Options

These options work with all commands:

Option Description
--help, -h Show help for command
--version, -v Show CLI version
--verbose Enable verbose output
--quiet, -q Suppress non-essential output

Authentication Commands

login

Authenticate with dcupl Console.

dcupl login

Opens your browser for authentication. After successful login, credentials are stored locally for future commands.

Options:

Option Description
--no-browser Print login URL instead of opening browser

Example:

# Interactive login (opens browser)
dcupl login

# Server/headless environments
dcupl login --no-browser
# → Visit this URL to authenticate: https://console.dcupl.com/cli-auth?token=...

logout

Remove stored authentication credentials.

dcupl logout

whoami

Display current authenticated user.

dcupl whoami

Output:

Logged in as: user@example.com

Project Commands

init

Initialize a dcupl project in the current directory.

dcupl init [options]

Creates a dcupl.config.json file linking the directory to a Console project.

Options:

Option Description
--project-id Project ID (skip selection prompt)
--version Version to use (default: draft)
--force Overwrite existing config

Examples:

# Interactive setup
dcupl init

# Non-interactive
dcupl init --project-id abc123 --version draft

# Reinitialize existing project
dcupl init --force

projects list

List all accessible projects.

dcupl projects list

Output:

ID           Name                  Role
abc123       My E-commerce Store   owner
def456       Product Catalog       editor

status

Show sync status of local files compared to Console.

dcupl status

Output:

Project: abc123 (draft)

Modified:
  M models/product.model.json

New:
  A data/new-products.csv

Deleted:
  D data/old-products.csv

File Sync Commands

pull

Download files from Console to local directory.

dcupl pull [options]

Options:

Option Description
--version Version to pull (default: from config)
--force Overwrite local changes without prompting
--dry-run Show what would be downloaded

Examples:

# Pull draft version
dcupl pull

# Pull specific version
dcupl pull --version v1.0.0

# Preview changes
dcupl pull --dry-run

Output:

Pulling from project abc123 (draft)...
  ↓ models/product.model.json
  ↓ data/products.csv
  ↓ dcupl.lc.json
Done. 3 files downloaded.

push

Upload local files to Console.

dcupl push [options]

Options:

Option Description
--force Overwrite remote changes without prompting
--dry-run Show what would be uploaded
--message Add a change message

Examples:

# Push changes
dcupl push

# Preview changes
dcupl push --dry-run

# Push with message
dcupl push --message "Added inventory tracking"

# Force overwrite
dcupl push --force

Output:

Pushing to project abc123 (draft)...
  ↑ models/product.model.json (modified)
  ↑ data/new-products.csv (new)
Done. 2 files uploaded.

Configuration

config get

Get a configuration value.

dcupl config get <key>

Available keys:

Key Description
projectId Current project ID
version Current version
apiUrl API endpoint URL

Example:

dcupl config get projectId
# → abc123

config set

Set a configuration value.

dcupl config set <key> <value>

Example:

dcupl config set version v1.0.0

config list

List all configuration values.

dcupl config list

Output:

projectId: abc123
version: draft
apiUrl: https://api.dcupl.com

Environment Variables

The CLI respects these environment variables:

Variable Description Example
DCUPL_PROJECT_ID Override project ID abc123
DCUPL_API_KEY CLI API key for auth key_xxx
DCUPL_VERSION Override version draft
DCUPL_API_URL Custom API endpoint https://api.dcupl.com

Environment variables take precedence over config file values.

CI/CD Example:

GitHub Actions
export DCUPL_PROJECT_ID=${{ secrets.DCUPL_PROJECT_ID }}
export DCUPL_API_KEY=${{ secrets.DCUPL_API_KEY }}

dcupl push

Exit Codes

The CLI uses standard exit codes:

Code Meaning
0 Success
1 General error
2 Invalid arguments
3 Authentication required
4 Network error
5 Conflict (local/remote changes)

Command Chaining

Commands can be chained in scripts:

deploy.sh
#!/bin/bash
set -e

# Ensure we have latest
dcupl pull

# Run tests
npm test

# Push if tests pass
dcupl push --message "Automated deploy $(date)"

See Also