This guide walks you through setting up a complete DevStride development environment. By the end, you'll have a running local dev server, a personal cloud stage, and a database branch — everything you need to start building.
Before running ds setup, make sure the following tools are installed:
| Tool | Purpose | Install |
|---|---|---|
| Node.js (v22+) | Runtime for backend and CLI | brew install node or nvm |
| pnpm | Package manager | npm install -g pnpm |
| AWS CLI (v2) | Cloud operations | brew install awscli |
| Pulumi | Infrastructure-as-code | brew install pulumi |
| git | Version control | brew install git |
| Docker | Local DynamoDB | Docker Desktop |
| gh | GitHub CLI | brew install gh |
| tmux | Terminal multiplexer (optional, for split-pane terminal layouts) | brew install tmux |
ds help at any time to see all available commands grouped by category.Run the full automated setup:
ds setup
This kicks off a 10-step process that takes you from zero to a working environment. Here's what each step does:
The CLI verifies that all required tools are installed and accessible. If anything is missing, it tells you exactly what to install and how.
You'll be prompted to authenticate with AWS via SSO. This opens a browser window where you confirm the login. The CLI waits for the SSO token to be issued, then continues.
Logging in to AWS SSO...
Opening browser for authentication...
✓ AWS SSO session established
The CLI confirms you have access to:
If either check fails, contact a team lead for access.
Shared development API keys and configuration values are pulled from AWS Secrets Manager into your local .env file.
Pulling shared secrets to .env...
✓ 24 secrets written to .env
These include third-party API keys (Stripe, Pusher, Slack, Neon, GitHub), encryption keys, and other values needed for local development.
A personal PostgreSQL database branch is provisioned on Neon, forked from the main branch (which contains current staging data). Your DB_CONNECTION_STRING is automatically written to .env.
Creating Neon branch 'dev-phil-local'...
✓ Branch created, endpoint ready
✓ DB_CONNECTION_STRING updated in .env
This branch is tied to your fixed local stage (phil-local), not your git branch. Switching git branches does not affect your database.
ds deploy up) create separate, per-stage Neon branches automatically.pnpm install
Installs all Node.js dependencies for the monorepo (backend, frontend, CLI, infrastructure).
A new Pulumi stack is created for your local stage. The stack name matches your local stage (e.g., phil-local).
Initializing Pulumi stack 'phil-local'...
✓ Stack created in Pulumi Cloud
The CLI runs pulumi up directly to provision all AWS resources for your personal stage:
Running pulumi up... (this may take 5-10 minutes)
✓ Infrastructure deployed successfully.
API: https://api-phil-local.devstride.dev
UI: https://app-phil-local.devstride.dev
After provisioning, the CLI syncs Pulumi stack outputs to your local environment (bind cache) and pushes your configuration to Secrets Manager so the deployed Lambda functions can start.
Drizzle ORM migrations are applied to your Neon branch:
Running migrations...
✓ 47 migrations applied
Cognito test users are also seeded at this step so you can log in immediately.
The Vue/Quasar frontend is built and uploaded to S3. CloudFront is invalidated so the latest build is served immediately.
Your developer name, AWS profile, region, and stage are persisted in ~/.devstride/setup-state.json so the CLI remembers your configuration across sessions.
You can customize the setup with flags:
# Specify your stage name upfront (skip the interactive prompt)
ds setup --stage phil-local
# Skip infrastructure deployment (useful if you only need local dev)
ds setup --skip-deploy
# Skip database migrations (run them manually later)
ds setup --skip-migrations
After setup completes, verify everything is working:
# List your deployed stage
ds deploy list
# Start local development
ds local run backend
After a successful setup, you have:
| Resource | Location | Purpose |
|---|---|---|
.env | Project root | Local secrets and configuration |
~/.devstride/setup-state.json | Home directory | Persisted developer settings |
.ds/bind/{stage}-{region}.env | Project root | Cached infrastructure outputs |
| Neon branch | Neon Cloud | Personal PostgreSQL database |
| Pulumi stack | Pulumi Cloud | Infrastructure state |
| AWS resources | AWS account | API Gateway, Lambdas, S3, Cognito, etc. |
| Cognito users | AWS Cognito | Test accounts for login |
Setup configures these key environment variables:
| Variable | Example | Set By | Purpose |
|---|---|---|---|
DEVSTRIDE_DEVELOPER | phil | Shell config | Your developer identity |
DEVSTRIDE_STAGE | phil-local | ds wrapper (auto-computed) | Current stage — always {developer}-local |
DEVSTRIDE_REGION | us-east-1 | Shell config | AWS region |
AWS_PROFILE | devstride-dev | Shell config | AWS SSO profile name |
DB_CONNECTION_STRING | postgresql://... | .env | Neon database URL |
ENCRYPTION_KEY | (secret) | .env | Data encryption key |
COGNITO_USER_POOL_ID | us-east-1_xxx | .env | Auth pool ID |
COGNITO_USER_POOL_CLIENT_ID | xxx | .env | Auth client ID |
DEVSTRIDE_STAGE is computed automatically by the ds wrapper as {DEVSTRIDE_DEVELOPER}-local. You do not set it manually. This fixed local stage ensures that switching git branches never affects your local environment.
The CLI auto-detects expired sessions and prompts re-login. If you see this during setup, follow the browser prompt to re-authenticate.
If a branch with your stage name already exists, setup will reuse it and update your .env to point to it. No data is lost.
If you've previously run setup for the same stage, the existing stack is reused. Run ds deploy up to update it.
Setup is designed to be re-runnable. Simply run ds setup again — it will skip completed steps and resume where it left off.
Introduction to the ds CLI
Overview of the DevStride developer CLI — what it does, how it's structured, and core concepts every developer needs to know.
Developer Lifecycle
Day-to-day development workflows from starting a feature to deploying and tearing down — real-world scenarios and practical examples.