rapidkit 0.26.0 → 0.27.1
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 +26 -2
- package/dist/{create-YIUV6RUX.js → create-3V7O72CO.js} +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +138 -130
- package/dist/package.json +1 -1
- package/dist/{workspace-VN3VF62I.js → workspace-7JHX7L3E.js} +50 -50
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ FastAPI, NestJS, Spring Boot, Go/Fiber, and Go/Gin scaffolding with production-r
|
|
|
6
6
|
**27+ plug-and-play modules** are available for FastAPI & NestJS projects. Spring Boot and Go kits run as npm-level generators.
|
|
7
7
|
Clean architecture • Zero boilerplate • Instant deployment.
|
|
8
8
|
|
|
9
|
-
> **💡 Recommended:** Install the [Workspai VS Code extension](https://
|
|
9
|
+
> **💡 Recommended:** Install the [Workspai VS Code extension](https://marketplace.visualstudio.com/items?itemName=rapidkit.rapidkit-vscode) for AI-powered project creation, a visual workspace explorer, and context-aware coding assistance — all backed by this CLI.
|
|
10
10
|
|
|
11
11
|
[](https://www.npmjs.com/package/rapidkit)
|
|
12
12
|
[](https://www.npmjs.com/package/rapidkit)
|
|
@@ -98,8 +98,32 @@ npx rapidkit workspace policy set <key> <value>
|
|
|
98
98
|
npx rapidkit doctor
|
|
99
99
|
npx rapidkit doctor workspace [--fix]
|
|
100
100
|
npx rapidkit workspace list # Display all workspaces created on this system
|
|
101
|
+
npx rapidkit workspace share [--output <file>] [--include-paths] [--no-doctor]
|
|
101
102
|
```
|
|
102
103
|
|
|
104
|
+
### Workspace collaboration bundle
|
|
105
|
+
|
|
106
|
+
Use `workspace share` to export a portable JSON snapshot for team handoff,
|
|
107
|
+
debugging, and cross-machine diagnostics.
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npx rapidkit workspace share
|
|
111
|
+
# default output: .rapidkit/reports/share-bundle.json
|
|
112
|
+
|
|
113
|
+
npx rapidkit workspace share --output ./team-share.json
|
|
114
|
+
npx rapidkit workspace share --include-paths
|
|
115
|
+
npx rapidkit workspace share --no-doctor
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Bundle content includes:
|
|
119
|
+
|
|
120
|
+
- Workspace metadata (`name`, `profile`, RapidKit version)
|
|
121
|
+
- Discovered RapidKit projects (`relative_path`, runtime, kit)
|
|
122
|
+
- Workspace and project report file index
|
|
123
|
+
- Latest doctor evidence per project (unless `--no-doctor` is used)
|
|
124
|
+
|
|
125
|
+
`--include-paths` is intended for internal teams only because it includes absolute filesystem paths.
|
|
126
|
+
|
|
103
127
|
### Command ownership
|
|
104
128
|
|
|
105
129
|
RapidKit keeps the wrapper boundary explicit so users know which layer owns each action.
|
|
@@ -210,7 +234,7 @@ visual workspace explorer, AI-powered project creation, and context-aware coding
|
|
|
210
234
|
Search **Workspai** in the VS Code Extensions marketplace, or:
|
|
211
235
|
|
|
212
236
|
```bash
|
|
213
|
-
|
|
237
|
+
ext install rapidkit.rapidkit-vscode
|
|
214
238
|
```
|
|
215
239
|
|
|
216
240
|
> The extension calls this CLI under the hood — both tools work together seamlessly.
|
|
@@ -103,7 +103,7 @@ npx rapidkit dev
|
|
|
103
103
|
cd <project-name>
|
|
104
104
|
npx rapidkit init
|
|
105
105
|
npx rapidkit dev
|
|
106
|
-
`)+"```\n","utf-8"),!e){f.start("Initializing git repository");try{await execa("git",["init"],{cwd:i$1}),await execa("git",["add","."],{cwd:i$1}),await execa("git",["commit","-m","Initial commit: RapidKit workspace"],{cwd:i$1}),f.succeed("Git repository initialized");}catch{f.warn("Could not initialize git repository");}}try{let{registerWorkspace:k}=await import('./workspace-
|
|
106
|
+
`)+"```\n","utf-8"),!e){f.start("Initializing git repository");try{await execa("git",["init"],{cwd:i$1}),await execa("git",["add","."],{cwd:i$1}),await execa("git",["commit","-m","Initial commit: RapidKit workspace"],{cwd:i$1}),f.succeed("Git repository initialized");}catch{f.warn("Could not initialize git repository");}}try{let{registerWorkspace:k}=await import('./workspace-7JHX7L3E.js');await k(i$1,c);}catch{}if(console.log(o.green(`
|
|
107
107
|
\u2728 Workspace created!
|
|
108
108
|
`)),console.log(o.cyan("\u{1F4C2} Location:"),o.white(i$1)),console.log(o.cyan(`
|
|
109
109
|
\u{1F680} Get started:
|
|
@@ -118,7 +118,7 @@ npx rapidkit dev
|
|
|
118
118
|
`)),console.log(o.cyan(`\u{1F4A1} How to install Python:
|
|
119
119
|
`)),console.log(o.white(" Ubuntu / Debian: sudo apt install python3.10")),console.log(o.white(" macOS (Homebrew): brew install python@3.10")),console.log(o.white(` Windows: https://python.org/downloads
|
|
120
120
|
`)),console.log(o.gray(` After installing Python, run: npx rapidkit ${c}
|
|
121
|
-
`)),process.exit(1));}a$1.step(1,3,"Setting up RapidKit environment");let P=z("Creating directory").start();try{await v.ensureDir(i$1),P.succeed("Directory created"),P.start("Detecting Python version");let f=null,R=await kt(x.pythonVersion);if(R)f=await pt(R),f?(a$1.info(` Detected Python ${f}`),P.succeed(`Python ${f} detected`)):P.warn("Could not detect exact Python version");else {let k=C();f=await pt(k),f?P.succeed(`Python ${f} detected`):P.warn("Could not detect Python version, proceeding with defaults");}if(x.installMethod==="poetry"&&!await wt()&&(P.warn("Poetry not found \u2014 auto-fallback to pip + venv"),x.installMethod="venv"),await et(i$1,c,x.installMethod,f||void 0),f&&await jt(i$1,f),await nt(i$1,c,x.installMethod,f||x.pythonVersion,p||h),await H(i$1),await ot(i$1,c),x.installMethod==="poetry")try{await bt(i$1,x.pythonVersion,P,r,g,u);}catch(k){let _=k?.details||k?.message||String(k);if(_.includes("pyenv")||_.includes("exit status 127")||_.includes("returned non-zero exit status 127")){P.warn("Poetry encountered Python discovery issues, trying venv method"),a$1.debug(`Poetry error (attempting venv fallback): ${_}`);try{await rt(i$1,x.pythonVersion,P,r,g),x.installMethod="venv";}catch(at){throw at}}else throw k}else x.installMethod==="venv"?await rt(i$1,x.pythonVersion,P,r,g):await Pt(i$1,P,r,g,u);if(await vt(i$1,x.installMethod),await xt(i$1,x.installMethod),P.succeed("RapidKit environment ready!"),!n.skipGit){P.start("Initializing git repository");try{await execa("git",["init"],{cwd:i$1}),await execa("git",["add","."],{cwd:i$1}),await execa("git",["commit","-m","Initial commit: RapidKit environment"],{cwd:i$1}),P.succeed("Git repository initialized");}catch{P.warn("Could not initialize git repository");}}try{let{registerWorkspace:k}=await import('./workspace-
|
|
121
|
+
`)),process.exit(1));}a$1.step(1,3,"Setting up RapidKit environment");let P=z("Creating directory").start();try{await v.ensureDir(i$1),P.succeed("Directory created"),P.start("Detecting Python version");let f=null,R=await kt(x.pythonVersion);if(R)f=await pt(R),f?(a$1.info(` Detected Python ${f}`),P.succeed(`Python ${f} detected`)):P.warn("Could not detect exact Python version");else {let k=C();f=await pt(k),f?P.succeed(`Python ${f} detected`):P.warn("Could not detect Python version, proceeding with defaults");}if(x.installMethod==="poetry"&&!await wt()&&(P.warn("Poetry not found \u2014 auto-fallback to pip + venv"),x.installMethod="venv"),await et(i$1,c,x.installMethod,f||void 0),f&&await jt(i$1,f),await nt(i$1,c,x.installMethod,f||x.pythonVersion,p||h),await H(i$1),await ot(i$1,c),x.installMethod==="poetry")try{await bt(i$1,x.pythonVersion,P,r,g,u);}catch(k){let _=k?.details||k?.message||String(k);if(_.includes("pyenv")||_.includes("exit status 127")||_.includes("returned non-zero exit status 127")){P.warn("Poetry encountered Python discovery issues, trying venv method"),a$1.debug(`Poetry error (attempting venv fallback): ${_}`);try{await rt(i$1,x.pythonVersion,P,r,g),x.installMethod="venv";}catch(at){throw at}}else throw k}else x.installMethod==="venv"?await rt(i$1,x.pythonVersion,P,r,g):await Pt(i$1,P,r,g,u);if(await vt(i$1,x.installMethod),await xt(i$1,x.installMethod),P.succeed("RapidKit environment ready!"),!n.skipGit){P.start("Initializing git repository");try{await execa("git",["init"],{cwd:i$1}),await execa("git",["add","."],{cwd:i$1}),await execa("git",["commit","-m","Initial commit: RapidKit environment"],{cwd:i$1}),P.succeed("Git repository initialized");}catch{P.warn("Could not initialize git repository");}}try{let{registerWorkspace:k}=await import('./workspace-7JHX7L3E.js');await k(i$1,c);}catch{console.warn(o.gray("Note: Could not register workspace in shared registry"));}if(console.log(o.green(`
|
|
122
122
|
\u2728 RapidKit environment created successfully!
|
|
123
123
|
`)),console.log(o.cyan("\u{1F4C2} Location:"),o.white(i$1)),console.log(o.cyan(`\u{1F680} Get started:
|
|
124
124
|
`)),console.log(o.white(` cd ${c}`)),x.installMethod==="poetry"){let k="source $(poetry env info --path)/bin/activate";try{D();let{stdout:_}=await execa("poetry",["--version"]),M=_.match(/Poetry.*?(\d+)\.(\d+)/);M&&(parseInt(M[1])>=2?k="source $(poetry env info --path)/bin/activate":k="poetry shell");}catch{}console.log(o.white(` ${k} # Or: poetry run rapidkit`)),console.log(o.white(" rapidkit create # Interactive mode")),console.log(o.white(" cd <project-name>")),console.log(o.white(" rapidkit init")),console.log(o.white(" rapidkit dev"));}else x.installMethod==="venv"?(console.log(o.white(" source .venv/bin/activate # On Windows: .venv\\Scripts\\activate")),console.log(o.white(" rapidkit create # Interactive mode")),console.log(o.white(" cd <project-name>")),console.log(o.white(" rapidkit init")),console.log(o.white(" rapidkit dev"))):(console.log(o.white(" rapidkit create # Interactive mode")),console.log(o.white(" cd <project-name>")),console.log(o.white(" rapidkit init")),console.log(o.white(" rapidkit dev")));console.log(o.white(`
|
|
@@ -159,7 +159,7 @@ Possible solutions:
|
|
|
159
159
|
1. Check your internet connection
|
|
160
160
|
2. Try installing manually: cd ${m.basename(t)} && ${f(".venv")} -m pip install rapidkit-core
|
|
161
161
|
3. Use Poetry instead: npx rapidkit ${m.basename(t)} --install-method=poetry`))}}e.succeed("RapidKit installed in project virtualenv");try{let{checkRapidkitCoreAvailable:y}=await import('./pythonRapidkitExec-K2SFGAYJ.js');if(!await y()&&!r){e.start("Checking optional global pipx installation");let c=await q(e,true);try{e.start("Installing RapidKit globally with pipx for CLI access"),await F(c,["install","rapidkit-core"]),e.succeed("RapidKit installed globally");}catch(i){e.warn("Could not install globally (non-fatal, project virtualenv has RapidKit)"),a$1.debug(`pipx install failed: ${i}`);}}}catch(y){e.succeed("Skipped optional global pipx installation"),a$1.debug(`Global install check skipped: ${y}`);}}async function Pt(t,n,e,r,s=false){let d=await q(n,s);if(n.start("Installing RapidKit globally with pipx"),e){let u=d$2(r||{});if(!u)throw new k("Test mode installation",new Error("No local RapidKit path configured. Set RAPIDKIT_DEV_PATH environment variable."));a$1.debug(`Installing from local path: ${u}`),n.text="Installing RapidKit from local path (test mode)",await F(d,["install","-e",u]);}else {n.text="Installing RapidKit from PyPI";try{await F(d,["install","rapidkit-core"]);}catch{throw new l}}n.succeed("RapidKit installed globally"),await v.outputFile(m.join(t,".rapidkit-global"),`RapidKit installed globally with pipx
|
|
162
|
-
`,"utf-8");}async function ne(t,n){let{skipGit:e=false,testMode:r=false,userConfig:s={},yes:d=false,installMethod:u,pythonVersion:g="3.10"}=n||{},y=u||s.defaultInstallMethod||await(async()=>{try{return await execa("poetry",["--version"],{timeout:3e3}),"poetry"}catch{return a$1.warn("Poetry not found \u2014 auto-selecting venv. Pass --install-method poetry to override."),"venv"}})(),h=y==="poetry"&&!await wt()?"venv":y;await et(t,m.basename(t),h),await H(t),await nt(t,m.basename(t),h,g,n?.profile);let c=z("Registering workspace").start();try{h==="poetry"?(await ot(t,m.basename(t)),await bt(t,g,c,r,s,d)):h==="venv"?await rt(t,g,c,r,s):await Pt(t,c,r,s,d),await vt(t,h),await xt(t,h),c.succeed("Workspace registered");try{let{registerWorkspace:i}=await import('./workspace-
|
|
162
|
+
`,"utf-8");}async function ne(t,n){let{skipGit:e=false,testMode:r=false,userConfig:s={},yes:d=false,installMethod:u,pythonVersion:g="3.10"}=n||{},y=u||s.defaultInstallMethod||await(async()=>{try{return await execa("poetry",["--version"],{timeout:3e3}),"poetry"}catch{return a$1.warn("Poetry not found \u2014 auto-selecting venv. Pass --install-method poetry to override."),"venv"}})(),h=y==="poetry"&&!await wt()?"venv":y;await et(t,m.basename(t),h),await H(t),await nt(t,m.basename(t),h,g,n?.profile);let c=z("Registering workspace").start();try{h==="poetry"?(await ot(t,m.basename(t)),await bt(t,g,c,r,s,d)):h==="venv"?await rt(t,g,c,r,s):await Pt(t,c,r,s,d),await vt(t,h),await xt(t,h),c.succeed("Workspace registered");try{let{registerWorkspace:i}=await import('./workspace-7JHX7L3E.js');await i(t,m.basename(t));}catch{}if(!e){c.start("Initializing git repository");try{await execa("git",["init"],{cwd:t}),await execa("git",["add","."],{cwd:t}),await execa("git",["commit","-m","Initial commit: RapidKit workspace"],{cwd:t}),c.succeed("Git repository initialized");}catch{c.warn("Could not initialize git repository");}}}catch(i){throw c.fail("Failed to register workspace"),i}}async function xt(t,n){let e=n==="poetry"?`source $(poetry env info --path)/bin/activate
|
|
163
163
|
# Or simply use: poetry run rapidkit <command>`:n==="venv"?"source .venv/bin/activate # On Windows: .venv\\Scripts\\activate":"N/A (globally installed)",r=n==="poetry"?`# No activation needed (recommended):
|
|
164
164
|
./rapidkit --help
|
|
165
165
|
# or:
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
declare function handleCreateOrFallback(args: string[]): Promise<number>;
|
|
3
|
-
declare const NPM_ONLY_TOP_LEVEL_COMMANDS: readonly ["doctor", "workspace", "bootstrap", "setup", "cache", "mirror", "ai", "config", "shell"];
|
|
3
|
+
declare const NPM_ONLY_TOP_LEVEL_COMMANDS: readonly ["readiness", "doctor", "workspace", "bootstrap", "setup", "cache", "mirror", "ai", "config", "shell"];
|
|
4
4
|
declare const WRAPPER_ORCHESTRATED_PROJECT_COMMANDS: readonly ["init"];
|
|
5
5
|
interface DoctorWorkspaceShadowDiagnostic {
|
|
6
6
|
detected: boolean;
|