WordloopWordloop
Reference

CLI Reference

Complete reference for every command in the ./dev CLI.

CLI Reference

The Wordloop platform uses the repository-root ./dev CLI for local orchestration, quality checks, generation, documentation maintenance, and bet authoring. Run commands from the monorepo root.

Use the CLI help as the executable source of truth when in doubt:

./dev help
./dev <verb> --help

Command groups

GroupVerbsPurpose
Lifecyclestart, stop, logs, attach, statusRun local infrastructure and services, inspect state, and connect to service shells.
Qualitybuild, test, lintSimulate CI builds, run test suites, and run static checks.
Utilitiesdb, dash, gcp, gen, docs, setup, syncManage local dependencies, schemas, generated artifacts, docs, and synced resources.
Authoringnew, archiveScaffold and archive bet-design content.
Systemdoctor, completionsValidate the local machine and generate shell completion scripts.

Lifecycle

CommandDescription
./dev start allStart infrastructure plus Core, ML, App, and Docs using the default native-service model.
./dev start all --dockerStart everything in Docker containers.
./dev start infraStart shared infrastructure only: Postgres, Pub/Sub, Storage, OTel, and dashboards.
./dev start [services...]Start selected services natively, for example ./dev start core ml.
./dev start [services...] --dockerStart selected services in Docker containers.
./dev stop allStop all managed Docker and native processes safely.
./dev stop wipeDestructive: stop everything and remove local data volumes.
./dev stop [services...]Stop selected services or infrastructure targets.
./dev logs allTail logs for all running Docker/native services.
./dev logs [services...]Tail selected services, for example ./dev logs core ml.
./dev attach dbOpen an interactive local PostgreSQL shell.
./dev statusPrint local ports, endpoints, and service status.

Services run natively by default with auto-reload where supported. Use --docker when you need container parity or do not have a native toolchain installed.

Quality

CommandDescription
./dev build allRun local CI-style builds for Core, ML, App, and Docs.
./dev build coreDocker-build wordloop-core.
./dev build mlDocker-build wordloop-ml.
./dev build appDocker-build wordloop-app with the required public Clerk build arg.
./dev build docsInstall docs dependencies and run the docs production build.
./dev test allRun Core, ML, App, system, smoke, and CLI test suites.
./dev test coreRun Go tests for wordloop-core.
./dev test mlRun Python tests for wordloop-ml.
./dev test appRun Vitest tests for wordloop-app.
./dev test systemRun cross-service system integration tests.
./dev test bet <slug>Run the progress suite for an active or archived bet.
./dev test smokeRun infrastructure smoke tests.
./dev test cliRun pure Bash tests for the CLI.
./dev lint allRun static checks across Core, ML, and App.
./dev lint coreRun go vet for Core.
./dev lint mlRun ruff check for ML.
./dev lint appRun the App linter.

Utilities

CommandDescription
./dev db shellOpen a local PostgreSQL shell.
./dev db migrateDiff services/wordloop-core/db/schema.sql against the live database with pg-schema-diff and apply the generated plan.
./dev db dry-runPreview the pg-schema-diff plan and hazards without applying changes.
./dev db dropDestructive: drop the local schema.
./dev db dumpApply schema changes, then export a pg_dump snapshot to .dev/schema.sql.
./dev db prod-proxy startStart a background Cloud SQL Auth Proxy to the live production database.
./dev db prod-proxy stopStop the production database proxy process.
./dev dash obsOpen the observability dashboard.
./dev dash apiOpen the ML API documentation dashboard.
./dev dash appOpen the Next.js app.
./dev dash docsOpen the documentation site.
./dev gcp pubsubInteract with the local Pub/Sub emulator.
./dev gcp storageQuery the local Storage emulator.
./dev gen allRun API, event, client, and docs generation in order.
./dev gen apiCompile local OpenAPI JSON specs and stage AsyncAPI specs under specs/.
./dev gen eventsGenerate typed AsyncAPI event models for Core, App, and ML.
./dev gen clientsRebuild typed service and frontend clients.
./dev gen docsRebuild generated API reference material for the docs site.
./dev docs healthCheck docs freshness, skill-doc references, corpus freshness, and known drift-prone claims.
./dev setup allRun environment-file setup and dependency installation.
./dev setup envCopy blank .env templates to active local paths.
./dev setup installInstall/synchronize workspace dependencies.
./dev sync skillsSync source skills from tools/skill-factory/skills/ into .agents/skills/.

Authoring

CommandDescription
./dev new bet <slug>Register a new active bet and baseline progress suite.
./dev new problem-statement <bet-slug>Add a problem-statement page to a bet.
./dev new pitch <bet-slug>Add a pitch page to a bet.
./dev new tdd <bet-slug>Add a TDD overview to a bet.
./dev new milestone <bet-slug> <milestone-slug>Scaffold a TDD milestone.
./dev new slice <bet-slug> <milestone-slug> <domain> <slice-slug>Scaffold a vertical domain slice.
./dev new contracts <bet-slug>Scaffold the default contract tree for a bet.
./dev new contract <bet-slug> <service> <protocol>Scaffold one API/event contract page.
./dev new schema <bet-slug> <service> <tech>Scaffold one database schema page.
./dev archive bet <slug>Move a delivered bet and its tests into archive locations.

System

CommandDescription
./dev doctorValidate required dependencies, Docker status, ports, and environment files.
./dev completions zshPrint zsh completion setup.
./dev completions bashPrint bash completion setup.

Native vs Docker

By default, application services run as native background processes with logs and PIDs under .dev/. Infrastructure runs through Docker Compose. This hybrid model keeps local debugging fast while preserving realistic infrastructure dependencies.

Use --docker on start when you need full containerized behavior, CI parity, or a local run without a native service toolchain.

Maintenance notes

This page summarizes the CLI for humans and agents, but the executable source remains the CLI itself. When changing CLI behavior, update scripts/cli/*.sh, run the relevant ./dev <verb> --help, then update this page and run ./dev docs health.

On this page