Developer Docs

Command Reference

Complete reference of every ds CLI command with usage, flags, and descriptions.

Command Reference

This is the complete reference for every ds command. Commands are organized by category, matching the interactive menu structure.


Setup & Configuration

ds setup

Full automated development environment setup. Creates a fixed local stage ({developer}-local) with its own Neon database branch and Pulumi stack. Runs 11 steps: pre-flight checks, AWS SSO auth, access verification, secrets fetch, Neon branch provisioning, dependency install, Pulumi stack init, CI deploy, migrations, user seeding, and state save.

ds setup [options]
FlagDescription
--stage <name>Stage name (skip interactive prompt)
--skip-deploySkip infrastructure deployment
--skip-migrationsSkip database migrations

ds setup secrets pull

Pull shared development secrets from AWS Secrets Manager to .env.

ds setup secrets pull [options]
FlagDescription
--neonAlso provision a Neon database branch

ds setup secrets push

Push local .env values to AWS Secrets Manager for other developers.

ds setup secrets push

ds setup secrets audit

Interactive secrets browser showing all required/optional secrets with status and guided fix prompts.

ds setup secrets audit [options]
FlagDescription
--ciNon-interactive readiness check

ds setup env backup

Create a timestamped backup of .env.

ds setup env backup

ds setup env restore

Restore .env from a previous backup. Shows available backups with age and key count.

ds setup env restore

ds doctor

Diagnose development environment health. Checks tool presence, service access, and local configuration.

ds doctor

ds help

Show all CLI commands grouped by category.

ds help

ds menu

Open the interactive command menu. Same as running ds with no arguments.

ds menu

Local Development

ds local run

Start backend and frontend in a tmux session with side-by-side panes.

ds local run

ds local run backend

Start the Hono API server on port 3001 with hot reload.

ds local run backend [options]
FlagDescription
--skip-preflightSkip preflight checks and pnpm install

ds local run frontend

Start the Vite dev server on port 8080 with HMR.

ds local run frontend

ds local generate command

Generate CQRS command boilerplate (command artifact, init, service handler, Lambda handler).

ds local generate command <CommandName> -m <module> [options]
FlagDescription
-m, --module <name>Module name (required)
-f, --forceOverwrite existing files

ds local generate query

Generate CQRS query boilerplate.

ds local generate query <QueryName> -m <module> [options]
FlagDescription
-m, --module <name>Module name (required)
-f, --forceOverwrite existing files

Database

ds db migrate

Run pending Drizzle ORM SQL migrations.

ds db migrate [options]
FlagDescription
--target <stage>Target stage (default: $DEVSTRIDE_STAGE)

ds db reset

Reset your Neon branch to match main, then re-apply migrations. Uses Neon's copy-on-write restore — your connection string stays the same.

ds db reset [options]
FlagDescription
--target <stage>Target stage

ds db status

Show active Neon branch and connection details.

ds db status [options]
FlagDescription
--target <stage>Target stage
--jsonMachine-readable output

ds db audit

Interactive Neon branch explorer. Cross-references branches with Pulumi stacks, flags marooned branches. Select a branch to view details or press d to delete.

ds db audit [options]
FlagDescription
--jsonMachine-readable output

ds db refresh-staging

Copy organization data from production to staging main Neon branch via GitHub Actions.

ds db refresh-staging [options]
FlagDescription
-o, --organization <id>Organization ID (default: demo org)

Deployment

ds deploy up

Deploy infrastructure via GitHub Actions. Creates a branch-specific cloud stage ({developer}-{branch}) with its own AWS resources and Neon database branch — fully isolated from your local stage.

ds deploy up [branch] [options]
FlagDescription
--stage <name>Stage name
--branch <name>Branch name
--route <label>DNS label / final stage name
--new-stackAllow second stack for same branch

ds deploy down

Tear down infrastructure and clean up all resources.

ds deploy down [stage] [options]
FlagDescription
--keep-stackKeep Pulumi stack state
--keep-neonKeep Neon database branch
--dry-runPreview without executing

ds deploy list

List deployed Pulumi stages with resource details.

ds deploy list [options]
FlagDescription
--stage <name>Show details for single stage
--region <region>Filter by region
--jsonMachine-readable output
-w, --watchLive-updating table (polls every 10s)

API Tools

ds api generate-api-client

Generate typed TypeScript API client SDK from backend Hono routes.

ds api generate-api-client

Output: frontend/src/api/


ds api generate-api-docs

Generate OpenAPI spec with embedded documentation.

ds api generate-api-docs

Output: backend/src/modules/api/interface-adapters/lambda/http/openapi.json


Integrations

ds integrations stripe sync-products

Sync subscription tiers and pricing to Stripe.

ds integrations stripe sync-products

ds integrations stripe sync-customers

Create Stripe customers and free-tier subscriptions for organizations.

ds integrations stripe sync-customers [options]
FlagDescription
-o, --organization <id>Target a single organization

ds integrations stripe check-quantities

Audit subscription seat counts and export CSV.

ds integrations stripe check-quantities [options]
FlagDescription
-o, --organization <id>Audit a single organization

Output: subscription_quantity.csv


ds integrations slack backfill-notifications

Provision Slack notification workflows for all users.

ds integrations slack backfill-notifications

Utilities

ds utils maintenance-mode enable

Enable maintenance mode on all Lambda functions.

ds utils maintenance-mode enable

ds utils maintenance-mode disable

Disable maintenance mode.

ds utils maintenance-mode disable

ds utils repair item-aggregations

Recalculate item, board, and work type aggregations.

ds utils repair item-aggregations [options]
FlagDescription
--target <stage>Target stage
-o, --organization <id>Organization ID

ds utils repair item-hierarchy

Rebuild item hierarchy path metadata.

ds utils repair item-hierarchy [options]
FlagDescription
--target <stage>Target stage
-o, --organization <id>Organization ID

ds utils repair min-max-dates

Recalculate rolled-up start/end dates on parent items.

ds utils repair min-max-dates [options]
FlagDescription
--target <stage>Target stage

ds utils query-active-emails

Export active user emails to CSV.

ds utils query-active-emails [options]
FlagDescription
--target <stage>Target stage

Output: emails.csv, emails.txt


ds utils delete-orphaned-items

Delete orphaned items with cascading cleanup.

ds utils delete-orphaned-items [options]
FlagDescription
--target <stage>Target stage
--dry-runPreview without deleting

ds utils check missing-inits

Audit Command/Query handler registrations. Finds unregistered handlers.

ds utils check missing-inits

ds utils check missing-correlation-ids

Audit correlation ID usage in handlers.

ds utils check missing-correlation-ids

ds utils check missing-event-handlers

Audit event handler registrations (domain events, integration events, FIFO handlers, webhooks).

ds utils check missing-event-handlers

AWS Operations

ds aws cleanup

Discover and destroy orphaned personal stages.

ds aws cleanup [options]
FlagDescription
--region <regions>Comma-separated regions to scan
--stale-days <n>Days since last deploy to flag stale (default: 14)
--dry-runPreview without deleting
--include-neonAlso delete Neon database branches
--stages <list>Target specific stages
--forceSkip interactive confirmation

ds aws audit

Inventory all deployed AWS resources by stage and service.

ds aws audit [options]
FlagDescription
--region <region>Scan a specific region
--jsonMachine-readable output
--verboseList individual resource names

Legacy Compatibility

These commands exist for backward compatibility with the SEED CI pipeline. They map directly to their modern equivalents.

Legacy CommandMaps To
ds migrations run-sqlds db migrate
ds migrations runds db migrate
ds script generate-api-docsds api generate-api-docs
ds script set-configInternal set-config function