Built by the creator of tx|Primitives for memory, tasks & orchestrationVisit tx docs
tx-agent-kit
Commands

Commands Reference

Complete reference of all pnpm scripts organized by category

All commands are run from the monorepo root via pnpm. This is the complete reference of available scripts.

Core Development

CommandDescription
pnpm devStart all app dev servers in parallel (web, api, worker, mobile)
pnpm dev:webStart Next.js web app only
pnpm dev:apiStart Effect HTTP API server only
pnpm dev:workerStart Temporal worker only
pnpm dev:mobileStart Expo React Native dev server only
pnpm dev:docsStart Fumadocs documentation site
pnpm env:configureSeed .env file with local development defaults (idempotent)
pnpm infra:ensureStart Docker infrastructure services (idempotent, shared across worktrees)
pnpm infra:downStop Docker infrastructure and remove volumes
pnpm openapi:generateGenerate OpenAPI spec from API route definitions
pnpm api:client:generateRegenerate web + mobile API client hooks from OpenAPI spec
pnpm mobile:generate:apiRegenerate mobile API client from OpenAPI spec
pnpm docs:api:generateGenerate API reference MDX docs from OpenAPI spec
pnpm scaffold:crudScaffold a new CRUD domain (DDD structure, routes, tests)

Quality Gates

CommandDescription
pnpm lintRun ESLint + structural invariants + shell invariants
pnpm lint:quietRun lint with reduced output (for agent workflows)
pnpm lint:invariantsRun structural domain invariant checks only
pnpm lint:shellRun shell script invariant checks only
pnpm lint:ci-envValidate CI environment variable configuration
pnpm type-checkRun TypeScript type checking across all packages
pnpm type-check:quietRun type-check with reduced output
pnpm testRun all unit tests via Vitest
pnpm test:quietRun tests with reduced output
pnpm test:run-silentRun tests fully silently
pnpm test:integrationRun integration tests (resets test DB, lock-guarded)
pnpm test:integration:quietRun integration tests with reduced output
pnpm test:db:pgtapRun pgTAP database trigger tests
pnpm test:infra:observabilityVerify observability infrastructure is working
pnpm buildBuild all packages and apps
pnpm build:quietBuild with reduced output

Database and Worktrees

CommandDescription
pnpm db:migrateRun Drizzle database migrations
pnpm db:trigger:newScaffold a new database trigger with pgTAP test
pnpm db:test:resetDrop and recreate test database, rerun migrations
pnpm db:studioLaunch Drizzle Studio for visual database inspection
pnpm worktree:portsDerive deterministic port assignments for a git worktree

Deployment

CommandDescription
pnpm deploy:build-imagesBuild container images for api and worker
pnpm deploy:migrate:stagingRun DB migrations against staging (secrets from 1Password)
pnpm deploy:migrate:prodRun DB migrations against production (secrets from 1Password)
pnpm deploy:stagingDeploy to staging via Docker Compose (renders secrets, pulls images, smoke tests)
pnpm deploy:prodDeploy to production via Docker Compose
pnpm deploy:smokeRun smoke tests against a deployed API (API_BASE_URL required)
pnpm deploy:gcp:toy:bootstrapBootstrap a toy GCP project for E2E testing
pnpm deploy:gcp:toy:teardownTear down the toy GCP project
pnpm test:gcp:e2eRun GCP end-to-end tests

MCP Servers

CommandDescription
pnpm mcp:prometheusStart Prometheus MCP server (PromQL queries, metric discovery)
pnpm mcp:jaegerStart Jaeger MCP server (trace search, service discovery)
pnpm mcp:context7Start Context7 MCP server (library documentation lookup)
pnpm mcp:supabaseStart Supabase MCP server (database access)
pnpm mcp:playwrightStart Playwright MCP server (browser automation)

MCP servers are started via wrapper scripts in scripts/mcp/ and configured in .mcp.json. They provide programmatic access to infrastructure tools for AI agents.

Temporal

CommandDescription
pnpm verify:temporal-typesVerify Temporal workflow/activity type consistency
pnpm test:temporal-typesRun Temporal type verification tests

Quiet vs. full commands

Most quality gates have both quiet and full variants:

VariantExampleBehavior
Quietpnpm lint:quiet, pnpm test:quietReduced output optimized for agent workflows. Use these first to minimize context consumption
Fullpnpm lint, pnpm testComplete diagnostic output. Switch to these when debugging failures

The quiet variants run the same checks as the full variants; they only differ in output verbosity.

Integration test locking

Integration tests are guarded by a file lock at /tmp/tx-agent-kit-integration.lock. This prevents overlapping integration test runs from clobbering each other's database state. If a previous run was interrupted, the lock file is automatically cleaned up by the next run.

CLI tool

The pnpm tx command provides a unified CLI for project-specific tasks:

pnpm tx scaffold:crud --domain <domain> --entity <entity>
pnpm tx db:trigger:new <trigger-name>

This is a thin wrapper around scripts/tx-cli.mjs.

On this page