We value your privacy

This site uses cookies to improve your browsing experience, analyze site traffic, and show personalized content. See our Privacy Policy.

  1. MooseStack
  2. Moose Dev

Moose Dev

The moose dev command starts a local development environment with hot-reload, containerized infrastructure (ClickHouse, Redpanda, Temporal, Redis), and automatic schema synchronization.

What Happens When You Run moose dev

  1. Infrastructure starts - Docker containers spin up for ClickHouse, Redpanda, Redis, and Temporal
  2. Code compiles - Your data models, streams, and functions are compiled and validated
  3. Schema syncs - Tables, views, and topics are created/updated in local infrastructure
  4. Server starts - The Moose runtime serves your APIs and processes data
  5. Watcher activates - Changes to your code trigger automatic reloads (see TypeScript compilation for TypeScript behavior)

Key Capabilities

CapabilityDescription
Hot ReloadCode changes are detected and applied without restarting
Local InfrastructureFull ClickHouse, Redpanda, Redis, and Temporal stack
Schema SyncTables and topics are created/updated automatically
External Table MirroringOptionally mirror remote tables for local development

TypeScript projects: compilation and hot reload

For TypeScript projects, moose dev uses a compilation-driven workflow:

  • Initial compile – Before planning or starting the server, Moose compiles your TypeScript once. The runtime loads pre-compiled JavaScript (we used to run TypeScript via ts-node at runtime; we no longer do). If this initial compilation fails, moose dev exits with an error.
  • Incremental compilation (watch) – The compiler runs in watch mode and watches your source files. When you save changes, it performs an incremental compile. Only after a successful compile does Moose run planning and apply infrastructure changes (tables, APIs, etc.). Compilation errors block reloads until fixed; warnings do not block reloads but are shown in the terminal.
  • Output directory – Compiled output is written to your tsconfig.json outDir if set, otherwise to .moose/compiled. Moose reads this directory when loading your app; do not delete it while moose dev is running.

This replaces the previous file-watcher approach so that TypeScript benefits from incremental compilation and reloads only when the project compiles successfully.

Configuration Reference

For detailed configuration options including lifecycle hooks, Docker extensions, and networking, see Dev Environment Configuration.

Development Topics

  • CDC Managed Tables - Work locally with tables managed by CDC pipelines like ClickPipes, PeerDB, or Debezium

On this page

What Happens When You Run `moose dev`Key CapabilitiesTypeScript projects: compilation and hot reloadDevelopment Topics
Edit this page
FiveonefourFiveonefour
Fiveonefour Docs
MooseStackHostingTemplatesGuides
Release Notes
Source545
  • Overview
Build a New App
  • 5 Minute Quickstart
  • Browse Templates
  • Existing ClickHouse
Add to Existing App
  • Next.js
  • Fastify
Fundamentals
  • Moose Runtime
  • MooseDev MCP
  • Language Server
  • Data Modeling
Moose Modules
  • Moose OLAP
  • Moose Streaming
  • Moose Workflows
  • Moose APIs & Web Apps
Deployment & Lifecycle
  • Moose Dev
  • Moose Migrate
  • Moose Deploy
Reference
  • API Reference
  • Query Layer
  • Data Types
  • Table Engines
  • CLI
  • Configuration
  • Observability Metrics
  • Help
  • Release Notes
Contribution
  • Documentation
  • Framework