This guide walks through the real-world workflows you'll use daily. It follows a feature from inception through development, testing, deployment, and cleanup.
Here's the typical development cycle:
ds setup → One-time environment setup
↓
ds local run → Daily local development
↓
ds deploy up → Deploy to personal cloud stage for testing
↓
ds deploy down → Clean up when finished
Everything in between is managed by the ds CLI — database migrations, secret management, code generation, and maintenance.
You've been assigned a feature. Here's the complete workflow.
git checkout -b feature/user-notifications
Your local stage remains phil-local — switching branches does not change your local environment. The same Neon database, Pulumi stack, and bind cache are used regardless of which branch you're on.
ds local run
This launches both the backend (Hono, port 3001) and frontend (Vite, port 8080) in a tmux session with side-by-side panes.
tmux navigation:
Ctrl+B then ← / → — Switch between backend and frontend panesCtrl+B then D — Detach (servers keep running)F12 — Quit both serversds local run backend or ds local run frontend individually. Running ds local run again replaces the existing tmux session.Make your changes. If your feature involves:
.sql-entity.ts file, then generate and run a migration.If you modified a SQL entity:
# Generate the migration file from your schema changes
cd backend && pnpm generate-sql
# Apply it to your Neon branch
ds db migrate
Then restart your backend server to pick up the schema changes.
Adding a new command or query? Use the generators:
# Generate a command (e.g., SendNotification in the notification module)
ds local generate command SendNotification -m notification
# Generate a query (e.g., GetUserNotifications in the notification module)
ds local generate query GetUserNotifications -m notification
This creates the command/query artifact, DI init file, service handler, and Lambda handler — all wired up and ready to fill in.
After adding or modifying API endpoints:
ds api generate-api-client
This scans the backend Hono routes and generates a fully-typed TypeScript SDK in frontend/src/api/. The frontend can immediately use the new endpoints with full type safety.
When you're ready to test in an isolated cloud environment:
ds deploy up
Unlike local development (which always uses phil-local), cloud deployments create a branch-specific stage. The CLI computes a stage name from your developer name + branch, then dispatches a GitHub Actions workflow. Each cloud stage gets its own fully isolated AWS resources and Neon database branch.
Dispatching deploy-stage.yml...
Stage: phil-feature-user-notifications
Branch: feature/user-notifications
Building frontend... ✓
Bundling Lambdas... ✓
Running pulumi up... ✓
✓ Deployment complete
API: https://api-phil-feature-user-notifications.devstride.dev
UI: https://app-phil-feature-user-notifications.devstride.dev
After your PR is merged:
ds deploy down phil-feature-user-notifications
ds deploy down handles everything: empties S3 buckets, runs pulumi destroy, removes the Pulumi stack, cleans up Secrets Manager entries, and deletes the Neon database branch.
Not every task needs a feature branch or a cloud deploy. For ongoing work:
# Pull latest code
git checkout main && git pull
# Start local dev
ds local run
Your local stage (phil-local) persists across sessions and across branch switches. The database branch, infrastructure, and config are all still there from setup — switching to a feature branch and back won't affect them.
If a teammate's PR included database migrations:
# Pull their changes
git pull
# Run any new migrations
ds db migrate
# Restart backend to pick up schema changes
ds local run backend
After pulling new code and wanting to see it deployed:
ds deploy up
This is an incremental update — only changed resources are modified. Much faster than the initial deploy.
Sometimes you need a fresh database — maybe migrations got tangled, or you want clean staging data.
ds db reset
This resets your Neon branch to match the main branch data, then re-applies migrations. Your connection string stays the same — no .env changes needed. Restart your backend after.
ds db reset overwrites all data in your branch with a fresh copy from main. It's blocked on protected stages (dev, prod) and requires confirmation.Local development always uses your single phil-local stage. But when you need cloud environments for testing or review, ds deploy up creates isolated, branch-specific stages — each with its own AWS resources and Neon database branch.
# Feature A — deploy to cloud
git checkout feature/auth-improvements
ds deploy up
# → Deploys to stage: phil-feature-auth-improvements
# → Neon branch: dev-phil-feature-auth-improvements
# Feature B — deploy to cloud
git checkout feature/gantt-export
ds deploy up
# → Deploys to stage: phil-feature-gantt-export
# → Neon branch: dev-phil-feature-gantt-export
Each cloud stage is fully isolated with its own:
dev-phil-local branch)Meanwhile, ds local run on any of these branches still uses phil-local — your single, stable local environment.
List all your stages:
ds deploy list
When you're done with several stages:
# Interactive cleanup — finds stale stages
ds aws cleanup
# Or tear down specific stages
ds deploy down phil-feature-auth-improvements
ds deploy down phil-feature-gantt-export
ds aws cleanup is especially useful — it scans for stages that haven't been deployed in 14+ days and lets you select which ones to tear down.
Your deployed stage is showing errors. Here's how to investigate:
ds deploy list --stage phil-local
Shows resource details, URLs, and last activity timestamp.
ds db status
Shows which Neon branch you're connected to and its health.
ds doctor
Verifies tool presence, service access, and local health (.env, database connectivity, Pulumi stack).
# Make your fix locally, test it
ds local run
# Deploy the fix
ds deploy up
A third-party API key has rotated, or a new secret needs to be added.
ds setup secrets pull
Downloads the latest shared secrets from AWS Secrets Manager to your .env.
# Edit your .env with the new value, then push
ds setup secrets push
This uploads your .env values back to Secrets Manager so other developers can pull them.
ds setup secrets audit
Interactive mode that shows all required/optional secrets with their current status (configured, missing, or placeholder). Guides you through fixing missing values.
# Before making risky .env changes
ds setup env backup
# If something goes wrong
ds setup env restore
| Task | Command |
|---|---|
| Start local dev | ds local run |
| Run backend only | ds local run backend |
| Run frontend only | ds local run frontend |
| Deploy to cloud | ds deploy up |
| Tear down stage | ds deploy down |
| List all stages | ds deploy list |
| Run migrations | ds db migrate |
| Generate migration | cd backend && pnpm generate-sql |
| Fresh database | ds db reset |
| Branch status | ds db status |
| Generate API client | ds api generate-api-client |
| Generate command | ds local generate command <Name> -m <module> |
| Generate query | ds local generate query <Name> -m <module> |
| Pull secrets | ds setup secrets pull |
| Health check | ds doctor |
| Find stale stages | ds aws cleanup |
ds local run and code generation