---
title: "Commands"
description: "Build, check and dev commands of the repository: what each one proves and when to run it."
canonical_url: "https://skaile-ai.github.io/forge-editor/reference/commands"
---
# Commands

> Build, check and dev commands of the repository: what each one proves and when to run it.

## Repository commands

From the repository root, after `bun install`:

```sh
bun run dev                                   # Nuxt demo app, http://localhost:3056
bun run typecheck                             # nuxt typecheck of the demo app
bun run --cwd examples/vue-simple dev        # http://localhost:3040
bun run --cwd examples/vue-simple build      # prepares the Nuxt UI theme aliases the library typecheck needs
bun run --cwd examples/vue-simple typecheck
bun run --cwd examples/react-simple dev     # http://localhost:3041
bun run --cwd examples/react-simple typecheck
bun run --cwd examples/react-advanced dev   # http://localhost:3043, needs `bun run dev` (Nuxt host, port 3056)
bun run --cwd examples/react-advanced typecheck
bun run --cwd examples/vue-markdown dev     # http://localhost:3045, MarkdownSurface with frontmatter, tables and source mode
bun run example:two-pane                      # http://localhost:3047, two panes over a Nitro server: Baskets, Document tree focus and filter, splitting, block transfer (examples/vue-two-pane; AI_KEY for the AI features)
bun run typecheck:editor                      # vue-tsc --noEmit -p packages/editor/tsconfig.json (no Nuxt globals)
bun run check:editor-entries                  # production build per fixture, module-graph isolation rules
bun run check:editor-legacy-names             # no former name of the block vocabulary in sources, app, examples, docs
bun run check:editor-markdown-clipboard       # MarkdownClipboard paste/copy cases (HTML, Markdown, plain text, data-URL opt-in) in happy-dom
bun run check:editor-composition              # defineEditor rejects missing `requires`; accepted compositions; one formatAiResult contributor
bun run test:editor                           # bun test over packages/editor/test: framework-free models on a mounted editor (happy-dom)
```

On a clean checkout run the example build once before `typecheck:editor`.

## Building and developing in this repository

`bun run build:editor` (`tsdown`, config `packages/editor/tsdown.config.ts`) writes `packages/editor/dist`: ESM plus `.d.ts` for every `exports` subpath (the entries are read from the `skaile-source` condition of `package.json#exports`, so a new export is built as soon as it is declared), unbundled one module per source file, source maps with embedded sources, CSS copied, and the Nuxt runtime directory (`dist/nuxt/runtime`: plugin, server routes, utils) as separate files next to the module that Nuxt and Nitro compile in the host. Dependencies and peers are never bundled.

Each `exports` entry carries a custom **skaile-source** condition first (pointing at `src`) followed by `types`/`import` (or `default`) pointing into `dist`. This repository's Nuxt app (`nuxt.config.ts`) and the examples (`examples/*/vite.config.ts`, `tsconfig.json#customConditions`) enable that condition for Vite, Nitro and the type checker, so **editing the library needs no build step in dev**. Consumers outside the repository never set the condition and get `dist`. `bun run check:editor-entries` builds first and judges the **built** output through `exports` (no `skaile-source`), so it proves what is published; `bun run check:editor-composition` builds first and loads the built entries; `bun run typecheck:editor` resolves through `src` (`customConditions: ["skaile-source"]` in `packages/editor/tsconfig.json`).

## Verify

Run from the repository root after `bun install` (on a clean checkout build `examples/vue-simple` once before the editor typecheck: it prepares the Nuxt UI theme aliases the typecheck needs):

```sh
bun run --cwd examples/vue-simple build       # once on a clean checkout
bun run typecheck:editor                      # vue-tsc --noEmit -p packages/editor/tsconfig.json (src/nuxt excluded)
bun run build:editor                          # tsdown: packages/editor/dist (ESM + .d.ts per export)
bun run check:editor-entries                  # builds the editor, then one production build per fixture + module-graph isolation, then the schema snapshot
bun run check:editor-composition              # defineEditor rejects missing `requires`; accepted compositions; one formatAiResult
bun run test:editor                           # bun test: inspector model, AI selection flow, surface session on a mounted editor (happy-dom)
bun run typecheck                             # nuxt typecheck of the demo app
bun run --cwd examples/vue-simple typecheck   # plain Vue consumer
bun run --cwd examples/react-simple typecheck # plain React consumer
bun run --cwd examples/react-advanced typecheck # React consumer of every feature
bun run dev                                   # Nuxt demo, http://localhost:3056
bun run --cwd examples/vue-simple dev         # plain Vue example, http://localhost:3040
bun run --cwd examples/react-simple dev       # plain React example, http://localhost:3041
bun run --cwd examples/react-advanced dev     # React advanced example (proxies /api and /collab to the Nuxt demo), http://localhost:3043
```

After adding a feature, add a fixture folder `packages/editor/checks/fixtures/<name>/` (an `index.html` plus `main.ts`/`App.vue` — or `main.tsx` for a React fixture — that mounts the surface with its toolbar) and one entry in `FIXTURES` in `packages/editor/checks/entries.ts` with `forbid`, `require` and `allowSource` patterns; features get a `<name>`, a `<name>-react` and a framework-free `headless-<name>` fixture. `check:editor-entries` also fails when the advanced or simple schema differs from the committed snapshot (`checks/fixtures/schema-node/schema.snapshot.json`); regenerate it deliberately with `bun packages/editor/checks/schema.ts --update`.


## Sitemap

See the full [sitemap](https://skaile-ai.github.io/forge-editor/sitemap.md) for all pages.
