Get started

From an empty folder to a validated flow in five steps.

Node 18+ and pnpm are all you need. Everything runs locally — no account, no platform. Each step links to the repo wiki for deeper reference.

  1. Install the toolchain

    Clone the monorepo and build all eleven @mmmnt packages. Source-available under FSL-1.1-Apache-2.0.

    terminal
    $ git clone https://github.com/mmmnt/moment.git
    $ cd moment && pnpm install
    $ pnpm turbo build
  2. Write your first spec

    Create order.moment. Start with one bounded context, one flow, one crossing — you can grow it later.

    order.moment
    context "Ordering" [Core]
      event OrderPlaced
        orderId: UUID
    
    flow "order-placed"
      moment "Submission"
        ordering: OrderPlaced
          crosses-to fulfillment
            contract { orderId }
  3. Generate every artifact

    Parse, derive scenarios, and emit typed code, tests, docs, and contracts — deterministically.

    terminal
    $ moment parse order.moment
    $ moment derive
    $ moment generate --all
    ✓ 6 artifacts written · 0 drift
  4. Simulate before you implement

    moment simulate is free and local. It produces the facet.json scenario that loads straight into Facet, where the sequence is visualized and every crossing contract is asserted.

    terminal
    $ moment simulate --out facet.json
    $ moment viz --bridge
    ✓ live at localhost:5173 · 12/12 contracts pass
  5. Keep spec and code in sync

    As implementation grows, moment status reports gaps by severity and moment reconcile closes them in either direction. Run it in watch mode or in CI.

    terminal
    $ moment status
    ✓ 0 ERROR · 1 WARNING · 3 INFO
    $ moment watch
No lock-in

Everything generated is standard TypeScript, Gherkin, Markdown, and AsyncAPI. The .moment file is the only Moment-specific artifact — stop using Moment tomorrow and your code still runs.

Learn the DSL →

Every keyword, spoon-fed.

See examples →

Real specs rendered into flows.

Repo wiki →

Full CLI & grammar reference.