Skip to main content
Forge Docs
Commands

/nxtg-forge:deploy

Deploy with comprehensive pre-flight validation -- type checking, tests, security audit, build verification, and git cleanliness.

stage: preview

Public preview: free to install. The plugin is open source (MIT) and the orchestrator is source-available (FSL-1.1). Interfaces may change.

LevelL1 Vibe Coder
CategoryQuality & Testing
Syntax/nxtg-forge:deploy [--validate-only] [--dry-run] [--skip-tests]

What It Does

/nxtg-forge:deploy is the safety-first deployment command. Before any deployment action occurs, it runs a five-point pre-flight validation: TypeScript compilation, full test suite, security audit, git cleanliness check, and production build. Each check produces a PASS or FAIL result, and the overall verdict is READY or NOT READY. If any check fails, deployment is blocked with specific guidance on what to fix.

When all checks pass and you confirm, the command creates a pre-deployment checkpoint (so you can roll back), executes the build, and runs your project's deploy script. If no deploy script exists in package.json, it suggests common deployment targets: Vercel, Netlify, Docker, or custom SCP. After deployment, it shows the version, commit hash, branch, and checkpoint ID for rollback.

Without this command, deployment is a manual checklist: run tests, check types, audit dependencies, verify git is clean, build, deploy, hope nothing was missed. /nxtg-forge:deploy enforces the checklist programmatically and creates an automatic rollback point.

Syntax & Options

/nxtg-forge:deploy [--validate-only] [--dry-run] [--skip-tests]
OptionDescription
--validate-onlyRun all pre-deployment checks without deploying. Useful as a CI gate.
--dry-runShow what would happen at each step without executing any actions
--skip-testsSkip the test suite execution (not recommended; the command warns you)

When to Use It

  • Before any production deployment: Run the full pipeline to catch issues before they reach users.
  • As a CI validation gate: Use --validate-only to run all checks without deploying, suitable for pull request checks.
  • After a sprint of changes: When you have accumulated multiple commits and want to deploy with confidence.

For just running tests, use /nxtg-forge:test. For just checking project health, use /nxtg-forge:status.

Examples

Example 1: Full Deployment Pipeline

/nxtg-forge:deploy
PRE-DEPLOYMENT VALIDATION
===========================

  TypeScript:  PASS
  Tests:       PASS - 47/47 passing
  Security:    WARN - 2 moderate vulnerabilities
  Git:         CLEAN
  Build:       PASS

  Overall: READY

All checks passing. Ready to deploy.

After confirmation, it creates a checkpoint, builds, and deploys.

Example 2: Validation Only

/nxtg-forge:deploy --validate-only

Runs all five checks and reports results without deploying. Stops after the validation summary.

Example 3: Failed Validation

/nxtg-forge:deploy
PRE-DEPLOYMENT VALIDATION
===========================

  TypeScript:  FAIL - 3 errors
  Tests:       FAIL - 2/47 failing
  Security:    PASS
  Git:         DIRTY - 5 uncommitted
  Build:       FAIL

  Overall: NOT READY

Deployment blocked:
  - 3 TypeScript errors
  - 2 failing tests
  - 5 uncommitted files

Fix these issues before deploying:
  /nxtg-forge:test    Fix failing tests
  /nxtg-forge:optimize  Address code issues

Power Use Cases

Chain /nxtg-forge:checkpoint save pre-deploy then /nxtg-forge:deploy to create a named checkpoint before the deployment's automatic checkpoint. This gives you two rollback points: one at your explicit save and one at the deployment start.

Use --validate-only in a pre-push hook script to enforce deployment readiness before code leaves your machine.

Combines With

FeatureSynergy
/nxtg-forge:testDeploy runs tests internally; use test for standalone debugging
/nxtg-forge:checkpointAutomatic pre-deploy checkpoint enables rollback via /nxtg-forge:restore
/nxtg-forge:restoreRoll back to the pre-deploy checkpoint if the deployment causes issues
/nxtg-forge:statusVerify health metrics after deployment
devops agentFor complex deployment configurations, assign the devops agent

Level Progression

LevelWhat You Get
L1 Vibe CoderFull pre-flight validation, build, and deploy with automatic checkpointing
L2 Pro BuilderDeployment events recorded in orchestrator audit trail; drift check run post-deploy
L3 Ship LordDeployment status and history visible in the forge-ui dashboard

Tips & Gotchas

  • The deploy command looks for a "deploy" script in package.json. If none exists, it shows you how to add one for common platforms.
  • The automatic checkpoint is named pre-deploy-{timestamp}. Use /nxtg-forge:restore pre-deploy-{timestamp} to roll back.
  • --skip-tests is available but explicitly discouraged. The command warns you when you use it.
  • Security warnings (moderate vulnerabilities) do not block deployment by default, but critical and high vulnerabilities do.

See also: test | checkpoint | restore

NXTG-Forge|NXTG.AI|GitHub
Plugin: MIT · Orchestrator and dashboard: FSL-1.1-ALv2