| name | nx-commands |
| description | Nx command reference for common tasks. Use when running builds, tests, linting, or any Nx workspace operations. |
Nx Commands Reference
Always use pnpm nx instead of bare nx
Development
pnpm nx serve auth-server
pnpm nx serve auth-server --configuration=development
Building
pnpm nx build auth-server
pnpm nx run-many -t build --all
pnpm nx affected -t build
Testing
pnpm nx test {project-name}
pnpm nx test {project-name} --watch
pnpm nx run-many -t test --all
pnpm nx affected -t test
pnpm nx run-many -t test --all --coverage
Linting
pnpm nx lint {project-name}
pnpm nx run-many -t lint --all
pnpm nx affected -t lint
Type Checking
pnpm nx typecheck {project-name}
pnpm nx run-many -t typecheck --all
Database (infra-db)
pnpm nx run infra-db:db:generate
pnpm nx run infra-db:db:migrate
pnpm nx run infra-db:db:studio
pnpm nx run infra-db:db:push
pnpm nx run infra-db:db:seed
pnpm nx run infra-db:db:drop
Workspace
pnpm nx graph
pnpm nx affected:graph
pnpm nx show projects
pnpm nx show project {name}
pnpm nx reset
CI/CD
pnpm nx affected -t lint test build
pnpm nx run-many -t test --parallel=3
pnpm nx affected -t test --base=origin/main --head=HEAD
Troubleshooting
pnpm nx reset
pnpm nx test {project} --skip-nx-cache
NX_VERBOSE_LOGGING=true pnpm nx test {project}