Commands Reference

All development scripts and commands for working on Elmo.

Development

# Run all dev servers (turbo)
pnpm dev

# Run only the web app
pnpm --filter @workspace/web dev

# Run only the worker
pnpm --filter @workspace/worker dev

Building

# Build all packages
pnpm build

# Build only the web app
pnpm --filter @workspace/web build

Testing

# Run all tests
pnpm test

# Watch mode for web app tests
pnpm --filter @workspace/web test:watch

Code Quality

# Run Biome linter
pnpm lint

# Format code with Biome
pnpm format

# Find unused exports and dependencies
pnpm knip

Always run pnpm format before committing to ensure consistent code style across the codebase.

Database

# Navigate to the web app
cd apps/web

# Generate a new migration after schema changes
pnpm drizzle-kit generate

# Run pending migrations
pnpm drizzle-kit migrate

Component Stories

# Start Ladle dev server
pnpm --filter @workspace/web ladle

CLI Development

# Run CLI directly from source
pnpm elmo <command>

# Build and link CLI globally for testing
pnpm cli:link

# Unlink global CLI
pnpm cli:unlink

Docker

# Build Docker images locally
elmo build

# Build without cache
elmo build --no-cache

# Build only web or worker
elmo build --web-only
elmo build --worker-only

# Run docker compose commands
elmo compose ps
elmo compose logs -f web
elmo compose down

Versioning

# Create a changeset (do this before every PR)
pnpm changeset

# Apply changesets and bump versions (maintainers only)
pnpm version-packages

Turborepo

The monorepo uses Turborepo for parallel task execution and caching. Most commands are defined in turbo.json and can be run from the repo root via pnpm <script>.

To run a command for a specific package:

pnpm --filter @workspace/<package-name> <command>

Was this page helpful?