Cli
Studio CLI
Command-line interface reference for studio.do - Custom-branded Payload Content Management System (CMS) for admin and content
Studio CLI
Custom-branded Payload Content Management System (CMS) for admin and content
Installation
# Install globally
npm install -g do
# Or use via npx
npx do --versionQuick Start
# Basic usage
do cms studio manage postsCommands
Main Command
do cms studio manage postsDescription: Custom-branded Payload Content Management System (CMS) for admin and content
Usage:
do studio [options]Options
Global Options
--help, -h- Show help--version, -v- Show version--verbose- Verbose output--quiet, -q- Quiet mode--json- JSON output--config <file>- Config file path
Command-Specific Options
do studio \
--option1=value1 \
--option2=value2 \
--verboseUsage Examples
Basic Example
# Simple usage
do cms studio manage postsWith Options
# With configuration
do cms studio manage posts --verbose --jsonInteractive Mode
# Interactive prompts
do studio --interactiveBatch Operations
# Process multiple items
do studio --batch items.jsonPipeline Integration
# Use with pipes
cat data.json | do studio --stdin | jq '.'Configuration
Config File
Create .doconfig in your project:
{
"studio": {
"option1": "value1",
"option2": "value2"
}
}Environment Variables
export DO_STUDIO_OPTION1=value1
export DO_STUDIO_OPTION2=value2
do cms studio manage postsOutput Formats
Default Output
do cms studio manage posts
# ✓ Operation completed
# Result: ...JSON Output
do cms studio manage posts --json
# {
# "success": true,
# "result": { ... }
# }Verbose Output
do cms studio manage posts --verbose
# → Starting operation...
# → Processing...
# → Completed in 1.2sScripting
Bash Scripts
#!/bin/bash
# Check if successful
if do cms studio manage posts; then
echo "Success!"
else
echo "Failed!"
exit 1
fiCI/CD Integration
# GitHub Actions
- name: Run Studio
run: |
do cms studio manage posts \
--config prod.json \
--quietError Handling
Exit Codes
0- Success1- General error2- Invalid arguments3- Timeout4- Not found
Error Messages
# Capture errors
do cms studio manage posts 2>errors.log
# Handle errors
if ! do cms studio manage posts; then
echo "Error occurred, check errors.log"
exit 1
fiDebugging
# Debug mode
DEBUG=* do cms studio manage posts
# Dry run
do cms studio manage posts --dry-run
# Verbose + timing
time do cms studio manage posts --verboseBest Practices
- Use Config Files - Store configuration in
.doconfig - Environment Variables - Use for sensitive data
- Error Handling - Check exit codes in scripts
- JSON Output - Use
--jsonfor parsing results - Verbose Mode - Use
--verbosefor debugging