Skip to main content
RapidKit
Documentation

Govern polyglot workspaces

Complete guide to RapidKit's npm CLI, Python Core modules, Next.js and backend kits, workspace intelligence, contracts, archive handoff, and Workspai extension.

Learn the Workspace Intelligence architectureOpen Workspai.dev for concepts, contracts, architecture maps, guides, and reference material.

Quick Start

Start with a governed workspace, then scaffold kits or adopt existing repos

Start here (recommended)

Install the CLI, create a polyglot workspace, model and verify with shared evidence — aligned with the npm README.

Install globally
$npm install -g workspai
Or browse commands without install
$npx workspai --help
Create a governed workspace
$npx workspai my-workspace --yes --profile polyglot
Open the workspace
$cd ~/.workspai/workspaces/my-workspace
Add frontend + backend kits
$npx workspai create project nextjs my-web --yes npx workspai create project fastapi.standard my-api --yes
Run the canonical intelligence chain
$npx workspai workspace intelligence run --for-agent generic --strict --json
Separate governance/release pipeline
$npx workspai pipeline --json --strict --no-agent-sync

Or pick a single framework below for a project-first flow.

Choose Your Framework

Next.js

Official Next.js app with workspace metadata

Choose Installation Method

NPM / Node.js

Easiest

Quick start for demos and prototypes

Zero installationCross-platformQuick demos
Requirements
  • Node.js 20+
  • npm or yarn

Installation Steps for Next.js

1. Create your project
$npx workspai create project nextjs my-web
2. Navigate to project
$cd my-web
3. Install dependencies
$npx workspai init
4. Start development server
$npx workspai dev

Your Next.js app is ready!

Visit http://localhost:3000 to see your app.

Workspace Intelligence

11 contract-ordered stages — one authoritative run result

Model

Stage 1

Diff

Stage 2

Impact

Stage 3

Doctor Evidence

Stage 4

Contract Evidence

Stage 5

Analyze Evidence

Stage 6

Readiness Evidence

Stage 7

Verify

Stage 8

Agent Context

Stage 9

Agent Grounding

Stage 10

Explain

Stage 11

Start or connect a workspace

Run every required stage in contract order
$npx workspai workspace intelligence run --for-agent generic --strict --json

The commands below are targeted inspection and recovery tools, not a replacement execution loop.

Create a new governed workspace
$npx workspai my-workspace --yes --profile polyglot
Change the workspace profile later (optional)
$npx workspai bootstrap --profile polyglot
Adopt an existing project or monorepo
$cd /path/to/project && npx workspai adopt .

Adopt keeps source in place and writes a portable project lens for users and agents. The absolute workspace binding remains in a gitignored local file, so workspace-aware commands can still run from the project directory.

Create a Next.js app inside the workspace
$npx workspai create project nextjs my-web --yes
Create a FastAPI service inside the workspace
$npx workspai create project fastapi.standard my-api --yes
Create a Rust/Axum service
$npx workspai create project rust.axum my-api --yes
Create a desktop app or VS Code extension
$npx workspai create project desktop.tauri my-desktop --yes npx workspai create project extension.vscode editor-tools --yes

Understand and govern changes

Workspai first reconciles the canonical Workspace Model. It then derives and enriches the Knowledge Graph only from the projects and topology that model authorizes. A stable structural hash binds the two artifacts, and consumers reject stale identity, topology, or hash mismatches.

Write workspace model artifacts
$npx workspai workspace model --json --write
Retrieve bounded, proof-backed graph context
$npx workspai workspace graph search "authentication endpoint" --limit 12 --json
Trace graph evidence and relationships
$npx workspai workspace graph evidence "GET /users" --json npx workspai workspace graph path frontend-api "GET /users" --json
Compare graph revisions
$npx workspai workspace graph overlay --from previous-graph.json --json
Measure this workspace retrieval payload
$npx workspai workspace graph benchmark "authentication endpoint" --limit 12 --json
Export the model-bound graph for linked-data tools
$npx workspai workspace graph jsonld --output workspace-graph.jsonld
Finalize governed evaluation evidence
$npx workspai workspace eval report --json
Measure a project coverage target
$npx workspai project coverage --run --target 80 --strict --json
Compare compatible evaluation runs
$npx workspai workspace eval compare baseline.json candidate.json --json
Generate agent-ready context
$npx workspai workspace context --for-agent --json --write
Sync Agent Customization Pack
$npx workspai workspace agent-sync --write --refresh-context --preset enterprise
Diff workspace state from git
$npx workspai workspace diff --from git --json
Assess blast radius after a change
$npx workspai workspace impact --from <snapshot> --json
Verify readiness with strict checks
$npx workspai workspace verify --strict --json
Release governance pipeline
$npx workspai pipeline --json --strict
Trace evidence for an incident or handoff
$npx workspai workspace trace --from .workspai/reports/workspace-model-diff-last-run.json --json --write

Create planner

RapidKit chooses the safest path — native create, official generator handoff, or existing project adoption

LaneUse whenResult
nativeWorkspai owns the scaffold contract, marker, registry, doctor, bootstrap, and workspace model path.Create the project with a first-class kit or supported generator
officialA stable ecosystem generator exists. Available entries run the official generator and then register the project; planned entries fall back to adopt/import.Use the ecosystem generator, then adopt into Workspace Intelligence
existingThe project enters Workspace Intelligence through import/adopt, not native create.Register, model, verify, and govern without scaffolding

Native create contract: fastapi.standard, fastapi.ddd, nestjs.standard, springboot.standard, gofiber.standard, gogin.standard, dotnet.webapi.clean, rust.axum. Official generator paths: frontend.nextjs, frontend.remix, frontend.vite-react, frontend.vite-vue, frontend.vite-svelte, frontend.vite-solid, frontend.vite-vanilla, frontend.nuxt, frontend.angular, frontend.astro, frontend.sveltekit, desktop.tauri, desktop.electron, extension.vscode, php.laravel. Planned official handoffs: wordpress-site, wordpress-block, symfony, rails. Everything else enters via adopt/import. Full create planner docs

CLI Commands

Workspace, project, module, archive, and runtime-aware commands

npx workspai my-workspace

Create a governed workspace with shared tooling

npx workspai my-workspace
npx workspai adopt

Register an existing project into a workspace

cd ./legacy-api && npx workspai adopt .
npx workspai create project

Create a new project with interactive wizard

npx workspai create project nextjs web
npx workspai workspace model

Materialize workspace topology and contracts

npx workspai workspace model --json --write
npx workspai workspace verify

Run strict readiness and doctor checks

npx workspai workspace verify --strict
npx workspai add

Add modules to Core-backed projects

npx workspai add module auth
npx workspai dev

Start development server with hot-reload

npx workspai dev --port 3000
npx workspai modules

List available modules and details

npx workspai modules list

Module System

Production-ready components for your project

Authentication

JWT, OAuth2, 2FA

Database

ORM, Migrations, Pooling

API

Rate Limit, Validation, Cache

Monitoring

Logging, Metrics, Traces

Deployment

Docker, K8s, CI/CD

Testing

Unit, Integration, E2E

Adding Modules to Your Project

Add authentication module
$rapidkit add module auth
Add caching module
$rapidkit add module cache
Add observability module
$rapidkit add module observability

Workspace Structure

Organize multiple projects in one workspace

Workspace Layout

my-workspace/
├── web/                 # Next.js project
│   ├── .workspai/       # Project metadata
│   ├── app/             # App Router
│   └── package.json
├── my-api/              # FastAPI project
│   ├── .workspai/       # Project metadata
│   ├── src/             # Source code
│   ├── config/          # Configuration
│   ├── tests/           # Test suite
│   ├── pyproject.toml   # Poetry config
│   └── Dockerfile       # Docker setup
├── my-service/          # NestJS project
├── go-api/              # Go Fiber or Go Gin project
├── spring-api/          # Spring Boot project
├── dotnet-api/          # ASP.NET Core project
├── .workspai/           # Workspace intelligence artifacts
│   └── reports/         # model, context, verify outputs
├── .venv/               # Workspace Python environment
├── .rapidkit-workspace  # Workspace metadata
├── poetry.lock          # Locked Python deps
├── pyproject.toml       # Workspace Python deps
├── rapidkit             # CLI script (bash)
├── rapidkit.cmd         # CLI script (Windows)
├── README.md
└── Makefile

Shared Environment

All projects in a workspace share a single Python environment (via pyproject.toml)

Project Structure

Clean Architecture with DDD principles

Next.js Project Structure

my-web/
├── .workspai/            # Workspai project metadata
│   ├── project.json      # Project metadata
│   └── context.json      # Project context
├── app/                  # App Router pages
├── public/               # Static assets
├── package.json          # npm dependencies
├── next.config.ts        # Next.js config
├── tsconfig.json         # TypeScript config
└── README.md
Dependency Inversion

Core depends on abstractions

Modularity

Self-contained modules

Testability

Business logic isolated