WordloopWordloop
Reference

CLI Reference

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

CLI Reference

The WordLoop platform has fully deprecated legacy Makefiles in favor of a bespoke, shell-native ./dev interface that powers all local execution logic safely and predictively.

All targets are run from the monorepo root. Run ./dev help for a formatted list.

Lifecycle

CommandDescription
./dev start allStart infra (Docker) + Core, ML, App, Docs (native)
./dev start all --dockerStart everything in Docker containers
./dev start infraStart shared infra only (Postgres, Pub/Sub, Storage, OTel)
./dev start [services...]Start specific services natively (e.g. ./dev start core ml)
./dev start [services...] --dockerStart specific services in Docker containers
./dev stop allStop everything safely (Docker + native processes)
./dev stop wipeDestructive: stop everything and destroy all data volumes
./dev stop [services...]Stop specific services (auto-detects native vs Docker)
./dev logs allTail logs for all running services
./dev logs [services...]Tail logs for specific services — supports multi-tail (e.g. ./dev logs core ml)
./dev attach dbDrop into an interactive psql shell
./dev statusPrint local environment ports and endpoints

Services run natively by default with auto-reload (Air for Go, uvicorn for Python, HMR for Next.js). Use --docker to opt into Docker containers when needed.

Quality

CommandDescription
./dev test allExecute all testing suites across all packages
./dev test systemExecute strictly end-to-end integration boundaries via Pytest
./dev test smokeRun infrastructure health smoke tests
./dev test coreRun Go test suites
./dev test mlRun Python Pytest suites
./dev test appRun TS Vitest suites
./dev lint allRun static analysis across all services
./dev lint coreRun go vet on Core
./dev lint mlRun ruff check on ML
./dev lint appRun eslint on App

Utilities

CommandDescription
./dev db migrateApply all pending Core DB migrations
./dev db rollbackRevert the single most recently applied migration
./dev db dropDestructive: completely drop the schema
./dev db shellDrop securely into the local PostgreSQL console
./dev dash obsOpen the .NET Aspire Observability UI Dashboard
./dev dash apiOpen the ML API Swagger docs
./dev dash appOpen the Next.js App
./dev dash docsOpen the Fumadocs Documentation UI
./dev gcp pubsubInteract with local Pub/Sub emulator via gcloud
./dev gcp storageQuery the local Storage emulator REST API
./dev gen apiGenerate OpenAPI schemas
./dev gen eventsGenerate AsyncAPI structs across all services
./dev gen clientsRebuild typed API clients (Orval + Go + Python)
./dev gen docsRecompile OpenAPI metadata for docs UI
./dev setup envCopy environment baseline configurations
./dev setup installInstall workspace-wide package dependencies

System

CommandDescription
./dev doctorValidate all system dependencies, Docker status, port availability, and env files
./dev completions zshOutput zsh auto-completion script
./dev completions bashOutput bash auto-completion script

First time? Run ./dev doctor immediately after cloning to verify your machine has everything needed.

Enabling auto-completion

# Zsh — add to ~/.zshrc for permanent access
eval "$(./dev completions zsh)"

# Bash — add to ~/.bashrc
eval "$(./dev completions bash)"

After sourcing, typing ./dev then pressing Tab will suggest available commands and sub-targets.

Native vs Docker

By default, ./dev start core runs the Go service natively using Air for auto-reload. This means:

  • File changes are detected automatically — Air watches .go files and rebuilds in ~1 second
  • Migrations run on every restart — database schema is always current
  • Logs go to .dev/logs/ — tail them with ./dev logs core
  • IDE debugging works — you can also run Core from your IDE's debugger instead

Use --docker when you need full containerized behavior (e.g., testing Dockerfiles, CI parity, or running without Go installed locally).

Debug Environments

By running selectively (e.g., ./dev start infra core), you intentionally leave services like wordloop-ml turned off. This allows you to run those specific services through your IDE (like VSCode Launch actions) so you get full debugging breakpoint control while depending on a containerized or native backend.

Resilience Model

The CLI is designed for safety and resilience:

  • Graceful shutdown: ./dev stop sends SIGTERM first, allowing services to flush connections and clean up. Only falls back to SIGKILL after a 3-second grace period.
  • Subshell isolation: All commands run in isolated subshells, preventing cd side-effects from corrupting your terminal's working directory.
  • Port conflict detection: ./dev doctor and ./dev start both check for port conflicts before launching services.
  • No external dependencies: Port checking uses native bash /dev/tcp instead of requiring nc or netcat.

On this page