Configuration Reference
Complete reference for dcupl CLI configuration options.
Configuration File
The CLI uses a dcupl.config.json file in your project directory. This file is created by dcupl init.
Location
The CLI searches for config in this order:
./dcupl.config.json(current directory)- Parent directories (walks up to root)
~/.dcupl/config.json(global fallback)
File Structure
{
"projectId": "your-project-id",
"version": "draft",
"apiUrl": "https://api.dcupl.com",
"ignore": [
"node_modules",
".git",
"*.log"
]
}Configuration Options
projectId
Required. The Console project identifier.
| Property | Value |
|---|---|
| Type | string |
| Default | none |
| Env var | DCUPL_PROJECT_ID |
{
"projectId": "abc123"
}Find your project ID in Console → Project Settings.
version
The file version to sync with.
| Property | Value |
|---|---|
| Type | string |
| Default | "draft" |
| Env var | DCUPL_VERSION |
{
"version": "draft"
}Common values:
| Version | Use Case |
|---|---|
draft |
Development and editing |
published |
Stable production version |
v1.0.0 |
Specific tagged version |
apiUrl
The dcupl Console API endpoint.
| Property | Value |
|---|---|
| Type | string |
| Default | "https://api.dcupl.com" |
| Env var | DCUPL_API_URL |
{
"apiUrl": "https://api.dcupl.com"
}Only change this for enterprise or self-hosted deployments.
ignore
Files and directories to exclude from sync.
| Property | Value |
|---|---|
| Type | string[] |
| Default | [] |
| Env var | none |
{
"ignore": [
"node_modules",
".git",
"*.log",
"*.tmp",
".env*",
"build/",
"dist/"
]
}Pattern syntax:
| Pattern | Matches |
|---|---|
*.log |
All .log files |
node_modules |
Directory named node_modules |
build/ |
Directory named build and contents |
.env* |
Files starting with .env |
**/*.tmp |
All .tmp files in any subdirectory |
defaultApplication
Default application key for commands that support it.
| Property | Value |
|---|---|
| Type | string |
| Default | "default" |
| Env var | none |
{
"defaultApplication": "production"
}Environment Variables
Environment variables override config file values. This is useful for CI/CD and different environments.
Available Variables
| Variable | Overrides | Description |
|---|---|---|
DCUPL_PROJECT_ID |
projectId |
Project identifier |
DCUPL_API_KEY |
- | Authentication key |
DCUPL_VERSION |
version |
Version to sync |
DCUPL_API_URL |
apiUrl |
API endpoint |
Precedence
Configuration is resolved in this order (highest to lowest):
- Command-line flags (
--project-id) - Environment variables (
DCUPL_PROJECT_ID) - Local config file (
./dcupl.config.json) - Global config file (
~/.dcupl/config.json) - Built-in defaults
CI/CD Example
name: Deploy to dcupl
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dcupl CLI
run: npm install -g @dcupl/cli
- name: Push to dcupl
env:
DCUPL_PROJECT_ID: ${{ secrets.DCUPL_PROJECT_ID }}
DCUPL_API_KEY: ${{ secrets.DCUPL_API_KEY }}
run: dcupl pushExample Configurations
Minimal
{
"projectId": "abc123"
}Development
{
"projectId": "abc123",
"version": "draft",
"ignore": [
"node_modules",
".git",
"*.log",
".env*"
]
}Production Pipeline
{
"projectId": "abc123",
"version": "v1.0.0",
"ignore": [
"node_modules",
".git",
"*.log",
".env*",
"test/",
"*.spec.ts"
]
}Multi-Environment Setup
Use environment variables to switch between configurations:
export DCUPL_VERSION=draft
dcupl pushexport DCUPL_VERSION=v1.0.0
dcupl pullValidating Configuration
Check your configuration is valid:
dcupl config listOutput:
Configuration (./dcupl.config.json):
projectId: abc123
version: draft
apiUrl: https://api.dcupl.com
ignore: ["node_modules", ".git", "*.log"]
Environment overrides:
DCUPL_API_KEY: set (hidden)Security Best Practices
Do
- Store API keys in environment variables or secrets managers
- Add
dcupl.config.jsonto version control (it doesn't contain secrets) - Use different API keys for dev/staging/production
Don't
- Store API keys in
dcupl.config.json - Commit
.envfiles with API keys - Share API keys between team members (each person should have their own)
See Also
- Installation - Initial CLI setup
- Commands Reference - All CLI commands
- CI/CD Workflows - Automation examples