rapidkit 0.23.1 → 0.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,4 @@
1
- <div align="center">
2
-
3
- # 🚀 RapidKit CLI
1
+ # RapidKit NPM CLI
4
2
 
5
3
  ### Build Production-Ready APIs in Seconds
6
4
 
@@ -13,796 +11,174 @@ Clean architecture • Zero boilerplate • Instant deployment.
13
11
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
14
12
  [![GitHub Stars](https://img.shields.io/github/stars/getrapidkit/rapidkit-npm.svg?style=flat-square)](https://github.com/getrapidkit/rapidkit-npm/stargazers)
15
13
 
16
- ```bash
17
- # 1. Create a workspace — shared Python env for all your projects
18
- npx rapidkit init
19
- cd my-workspace
20
-
21
- # 2. Scaffold a project inside the workspace
22
- npx rapidkit create project fastapi.standard my-api
23
- cd my-api
24
-
25
- # 3. Install deps & start the dev server
26
- npx rapidkit init && npx rapidkit dev
27
- # ✅ Production-ready API running at http://localhost:8000
28
- ```
29
-
30
- > **Workspace approach:** one shared Python environment hosts multiple projects (FastAPI, NestJS, or both).
31
- > Each project gets its own folder, clean architecture, Docker, and CI/CD — but shares a single `~150 MB` venv.
32
-
33
- Using Node.js/NestJS? Use this direct kit command (inside or outside a workspace):
34
-
35
- ```bash
36
- npx rapidkit create project nestjs.standard my-service # standard kit
37
- ```
38
- Using Python/FastAPI? Use these direct kit commands (inside or outside a workspace):
39
- ```bash
40
- npx rapidkit create project fastapi.standard my-service # standard kit
41
- npx rapidkit create project fastapi.ddd my-service # DDD kit
42
- ```
43
-
44
- Using Go? Use these direct kit commands (inside or outside a workspace):
45
- ```bash
46
- npx rapidkit create project gofiber.standard my-service # Go Fiber standard kit
47
- npx rapidkit create project gogin.standard my-service # Go Gin standard kit
48
- ```
49
-
50
- > ℹ️ **Module support note:** `npx rapidkit add module ...` is currently supported for **FastAPI** and **NestJS** projects only.
51
- > Go kits (`gofiber.standard`, `gogin.standard`) do not support RapidKit modules in this release.
52
-
53
- [Quick Start](#-quick-start) • [Docs](https://getrapidkit.com) • [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode) • [Examples](https://github.com/getrapidkit/rapidkit-examples)
54
-
55
- ---
56
-
57
- ### 👉 Get Started in 30 Seconds
58
-
59
- No account. No config. No pain. Just build.
60
-
61
- [📖 Read Full Docs](https://getrapidkit.com) • [🎥 Watch Demo](https://www.youtube.com/watch?v=demo) • [⭐ Star on GitHub](https://github.com/getrapidkit/rapidkit-npm)
14
+ Official CLI for creating and operating RapidKit workspaces and projects.
62
15
 
63
- </div>
16
+ - Workspace-first lifecycle (`create workspace` → `bootstrap` → `setup` → `create project`)
17
+ - Multi-runtime support (Python, Node.js, Go)
18
+ - Profile + policy enforcement (`warn` / `strict`)
19
+ - Cache and mirror lifecycle commands for stable environments
64
20
 
65
- ---
21
+ ## Requirements
66
22
 
67
- ## Why RapidKit?
23
+ - Node.js `>= 20.19.6`
24
+ - Python `>= 3.10` (for Python/Core workflows)
25
+ - Go (optional, for Go projects)
68
26
 
69
- | 🚀 **Instant Setup** | 🧩 **Modular By Design** | 🎯 **Production-Ready** |
70
- |-------------------------------|-------------------------------|--------------------------------|
71
- | Project in 30 seconds | 27+ plug-and-play modules | Docker + CI/CD included |
72
- | Zero configuration needed | Add features in 1 command | Best practices baked in |
73
- | FastAPI, NestJS & Go kits | Auth/DB/Cache modules (Python/Node kits) | Clean architecture guaranteed |
74
-
75
- ### 🔥 From This...
27
+ ## Install
76
28
 
77
29
  ```bash
78
- mkdir my-api && cd my-api
79
- python -m venv .venv && source .venv/bin/activate
80
- pip install fastapi uvicorn sqlalchemy alembic pydantic redis...
81
- # Create project structure manually
82
- # Configure Docker, CI/CD, testing...
83
- # Write boilerplate code...
84
- # ... 2 hours later
30
+ npm install -g rapidkit
85
31
  ```
86
32
 
87
- ### ...To This!
33
+ Or run directly with `npx`:
88
34
 
89
35
  ```bash
90
- npx rapidkit create project fastapi.standard my-api
91
- cd my-api && npx rapidkit init && npx rapidkit dev
92
- # ✅ Done in 30 seconds!
36
+ npx rapidkit --help
93
37
  ```
94
38
 
95
- **What you get:**
96
- - ✅ Production-ready project structure
97
- - ✅ Docker & docker-compose configured
98
- - ✅ GitHub Actions CI/CD pipeline
99
- - ✅ Testing & linting setup
100
- - ✅ Environment configuration
101
- - ✅ Hot reload development server
102
- - ✅ Best practices & clean architecture
103
-
104
-
105
- ---
106
-
107
- ## 📦 Table of Contents
108
-
109
- - [Why RapidKit?](#-why-rapidkit)
110
- - [Quick Start](#-quick-start)
111
- - [Core Concepts](#-core-concepts)
112
- - [Module Ecosystem](#-module-ecosystem)
113
- - [Commands Reference](#-commands-reference)
114
- - [Requirements](#-requirements)
115
- - [FAQs](#-faqs)
116
- - [Links](#-links)
117
-
118
- ---
39
+ ## Quick Start (Recommended)
119
40
 
120
- ## 🚀 Quick Start
121
-
122
- ### Option 0: Fastest Start (`npx rapidkit init`)
123
-
124
- Use this when you want the quickest complete flow (workspace + project + run):
41
+ ### 1) Create a workspace
125
42
 
126
43
  ```bash
127
- cd ~/my-empty-folder
128
-
129
- # Creates my-workspace/ with a shared Python environment
130
- npx rapidkit init
44
+ rapidkit create workspace my-workspace --yes --profile polyglot
131
45
  cd my-workspace
132
-
133
- # Scaffold a project (interactive, or pass kit + name directly)
134
- npx rapidkit create project fastapi.standard my-api
135
- cd my-api
136
-
137
- # Install project deps & start dev server
138
- npx rapidkit init && npx rapidkit dev
139
- # ✅ http://localhost:8000
140
46
  ```
141
47
 
142
- This is the recommended quickest onboarding path for most users.
143
- `npx rapidkit init` is context-aware and auto-detects plain folders, workspace roots, and project directories.
144
-
145
- **Why workspace?** All projects under `my-workspace/` share one Python virtualenv — so adding a second or third service costs almost no extra disk space, and the RapidKit Core version stays consistent across all of them.
146
-
147
- Prefer direct kit selection (works both inside and outside a workspace):
48
+ ### 2) Bootstrap and setup runtimes
148
49
 
149
50
  ```bash
150
- npx rapidkit create project fastapi.standard my-service
151
- npx rapidkit create project fastapi.ddd my-service
152
- npx rapidkit create project nestjs.standard my-service
153
- npx rapidkit create project gofiber.standard my-service
154
- npx rapidkit create project gogin.standard my-service
155
- ```
156
-
157
- Interactive kit picker (`npx rapidkit create project`) includes:
158
-
159
- ```text
160
- 1) fastapi — FastAPI Standard Kit
161
- 2) fastapi — FastAPI DDD Kit
162
- 3) nestjs — NestJS Standard Kit
163
- 4) go/fiber — Go Fiber Standard Kit
164
- 5) go/gin — Go Gin Standard Kit
51
+ rapidkit bootstrap --profile polyglot
52
+ rapidkit setup python
53
+ rapidkit setup node --warm-deps
54
+ rapidkit setup go --warm-deps
165
55
  ```
166
56
 
167
- ### Option 1: Single Project (Fastest)
168
-
169
- Perfect for trying out RapidKit or building a standalone service:
57
+ ### 3) Create projects
170
58
 
171
- **FastAPI:**
172
59
  ```bash
173
- # Create project
174
- npx rapidkit create project fastapi.standard my-api
175
-
176
- # Start developing
177
- cd my-api
178
- npx rapidkit init # Install dependencies
179
- npx rapidkit dev # Start dev server → http://localhost:8000
180
-
181
- # Add modules as needed
182
- npx rapidkit add module auth
183
- npx rapidkit add module db_postgres
60
+ rapidkit create project fastapi.standard my-api --yes --skip-install
61
+ rapidkit create project nestjs.standard my-nest --yes --skip-install
62
+ rapidkit create project gofiber.standard my-fiber --yes --skip-install
184
63
  ```
185
64
 
186
- **NestJS:**
187
- ```bash
188
- # Create project
189
- npx rapidkit create project nestjs.standard my-service
65
+ ## Core Commands
190
66
 
191
- # Start developing
192
- cd my-service
193
- npx rapidkit init # Install dependencies
194
- npx rapidkit dev # Start dev server → http://localhost:3000
195
-
196
- # Add modules as needed
197
- npx rapidkit add module auth
198
- npx rapidkit add module db_postgres
199
- ```
67
+ ### Workspace lifecycle
200
68
 
201
- **Go (Fiber/Gin):**
202
69
  ```bash
203
- # Create project
204
- npx rapidkit create project gofiber.standard my-api
205
- # or
206
- npx rapidkit create project gogin.standard my-api
207
-
208
- # Start developing
209
- cd my-api
210
- npx rapidkit init # Install Go deps + tools + generate Swagger docs
211
- npx rapidkit dev # Start dev server with hot reload
70
+ rapidkit create workspace <name> [--profile <profile>] [--yes]
71
+ rapidkit bootstrap [--profile <profile>] [--json]
72
+ rapidkit setup <python|node|go> [--warm-deps]
73
+ rapidkit doctor workspace [--fix]
212
74
  ```
213
75
 
214
- > ℹ️ Go kits do not support `npx rapidkit add module ...` in this version.
215
-
216
- ### Option 2: Workspace (Recommended for Multiple Projects)
217
-
218
- Organize multiple microservices with a shared environment:
76
+ ### Project lifecycle
219
77
 
220
78
  ```bash
221
- # 1. Create workspace
222
- npx rapidkit my-workspace
223
- # Or with explicit command mode
224
- npx rapidkit create workspace my-workspace
225
- # Or interactive naming
226
- npx rapidkit create workspace
227
- cd my-workspace
228
-
229
- # 2. Activate environment (choose one):
230
-
231
- # A. Activate virtualenv (recommended)
232
- source "$(poetry env info --path)/bin/activate"
233
-
234
- # B. Use poetry run prefix
235
- poetry run rapidkit create
236
-
237
- # C. Create alias (add to ~/.bashrc or ~/.zshrc)
238
- alias rapidkit="poetry run rapidkit"
239
-
240
- # 3. Create projects
241
- rapidkit create # Interactive wizard
242
- rapidkit create project fastapi.standard api
243
- rapidkit create project nestjs.standard users
244
- rapidkit create project fastapi.ddd orders
245
-
246
- # 4. View all projects
247
- npx rapidkit workspace list
79
+ rapidkit create project <kit> <name> [--yes] [--skip-install]
80
+ rapidkit init
81
+ rapidkit dev
82
+ rapidkit test
83
+ rapidkit build
84
+ rapidkit start
248
85
  ```
249
86
 
250
- **Why workspace mode?**
251
- - ✅ One shared Python environment (~150MB once vs 150MB per project)
252
- - ✅ All projects auto-tracked in `~/.rapidkit/workspaces.json`
253
- - ✅ VS Code Extension auto-discovers projects
254
- - ✅ Consistent RapidKit Core version
255
- - ✅ Perfect for microservices architecture
256
-
257
- ### Next Steps
87
+ ### Operations
258
88
 
259
89
  ```bash
260
- # Project commands (run inside project directory)
261
- npx rapidkit init # Install dependencies
262
- npx rapidkit dev # Start dev server with hot reload
263
- npx rapidkit test # Run tests with coverage
264
- npx rapidkit lint # Run linting checks
265
- npx rapidkit format # Format code
266
- npx rapidkit build # Build for production
267
- npx rapidkit start # Start production server
268
-
269
- # Explore modules
270
- npx rapidkit modules list # List all 27+ modules (FastAPI/NestJS only)
271
- npx rapidkit modules info db_postgres # View module details
272
-
273
- # Health check
274
- npx rapidkit doctor # Check system requirements
275
- npx rapidkit doctor --workspace # Check entire workspace
90
+ rapidkit cache <status|clear|prune|repair>
91
+ rapidkit mirror <status|sync|verify|rotate>
276
92
  ```
277
93
 
278
- > 💡 **Pro Tip:** Install [RapidKit VS Code Extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode) for visual project creation, module browsing, and one-click installation!
279
-
280
- ---
94
+ ## Profiles
281
95
 
282
- ## 💎 Prefer Visual Interface?
96
+ - `minimal` baseline workspace scaffolding
97
+ - `python-only` — Python-focused workspace
98
+ - `node-only` — Node.js-focused workspace
99
+ - `go-only` — Go-focused workspace
100
+ - `polyglot` — Python + Node.js + Go
101
+ - `enterprise` — polyglot + governance-oriented checks
283
102
 
284
- <div align="center">
103
+ ## Policy Modes
285
104
 
286
- ### **RapidKit VS Code Extension** is the recommended way to use RapidKit
105
+ `mode` in `.rapidkit/policies.yml` controls enforcement:
287
106
 
288
- All npm CLI features + powerful visual tools in one integrated experience
107
+ - `warn` (default): report violations, continue
108
+ - `strict`: block incompatible operations
289
109
 
290
- [![Install Extension](https://img.shields.io/badge/Install-VS%20Code%20Extension-007ACC?style=for-the-badge&logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode)
110
+ ## Setup and Warm Dependencies
291
111
 
292
- </div>
112
+ `setup <runtime>` validates toolchain and updates `.rapidkit/toolchain.lock`.
293
113
 
294
- **Why use the Extension?**
114
+ `--warm-deps` adds optional dependency warm-up:
295
115
 
296
- | Feature | npm CLI | VS Code Extension |
297
- |---------|---------|-------------------|
298
- | **Project Creation** | Terminal commands | ✅ Visual wizard with preview |
299
- | **Module Browse** | ✅ List in terminal | ✅ Rich UI with search & categories |
300
- | **Module Installation** | ✅ `add module` command | ✅ One-click install with previews |
301
- | **Workspace Management** | ✅ Basic commands | ✅ Visual tree + auto-discovery |
302
- | **System Health Check** | ✅ `doctor` command | ✅ Real-time status indicators |
303
- | **Project Templates** | ✅ Kit selection | ✅ Preview + compare kits visually |
304
- | **Documentation** | ❌ External links | ✅ Integrated docs & tooltips |
305
- | **AI Recommendations** | ✅ Terminal prompts | ✅ Interactive suggestions panel |
306
- | **Multi-project View** | ❌ | ✅ Workspace explorer & switcher |
307
- | **Quick Actions** | ❌ | ✅ Right-click context menus |
116
+ - Node: lock/dependency warm-up in Node project directories
117
+ - Go: module warm-up in Go project directories
118
+ - Python: accepted, currently reports node/go scope
308
119
 
309
- **Extension-only features:**
310
- - 🎨 **Visual Project Browser**: See all projects at a glance
311
- - 📊 **Live Health Monitoring**: Real-time project status
312
- - 🔍 **Smart Search**: Find modules instantly with filters
313
- - 📝 **Inline Documentation**: Hover tooltips for every module
314
- - ⚡ **Quick Commands**: Keyboard shortcuts for common tasks
315
- - 🔄 **Auto-sync**: Automatically detect new projects
316
- - 🎯 **Context Menus**: Right-click actions everywhere
120
+ Warm-deps behavior is non-fatal by design and reports explicit outcome (`completed` / `failed` / `skipped`).
317
121
 
318
- > 💡 The Extension includes the full npm package functionality, so you get **both** the CLI and the visual interface!
122
+ ## VS Code Extension
319
123
 
320
- [📥 Install VS Code Extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode) [📖 Extension Docs](https://getrapidkit.com/docs/vscode-extension)
124
+ Use the RapidKit VS Code extension for visual workflows and workspace operations.
321
125
 
322
- ---
126
+ - Extension repository: https://github.com/getrapidkit/rapidkit-vscode
323
127
 
324
- ## 🧠 Core Concepts
128
+ ## CI Workflow Ownership Map
325
129
 
326
- ### Workspace vs Standalone
130
+ Use this map to avoid overlap when editing CI:
327
131
 
328
- Choose the right mode for your use case:
132
+ - `.github/workflows/ci.yml`
133
+ - Build/lint/typecheck/tests/coverage matrix
134
+ - General quality and contract gates
135
+ - `.github/workflows/workspace-e2e-matrix.yml`
136
+ - Cross-OS workspace lifecycle smoke
137
+ - Setup (`--warm-deps`) + cache/mirror ops
138
+ - Chaos/non-fatal warm-deps behavior (Ubuntu job)
139
+ - `.github/workflows/windows-bridge-e2e.yml`
140
+ - Native Windows bridge/lifecycle checks
141
+ - `.github/workflows/e2e-smoke.yml`
142
+ - Focused bridge regression smoke (fast, narrow scope)
143
+ - `.github/workflows/security.yml`
144
+ - Security scanning and policy checks
329
145
 
330
- | Feature | Workspace Mode | Standalone Mode |
331
- |---------|----------------|-----------------|
332
- | **Best For** | Teams, microservices, multiple projects | Single project, quick prototyping |
333
- | **Setup Time** | ~2 minutes (one time) | ~30 seconds |
334
- | **Disk Usage** | Efficient (one venv) | Higher (multiple venvs) |
335
- | **Python Environment** | Shared across all projects | Separate per project |
336
- | **Project Tracking** | Auto-tracked in registry | Manual |
337
- | **VS Code Extension** | Auto-discovery | Manual discovery |
146
+ ## Documentation Index
338
147
 
339
- ### Project Structure
148
+ Primary docs live under `docs/`:
340
149
 
341
- #### Workspace Structure
342
-
343
- ```
344
- my-workspace/
345
- ├── .rapidkit-workspace # Workspace marker file
346
- ├── .venv/ # Shared Python environment
347
- ├── poetry.lock # Locked dependencies
348
- ├── poetry.toml # Poetry configuration
349
- ├── pyproject.toml # Workspace Python config
350
- ├── rapidkit # CLI script (Unix)
351
- ├── rapidkit.cmd # CLI script (Windows)
352
- ├── README.md
353
- ├── my-api/ # FastAPI project
354
- ├── my-service/ # NestJS project
355
- └── my-admin/ # Another project
356
- ```
357
-
358
- #### FastAPI Project (DDD Architecture)
359
-
360
- ```
361
- my-api/
362
- ├── .rapidkit/ # RapidKit metadata & CLI
363
- │ ├── activate # Environment activation
364
- │ ├── cli.py # Local CLI commands
365
- │ ├── context.json # Build context
366
- │ └── rapidkit # Project CLI launcher
367
- ├── src/
368
- │ ├── app/ # DDD layers
369
- │ │ ├── application/ # Use cases & interfaces
370
- │ │ ├── domain/ # Business logic & models
371
- │ │ ├── infrastructure/ # External services & repos
372
- │ │ ├── presentation/ # API controllers & routes
373
- │ │ ├── config/ # Configuration
374
- │ │ ├── shared/ # Shared utilities
375
- │ │ └── main.py # Application entry
376
- │ ├── modules/ # RapidKit modules
377
- │ │ └── free/ # Free modules (auth, db, etc.)
378
- │ ├── routing/ # API routes
379
- │ ├── health/ # Health check endpoints
380
- │ ├── cli.py # CLI commands
381
- │ └── main.py # FastAPI app entry
382
- ├── tests/ # Test suite
383
- ├── config/ # Configuration files
384
- ├── .github/workflows/ # CI/CD pipelines
385
- ├── docker-compose.yml # Docker Compose setup
386
- ├── Dockerfile # Production container
387
- ├── Makefile # Quick commands
388
- ├── pyproject.toml # Poetry dependencies
389
- ├── poetry.lock # Locked dependencies
390
- ├── bootstrap.sh # Setup script
391
- ├── .env.example # Environment template
392
- ├── .pre-commit-config.yaml # Pre-commit hooks
393
- └── README.md
394
- ```
395
-
396
- #### NestJS Project (Standard Architecture)
397
-
398
- ```
399
- my-service/
400
- ├── .rapidkit/ # RapidKit metadata & CLI
401
- │ ├── activate # Environment activation
402
- │ ├── context.json # Build context
403
- │ └── rapidkit # Project CLI launcher
404
- ├── src/
405
- │ ├── app.module.ts # Root module
406
- │ ├── app.controller.ts # Root controller
407
- │ ├── app.service.ts # Root service
408
- │ ├── main.ts # NestJS entry point
409
- │ ├── config/ # Configuration module
410
- │ │ ├── configuration.ts
411
- │ │ ├── validation.ts
412
- │ │ └── index.ts
413
- │ ├── modules/ # RapidKit modules
414
- │ │ ├── free/ # Free modules (auth, db, etc.)
415
- │ │ └── index.ts # Module registry
416
- │ ├── auth/ # Auth feature module
417
- │ │ ├── auth.module.ts
418
- │ │ ├── auth.controller.ts
419
- │ │ ├── auth.service.ts
420
- │ │ └── entities/
421
- │ ├── examples/ # Example CRUD module
422
- │ │ ├── examples.module.ts
423
- │ │ ├── examples.controller.ts
424
- │ │ ├── examples.service.ts
425
- │ │ └── dto/
426
- │ └── health/ # Health check endpoints
427
- ├── test/ # E2E tests
428
- ├── tests/ # Unit tests
429
- ├── .github/workflows/ # CI/CD pipelines
430
- ├── docker-compose.yml # Docker Compose setup
431
- ├── Dockerfile # Production container
432
- ├── Makefile # Quick commands
433
- ├── package.json # npm dependencies
434
- ├── package-lock.json # Locked dependencies
435
- ├── nest-cli.json # NestJS CLI config
436
- ├── tsconfig.json # TypeScript config
437
- ├── tsconfig.build.json # Build config
438
- ├── jest.config.ts # Jest test config
439
- ├── eslint.config.cjs # ESLint config
440
- ├── bootstrap.sh # Setup script
441
- ├── .env.example # Environment template
442
- └── README.md
443
- ```
150
+ - General docs index: [docs/README.md](docs/README.md)
151
+ - Setup details: [docs/SETUP.md](docs/SETUP.md)
152
+ - Doctor command: [docs/doctor-command.md](docs/doctor-command.md)
153
+ - Workspace marker spec: [docs/WORKSPACE_MARKER_SPEC.md](docs/WORKSPACE_MARKER_SPEC.md)
154
+ - Config file guide: [docs/config-file-guide.md](docs/config-file-guide.md)
155
+ - Package manager policy: [docs/PACKAGE_MANAGER_POLICY.md](docs/PACKAGE_MANAGER_POLICY.md)
156
+ - Security: [docs/SECURITY.md](docs/SECURITY.md)
157
+ - Development: [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md)
444
158
 
445
- ### Module System
446
-
447
- RapidKit's modules are plug-and-play components that extend your project:
448
-
449
- > ℹ️ The module system currently supports **FastAPI** and **NestJS** kits.
450
- > Go kits (`gofiber.standard`, `gogin.standard`) currently do not support module installation.
159
+ ## Development
451
160
 
452
161
  ```bash
453
- # Add authentication
454
- rapidkit add module auth
455
-
456
- # Add database with caching
457
- rapidkit add module db_postgres
458
- rapidkit add module redis
459
-
460
- # Add payment processing
461
- rapidkit add module stripe
162
+ npm ci
163
+ npm run build
164
+ npm run test
165
+ npm run lint
166
+ npm run typecheck
462
167
  ```
463
168
 
464
- Modules include:
465
- - ✅ Pre-configured code
466
- - ✅ Dependencies (auto-added to pyproject.toml/package.json)
467
- - ✅ Configuration templates
468
- - ✅ Tests and documentation
469
- - ✅ Best practices baked in
470
-
471
- ### 🤖 AI-Powered Recommendations
472
-
473
- Not sure which modules you need? Ask AI:
169
+ Link local CLI globally for manual testing:
474
170
 
475
171
  ```bash
476
- npx rapidkit ai recommend "I want to build a SaaS with authentication and payments"
477
-
478
- # Output:
479
- # 📦 Recommended Modules:
480
- # 1. Authentication Core (92% match)
481
- # 2. Users Core (88% match)
482
- # 3. Stripe Payment (85% match)
483
- # 4. PostgreSQL (82% match)
172
+ npm run install:local
173
+ rapidkit --version
484
174
  ```
485
175
 
486
- **Setup (one-time):**
487
- ```bash
488
- rapidkit config set-api-key # Configure OpenAI API key
489
- rapidkit ai generate-embeddings # Generate embeddings (~$0.50)
490
- ```
491
-
492
- **Features:**
493
- - 🧠 Understands natural language queries
494
- - 🎯 Suggests relevant modules with confidence scores
495
- - 💰 Ultra-cheap: ~$0.0002 per query
496
- - ✅ Works in mock mode without API key (for testing)
497
-
498
- [More about AI features →](https://getrapidkit.com/docs/ai)
499
-
500
- ---
501
-
502
- ## 🧩 Module Ecosystem
503
-
504
- RapidKit includes **27 production-ready modules** across 10 categories for **FastAPI** and **NestJS** projects:
505
-
506
- ### Quick Overview
507
-
508
- - 🔐 **Authentication** (5 modules): Core Auth, API Keys, OAuth, Passwordless, Sessions
509
- - 💳 **Payments & E-commerce** (3): Stripe, Shopping Cart, Inventory
510
- - 🗄️ **Databases** (3): PostgreSQL, MongoDB, SQLite
511
- - 🔒 **Security** (3): CORS, Rate Limiting, Security Headers
512
- - 📧 **Communication** (2): Email, Unified Notifications
513
- - 👥 **User Management** (2): Users Core, User Profiles
514
- - ⚙️ **Essentials** (4): Settings, Middleware, Logging, Deployment
515
- - 📊 **Observability** (1): Metrics & Tracing
516
- - 💾 **Caching** (1): Redis
517
- - 🤖 **AI** (1): AI Assistant
518
- - ⚡ **Tasks** (1): Celery
519
- - 💼 **Storage** (1): File Management
520
-
521
- ### Browse & Install
522
-
523
- ```bash
524
- # List all modules
525
- rapidkit modules list
526
-
527
- # View module details
528
- rapidkit modules info auth
529
- rapidkit modules info db_postgres
530
-
531
- # Install modules
532
- rapidkit add module auth
533
- rapidkit add module db_postgres redis
534
- ```
535
-
536
- ### Popular Combinations
537
-
538
- **SaaS Starter:**
539
- ```bash
540
- rapidkit add module auth users db_postgres redis session
541
- ```
542
-
543
- **E-commerce API:**
544
- ```bash
545
- rapidkit add module auth users db_postgres cart inventory stripe
546
- ```
547
-
548
- **Enterprise API:**
549
- ```bash
550
- rapidkit add module auth api_keys db_postgres redis rate_limiting observability
551
- ```
552
-
553
- 📚 **[View Full Module Catalog →](https://getrapidkit.com/modules)**
554
-
555
- ---
556
-
557
- ## 💻 Commands Reference
558
-
559
- ### Global Commands (Run Anywhere)
560
-
561
- ```bash
562
- # Workspace creation
563
- npx rapidkit <name> # Legacy stable workspace creation
564
- npx rapidkit create workspace # Interactive workspace creation
565
- npx rapidkit create workspace <name> # Create workspace with name
566
-
567
- # Project creation
568
- npx rapidkit create project # Interactive wizard
569
- npx rapidkit create project <kit> <name> # Direct creation
570
-
571
- # Information
572
- npx rapidkit list # List kits
573
- npx rapidkit modules list # List modules (FastAPI/NestJS kits)
574
- npx rapidkit kits info <name> # Kit details
575
- npx rapidkit modules info <name> # Module details
576
-
577
- # System health
578
- npx rapidkit doctor # Check system
579
- npx rapidkit doctor --workspace # Check workspace
580
- npx rapidkit doctor --workspace --fix # Auto-fix issues
581
- npx rapidkit doctor --workspace --json # JSON output (CI/CD)
582
-
583
- # Workspace management
584
- npx rapidkit workspace list # List workspaces
585
- npx rapidkit workspace sync # Sync projects
586
-
587
- # CLI info
588
- npx rapidkit --version # Show version
589
- npx rapidkit --help # Show help
590
- ```
591
-
592
- `npx rapidkit create workspace` interactive prompts:
593
- - Without a name: asks workspace name, author name, Python version, and install method.
594
- - With a name: asks author name, Python version, and install method.
595
- - With `--yes`: skips prompts and uses defaults.
596
-
597
- ### Init & Project Commands
598
-
599
- ```bash
600
- npx rapidkit init # Context-aware init (see behavior below)
601
- npx rapidkit dev # Start dev server with hot reload
602
- npx rapidkit start # Start production server
603
- npx rapidkit build # Build for production
604
- npx rapidkit test # Run tests with coverage
605
- npx rapidkit lint # Run linting
606
- npx rapidkit format # Format code
607
- ```
608
-
609
- `npx rapidkit init` behavior:
610
- - In a plain folder: creates `my-workspace` (or `my-workspace-<n>` if needed) and initializes it.
611
- - In a workspace root: initializes workspace dependencies, then initializes all detected child projects.
612
- - In a project inside a workspace: initializes only that project.
613
-
614
- Quick examples:
615
-
616
- ```bash
617
- # Plain folder
618
- cd ~/new-folder && npx rapidkit init
619
-
620
- # Workspace root
621
- cd ~/my-workspace && npx rapidkit init
622
-
623
- # Project inside workspace
624
- cd ~/my-workspace/my-api && npx rapidkit init
625
- ```
626
-
627
- ### Module Commands
628
-
629
- ```bash
630
- npx rapidkit add module <slug> # Add single module
631
- npx rapidkit add module auth redis # Add multiple modules
632
- npx rapidkit modules list # List available modules
633
- npx rapidkit modules info <slug> # Module details
634
- ```
635
-
636
- > ℹ️ `add module` and `modules ...` commands apply to **FastAPI/NestJS** projects.
637
- > For Go kits, these commands are intentionally unavailable in this release.
638
-
639
- ### Advanced Options
640
-
641
- ```bash
642
- # Workspace creation
643
- npx rapidkit <name> --yes # Skip prompts
644
- npx rapidkit <name> --skip-git # Skip git init
645
- npx rapidkit <name> --dry-run # Preview only
646
- npx rapidkit <name> --debug # Verbose logging
647
- npx rapidkit create workspace --yes # Create default my-workspace non-interactive
648
- npx rapidkit create workspace <name> --yes # Create named workspace non-interactive
649
-
650
- # Project creation
651
- npx rapidkit create --output <dir> # Custom location
652
- npx rapidkit create --no-update-check # Skip version check
653
- ```
654
-
655
- **Quick Reference Table:**
656
-
657
- | Command | Description | Context |
658
- |---------|-------------|---------|
659
- | `create workspace` | Create workspace | Anywhere |
660
- | `create project` | Create project | Anywhere |
661
- | `init` | Context-aware dependency setup | Folder / workspace / project |
662
- | `dev` | Start dev server | Inside project |
663
- | `test` | Run tests | Inside project |
664
- | `add module` | Add module to project (FastAPI/NestJS) | Inside project |
665
- | `list` | List kits | Anywhere |
666
- | `modules list` | List modules (FastAPI/NestJS) | Anywhere |
667
- | `doctor` | Health check | Anywhere |
668
- | `workspace` | Manage workspaces | Anywhere |
669
-
670
- ---
671
-
672
- ## 📋 Requirements
673
-
674
- ### System Requirements
675
-
676
- - **Node.js**: 20.19.6+ LTS (20.x or 22.x recommended)
677
- - **Python**: 3.10+ (required for RapidKit Core)
678
- - **Git**: For version control
679
-
680
- ### Framework-Specific
681
-
682
- **FastAPI Projects:**
683
- - Python 3.10+
684
- - Poetry (auto-installed if missing)
685
-
686
- **NestJS Projects:**
687
- - Node.js 20.19.6+
688
- - npm
689
-
690
- **Go Projects (Fiber/Gin Kits):**
691
- - Go 1.23+ (or the version configured by the selected kit)
692
- - Make (recommended for `make dev/test/build/docs` targets)
693
-
694
- ### Optional but Recommended
695
-
696
- - **Docker**: For containerized development
697
- - **VS Code**: For Extension integration
698
- - **Make**: For Makefile commands (pre-installed on Unix)
699
-
700
- > 💡 **Tip:** Use `rapidkit doctor` to check all requirements automatically!
701
-
702
- ---
703
-
704
- ## ❓ FAQs
705
-
706
- <details>
707
- <summary><strong>Do I need Python installed?</strong></summary>
708
-
709
- Yes, Python 3.10+ is required for RapidKit Core (the engine). The npm package will bootstrap it if needed, but system-wide installation is recommended.
710
- </details>
711
-
712
- <details>
713
- <summary><strong>Can I use this without npm?</strong></summary>
714
-
715
- Yes! Install globally: `npm i -g rapidkit`, then use `rapidkit` directly. You'll still need Node.js installed.
716
- </details>
717
-
718
- <details>
719
- <summary><strong>What's the difference from cookiecutter?</strong></summary>
720
-
721
- RapidKit provides:
722
- - **Living templates** that receive updates
723
- - **27+ plug-and-play modules**
724
- - **Workspace management**
725
- - **VS Code integration**
726
- - **Built-in dev commands** (dev, test, lint)
727
-
728
- Cookiecutter is one-time scaffolding. RapidKit is a complete development platform.
729
- </details>
730
-
731
- <details>
732
- <summary><strong>Do I need the VS Code Extension?</strong></summary>
733
-
734
- No, but highly recommended! It provides visual interface, one-click module installation, workspace browser, and system checker.
735
- </details>
736
-
737
- <details>
738
- <summary><strong>Can I customize generated projects?</strong></summary>
739
-
740
- Yes! After generation, files are yours. Modify as needed, add/remove modules, update dependencies. RapidKit won't overwrite your changes.
741
- </details>
742
-
743
- <details>
744
- <summary><strong>How do I upgrade RapidKit?</strong></summary>
745
-
746
- ```bash
747
- # For npx usage (automatic)
748
- npx rapidkit@latest create
749
-
750
- # For global install
751
- npm update -g rapidkit
752
-
753
- # For workspace Python Core
754
- cd my-workspace
755
- poetry update rapidkit-core
756
- ```
757
- </details>
758
-
759
- <details>
760
- <summary><strong>Is there Docker support?</strong></summary>
761
-
762
- Yes! All projects include:
763
- - `Dockerfile` for production
764
- - `docker-compose.yml` for development
765
- - `.dockerignore` for optimization
766
-
767
- ```bash
768
- docker-compose up # Development
769
- docker build -t my-service . && docker run -p 8000:8000 my-service # Production
770
- ```
771
- </details>
772
-
773
- **More Questions?** Check [Full Documentation](https://getrapidkit.com) or [Open an Issue](https://github.com/getrapidkit/rapidkit-npm/issues)
774
-
775
- ---
776
-
777
- ## 🔗 Links
778
-
779
- ### 📚 Documentation & Resources
780
- - [Official Website](https://getrapidkit.com) – Complete documentation and guides
781
- - [Full Module Catalog](https://getrapidkit.com/modules) – Browse all 27+ modules
782
- - [Getting Started Guide](https://getrapidkit.com/docs/getting-started) – Step-by-step tutorials
783
-
784
- ### 🛠️ Tools & Extensions
785
- - [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode) – Visual project creation & module management
786
- - [RapidKit Core (Python)](https://pypi.org/project/rapidkit-core/) – The engine powering RapidKit
787
-
788
- ### 💬 Community & Support
789
- - [GitHub Discussions](https://github.com/getrapidkit/rapidkit-npm/discussions) – Ask questions & share ideas
790
- - [GitHub Issues](https://github.com/getrapidkit/rapidkit-npm/issues) – Report bugs & request features
791
- - [Discord Community](https://discord.gg/rapidkit) – Chat with other developers
792
-
793
- ### 📱 Social
794
- - [Twitter/X](https://twitter.com/getrapidkit) – Updates & announcements
795
- - [GitHub Organization](https://github.com/getrapidkit) – All repositories
796
- - [Blog](https://getrapidkit.com/blog) – Tutorials & best practices
797
-
798
- ---
799
-
800
- <div align="center">
801
-
802
- **Made with ❤️ by the RapidKit team**
176
+ ## Troubleshooting
803
177
 
804
- Star this repo if you find it helpful!
178
+ - If setup output looks stale, run `rapidkit setup <runtime>` again to refresh `.rapidkit/toolchain.lock`.
179
+ - If dependency warm-up is skipped, verify you are inside the corresponding project directory (`package.json` for Node, `go.mod` for Go).
180
+ - For strict-mode blocks, inspect `.rapidkit/policies.yml` and workspace profile in `.rapidkit/workspace.json`.
805
181
 
806
- [Install Now](https://www.npmjs.com/package/rapidkit) • [Read Docs](https://getrapidkit.com) • [Get Extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode)
182
+ ## License
807
183
 
808
- </div>
184
+ MIT — see [LICENSE](LICENSE).