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 loginOpens 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 logoutwhoami
Display current authenticated user.
dcupl whoamiOutput:
Logged in as: user@example.comProject 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 --forceprojects list
List all accessible projects.
dcupl projects listOutput:
ID Name Role
abc123 My E-commerce Store owner
def456 Product Catalog editorstatus
Show sync status of local files compared to Console.
dcupl statusOutput:
Project: abc123 (draft)
Modified:
M models/product.model.json
New:
A data/new-products.csv
Deleted:
D data/old-products.csvFile 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-runOutput:
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 --forceOutput:
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
# → abc123config set
Set a configuration value.
dcupl config set <key> <value>Example:
dcupl config set version v1.0.0config list
List all configuration values.
dcupl config listOutput:
projectId: abc123
version: draft
apiUrl: https://api.dcupl.comEnvironment 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:
export DCUPL_PROJECT_ID=${{ secrets.DCUPL_PROJECT_ID }}
export DCUPL_API_KEY=${{ secrets.DCUPL_API_KEY }}
dcupl pushExit 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:
#!/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
- Configuration - Configuration file reference
- CI/CD Workflows - Automation examples