@duffcloudservices/cli
v0.1.1
Published
CLI for DCS site onboarding and configuration
Maintainers
Readme
@duffcloudservices/cli
Command-line interface for initializing and managing DCS (Duff Cloud Services) customer sites.
Installation
npm install -g @duffcloudservices/cli
# or
pnpm add -g @duffcloudservices/cliQuick Start
# 1. Authenticate with Google OAuth
dcs login
# 2. Initialize a new customer site
cd /path/to/customer-site
dcs init --site-slug my-site --site-name "My Site"
# 3. Validate configuration
dcs validate
# 4. Generate integration plans
dcs plansCommands
Authentication
# Login with Google OAuth (device flow)
dcs login
# Check current user
dcs whoami
# Logout and clear credentials
dcs logoutSite Management
# List sites you have access to
dcs sites list
# Show details for a specific site
dcs sites show my-siteInitialization
# Initialize DCS integration in current directory
dcs init --site-slug my-site --site-name "My Site"
# Specify target directory
dcs init -s my-site -n "My Site" -t ./my-site
# Specify framework (vue or astro)
dcs init -s my-site -n "My Site" -f astro
# Preview without creating files
dcs init -s my-site -n "My Site" --dry-run
# Overwrite existing files
dcs init -s my-site -n "My Site" --forceValidation
# Validate .dcs configuration files
dcs validate
# Validate a specific directory
dcs validate -t ./my-site
# Show verbose output
dcs validate -vIntegration Plans
# Generate AI-assisted integration plans
dcs plans
# Regenerate existing plans
dcs plans --forceGenerated Files
The init command creates the following structure:
.dcs/
├── site.yaml # Site identity and Azure config
├── pages.yaml # Page registry for CMS
├── content.yaml # Text content (managed by Portal)
├── seo.yaml # SEO configuration (managed by Portal)
└── SECTION-CONVENTIONS.md
.github/
└── copilot-instructions.md
.plans/
├── README.md
├── 00-audit-site.md
├── 01-create-use-text-content.md
├── 02-integrate-home-page.md
├── 03-integrate-remaining-pages.md
├── 04-capture-snapshots.md
└── 05-verify-deployment.mdAuthentication Flow
The CLI uses OAuth 2.0 Device Authorization Grant (RFC 8628):
- Run
dcs login - CLI displays a URL and code
- Open URL in browser, enter code
- Sign in with Google
- CLI receives and stores tokens securely
Tokens are stored encrypted in your OS keychain/credential store.
Site Access Validation
Before creating configuration files, the CLI validates:
- You're authenticated
- You have access to the specified site (or can create it)
- You have editor/admin permissions
This prevents creating configs for sites you don't have access to.
Next Steps After Init
- Install CMS package:
pnpm add @duffcloudservices/cms - Configure Vite plugins in your build config
- Follow the plans in
.plans/directory - Register site in DCS Portal
Requirements
- Node.js >= 18.0.0
- DCS Portal account with Google OAuth
License
MIT © Duff Cloud Services
