Installation

System requirements, alternative setup methods, and production builds.

System requirements

  • Node.js 22 or later.
  • macOS, Windows (including WSL), or Linux.

Production builds

Build and start the app for production:

npm run build && npm run start

Manual installation

If you prefer to add RouteCraft to an existing project instead of using the CLI:

npm install @routecraft/routecraft

Create your first route:

// routes/my-route.ts
import { craft, simple, log } from "@routecraft/routecraft";

export default craft()
  .id("my-first-route")
  .from(simple("Hello, RouteCraft!"))
  .to(log());

Run it with the CLI (recommended), or execute within your own Node app using CraftContext.

TypeScript note

The CLI run command executes only JavaScript route files (.mjs, .js, .cjs). If you author routes in TypeScript, compile them to JavaScript before running.

AI Quick Start

To create a project with AI tools enabled:

npm create routecraft@latest my-ai-tools
npm install @routecraft/ai zod

Then create tools and expose them to AI agents. See the AI & MCP Setup guide for complete instructions.