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.

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 and bootstrap
$cd ~/rapidkit/workspaces/my-workspace npx workspai bootstrap --profile polyglot
Add frontend + backend kits
$npx workspai create project nextjs my-web --yes npx workspai create project fastapi.standard my-api --yes
Model, context, and release gate
$npx workspai workspace model --json npx workspai workspace context --for-agent --json --write npx workspai pipeline --json --strict
Sync agent customization pack
$npx workspai workspace agent-sync --write --refresh-context --preset enterprise

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

Model, context, impact, verify, and sync — the deterministic CLI layer

Model

workspace model --json

Context

workspace context --for-agent --write

Impact

workspace impact --from <snapshot>

Verify

workspace verify --strict --json

Sync

workspace agent-sync --write

Bootstrap a workspace

Create a new governed workspace
$npx workspai my-workspace --yes --profile polyglot
Initialize workspace config
$npx workspai bootstrap --profile polyglot
Adopt an existing project or monorepo
$npx workspai adopt /path/to/project
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

Understand and govern changes

Write workspace model artifacts
$npx workspai workspace model --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 .rapidkit/reports/workspace-model-diff-last-run.json --json --write

Create planner

RapidKit chooses the safest path — native create, external adopt, or adopt-only

LaneUse whenResult
native-createWorkspai owns the scaffold contract, marker, registry, doctor, bootstrap, and workspace model path.Create the project with a first-class kit or supported generator
external-create-adoptA stable ecosystem generator exists, but Workspai does not yet own the post-create contract.Use the ecosystem generator, then adopt into Workspace Intelligence
adopt-onlyThe 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, 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. External create-adopt lanes: wordpress-site, wordpress-block, laravel, 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

npx workspai adopt ./legacy-api
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
│   ├── .rapidkit/       # Project config
│   ├── app/             # App Router
│   └── package.json
├── my-api/              # FastAPI project
│   ├── .rapidkit/       # Project config
│   ├── 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
├── .rapidkit/           # 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/
├── .rapidkit/            # RapidKit config
│   ├── 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