Getting Started with the CLI
Create a local dcupl project, sync it with Console, and make your first changes.
Prerequisites
- CLI installed and authenticated (
dcupl login) - A dcupl Console account with at least one project
Step 1: Create a Project Directory
Create a folder for your dcupl project:
mkdir my-dcupl-project
cd my-dcupl-projectStep 2: Initialize the Project
Connect this directory to a Console project:
dcupl initThe CLI prompts you to:
- Select a project - Choose from your Console projects
- Select a version - Usually
draftfor development
This creates a dcupl.config.json file linking the directory to your Console project.
Alternative: Initialize with Options
Skip prompts by providing options directly:
dcupl init --project-id abc123 --version draftStep 3: Pull Existing Files
Download the current project files from Console:
dcupl pullYour directory now contains the project files:
my-dcupl-project/
├── dcupl.config.json # CLI configuration
├── dcupl.lc.json # Loader configuration
├── models/
│ └── product.model.json
└── data/
└── products.csvStep 4: Make Changes Locally
Edit files using your preferred editor. For example, add a property to a model:
{
"key": "Product",
"properties": [
{ "key": "name", "type": "string" },
{ "key": "price", "type": "float" },
{ "key": "inStock", "type": "boolean" }
]
}Step 5: Push Changes to Console
Upload your changes:
dcupl pushThe CLI shows which files changed:
Pushing to project abc123 (draft)...
↑ models/product.model.json (modified)
Done. 1 file updated.Open Console to see your changes reflected immediately.
Complete Workflow Example
Here's a typical development session:
# Start of session - get latest from Console
dcupl pull
# Check what files exist
ls -la
# Edit files...
code .
# See what changed locally
dcupl status
# Push changes
dcupl push
# Continue editing and pushing as neededProject Structure
After initialization, your project has this structure:
| File/Folder | Purpose |
|---|---|
dcupl.config.json |
CLI configuration (project ID, version) |
dcupl.lc.json |
Loader configuration (models, resources, apps) |
models/ |
Model definition files |
data/ |
Data files (CSV, JSON) |
workflows/ |
Workflow definitions (if using workflows) |
Working with Versions
dcupl projects have two main versions:
- draft - Working version for development
- published - Stable version for production
# Pull draft version (default)
dcupl pull
# Pull published version
dcupl pull --version published
# Push to draft
dcupl push
# Note: Publishing requires Console UI or APITeam Collaboration
When working with a team:
- Always pull before editing - Get the latest changes
- Push frequently - Avoid merge conflicts
- Use Git - Track your dcupl configs in version control
# Morning: Get latest from Console
dcupl pull
# Commit to Git after pulling
git add .
git commit -m "Sync with Console"
# After local changes
dcupl push
git add .
git commit -m "Add inStock property to Product"What's Next?
Now that you have a working project:
- Commands Reference - Learn all available commands
- Configuration - Customize CLI behavior
- CI/CD Workflows - Automate with pipelines
- Console Overview - Explore the web interface