tsdevstack (CLI)

tsdevstack is the command-line interface for the framework. It handles project scaffolding, local development config generation, cloud secret management, infrastructure deployment, database migrations, scheduled jobs, and CI/CD — across GCP, AWS, and Azure.

npm install tsdevstack

Shorthand alias: npx tsds <command> works anywhere npx tsdevstack <command> does.

What it does

The CLI is the single entry point for all framework operations. You never write Terraform, configure Docker Compose, or manage gateway routes manually — the CLI generates and deploys everything from your service definitions.

AreaWhat the CLI handles
Local devDocker Compose, Kong gateway config, secrets, Dockerfiles
ServicesAdd/remove NestJS backends, Next.js frontends, Rsbuild SPAs
StorageAdd/remove object storage buckets (MinIO locally, cloud-native in production)
SecretsLocal generation, cloud push/pull/diff with environment isolation
InfrastructureTerraform generation, planning, and deployment
DeploymentBuild Docker images, push to registry, deploy services, Kong, load balancer
DatabasePreview and apply Prisma migrations in cloud
Scheduled jobsDeploy, list, and remove cron-based jobs
WorkersRegister and deploy detached background workers
CI/CDGenerate GitHub Actions workflows; auto-detect private-npm-package auth (.npmrc → NPM_TOKEN wired through workflows + docker builds)
Client generationType-safe HTTP clients from OpenAPI specs

Commands

For the full command reference with syntax, options, and examples, see CLI Commands.

Local development

CommandDescription
syncRegenerate all config (Kong, docker-compose, secrets)
add-serviceAdd a NestJS, Next.js, or SPA service
remove-serviceRemove a service from the project
generate-kongRegenerate Kong gateway config from OpenAPI specs, and the gateway image files
generate-secretsRegenerate local secrets
generate-docker-composeRegenerate docker-compose.yml
generate-clientGenerate TypeScript API client from OpenAPI spec
add-bucket-storageAdd an object storage bucket
remove-bucket-storageRemove an object storage bucket

Cloud secrets

CommandDescription
cloud:initInitialize cloud provider (GCP, AWS, or Azure)
cloud-secrets:pushPush local secrets to cloud environment
cloud-secrets:diffCompare local vs cloud secrets
cloud-secrets:setSet or update a cloud secret
cloud-secrets:listList all secrets in cloud environment
cloud-secrets:removeRemove a cloud secret

Infrastructure & deployment

CommandDescription
infra:bootstrapBootstrap cloud project (enable APIs, add roles)
infra:initInitialize infrastructure (Terraform state bucket)
infra:generateGenerate Terraform files from config
infra:planPreview infrastructure changes
infra:deployFull deploy: Terraform + services + Kong + load balancer
infra:deploy-serviceBuild, push, and deploy a single service
infra:deploy-servicesBuild, push, and deploy all services
infra:deploy-kongDeploy Kong gateway
infra:deploy-lbDeploy load balancer
infra:statusCheck infrastructure status
infra:destroyDestroy all infrastructure for an environment

Database & scheduling

CommandDescription
infra:plan-db-migrateShow pending migrations for a service
infra:run-db-migrateApply pending migrations
infra:deploy-schedulersDeploy all scheduled jobs
infra:remove-schedulerRemove a scheduled job

CI/CD

CommandDescription
infra:init-ciInitialize CI/CD (GitHub Actions)
infra:generate-ciRegenerate CI workflows

Multi-cloud support

The same commands work across all three providers:

# These work identically regardless of provider
npx tsdevstack infra:deploy --env prod
npx tsdevstack cloud-secrets:push --env prod
npx tsdevstack infra:deploy-service auth-service --env prod

The provider is determined by your cloud:init configuration. No command-line flags needed.