Skip to main content
The /deploy command handles production deployment with comprehensive pre-flight checks, deployment execution, and verification. It ensures your application is ready for production before deploying.

Sub-commands

/deploy            # Interactive deployment wizard
/deploy check      # Run pre-deployment checks only
/deploy preview    # Deploy to preview/staging
/deploy production # Deploy to production
/deploy rollback   # Rollback to previous version

When to use this

Ready to ship

All tests pass and features are complete

After testing

You’ve verified everything works

Production releases

Deploying to live environment

Staging deploys

Testing in staging before production

Pre-deployment checklist

Before any deployment, the system verifies:

Code Quality

  • No TypeScript errors (npx tsc --noEmit)
  • ESLint passing (npx eslint .)
  • All tests passing (npm test)

Security

  • No hardcoded secrets
  • Environment variables documented
  • Dependencies audited (npm audit)

Performance

  • Bundle size acceptable
  • No console.log statements
  • Images optimized

Documentation

  • README updated
  • CHANGELOG updated
  • API docs current

Deployment flow

1

Pre-flight checks

Run all quality, security, and performance checks
2

Build application

Create production-optimized build
3

Deploy to platform

Push to Vercel, Railway, Fly.io, or your chosen platform
4

Health check & verify

Confirm deployment succeeded and services are healthy

Output format

Successful deploy

## 🚀 Deployment Complete

### Summary
- **Version:** v1.2.3
- **Environment:** production
- **Duration:** 47 seconds
- **Platform:** Vercel

### URLs
- 🌐 Production: https://app.example.com
- 📊 Dashboard: https://vercel.com/project

### What Changed
- Added user profile feature
- Fixed login bug
- Updated dependencies

### Health Check
✅ API responding (200 OK)
✅ Database connected
✅ All services healthy

Failed deploy

## ❌ Deployment Failed

### Error
Build failed at step: TypeScript compilation

### Details
error TS2345: Argument of type 'string' is not assignable...

### Resolution
1. Fix TypeScript error in src/services/user.ts:45
2. Run npm run build locally to verify
3. Try /deploy again

### Rollback Available
Previous version (v1.2.2) is still active.
Run /deploy rollback if needed.

Platform support

PlatformCommandNotes
Vercelvercel --prodAuto-detected for Next.js
Railwayrailway upNeeds Railway CLI
Fly.iofly deployNeeds flyctl
Dockerdocker compose up -dFor self-hosted

Usage examples

/deploy
Interactive deployment with all checks
/deploy check
Run pre-flight checks without deploying
/deploy preview
Deploy to staging/preview environment
/deploy production --skip-tests
Deploy directly to production (use with caution)
/deploy rollback
Revert to previous version
  • /test - Run tests before deployment
  • /status - Check project status
  • /preview - Test locally before deploying

Build docs developers (and LLMs) love