rapidkit 0.34.0 → 0.36.0

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.
Files changed (64) hide show
  1. package/README.md +137 -706
  2. package/contracts/backend-import-stack-parity.snapshot.json +36 -36
  3. package/contracts/infra-stack.v1.json +190 -47
  4. package/contracts/module-layout.v1.json +12 -3
  5. package/contracts/module-support.v1.json +20 -0
  6. package/contracts/runtime-command-surface.v1.json +139 -22
  7. package/contracts/workspace-intelligence/workspace-context.v1.json +59 -0
  8. package/contracts/workspace-intelligence/workspace-impact.v1.json +84 -0
  9. package/contracts/workspace-intelligence/workspace-model-diff.v1.json +105 -0
  10. package/contracts/workspace-intelligence/workspace-model-snapshot.v1.json +36 -0
  11. package/contracts/workspace-intelligence/workspace-model.v1.json +50 -0
  12. package/contracts/workspace-intelligence/workspace-verify.v1.json +111 -0
  13. package/dist/analyze-HXO6R656.js +1 -0
  14. package/dist/autopilot-release-FMQ5KND5.js +1 -0
  15. package/dist/chunk-45KNNNAB.js +2 -0
  16. package/dist/chunk-7ZSURMR2.js +4 -0
  17. package/dist/chunk-A5FBGRJA.js +1 -0
  18. package/dist/{chunk-3TBSWOTY.js → chunk-DC44JPI3.js} +13 -13
  19. package/dist/chunk-HHJAANUC.js +1 -0
  20. package/dist/{chunk-2PGMJSO5.js → chunk-HUQ5WRUF.js} +86 -86
  21. package/dist/chunk-KIB4KHBF.js +3 -0
  22. package/dist/chunk-KMUWWZRT.js +1 -0
  23. package/dist/chunk-MCLLP6MW.js +2 -0
  24. package/dist/chunk-OCGZNSOE.js +1 -0
  25. package/dist/chunk-TC2PSHT6.js +50 -0
  26. package/dist/chunk-UY4LZEXK.js +7 -0
  27. package/dist/chunk-UZW5QFRW.js +5 -0
  28. package/dist/chunk-VPNHGQIV.js +1 -0
  29. package/dist/chunk-Y2ZPG7KN.js +9 -0
  30. package/dist/chunk-YBS2HGO3.js +2 -0
  31. package/dist/chunk-YJ24EV3P.js +1 -0
  32. package/dist/create-7R4CGABE.js +1 -0
  33. package/dist/{doctor-3SBEO7XU.js → doctor-DG3TBPZN.js} +1 -1
  34. package/dist/imported-projects-registry-ZOCHFWMK.js +1 -0
  35. package/dist/index.d.ts +29 -2
  36. package/dist/index.js +135 -129
  37. package/dist/module-layout-NZ43RSC5.js +1 -0
  38. package/dist/pipeline-23AEXNF2.js +5 -0
  39. package/dist/{workspace-AG2MQFTY.js → workspace-ZDL5IQU4.js} +1 -1
  40. package/dist/workspace-context-YFQQROOZ.js +2 -0
  41. package/dist/{workspace-contract-Z5VYUF3T.js → workspace-contract-A6QP7FPA.js} +1 -1
  42. package/dist/workspace-foundation-QVWALXMP.js +1 -0
  43. package/dist/workspace-intelligence-VLA2RILM.js +1 -0
  44. package/dist/workspace-model-OO4WOBJS.js +1 -0
  45. package/dist/workspace-run-NIKH2IKF.js +1 -0
  46. package/dist/workspace-verify-XEXRCET7.js +1 -0
  47. package/package.json +14 -4
  48. package/dist/analyze-SVYRQNLO.js +0 -1
  49. package/dist/autopilot-release-LBKCP73F.js +0 -1
  50. package/dist/chunk-4E6ZGX6V.js +0 -1
  51. package/dist/chunk-ILY6QARY.js +0 -9
  52. package/dist/chunk-JIECGCLV.js +0 -4
  53. package/dist/chunk-KXTXQODI.js +0 -5
  54. package/dist/chunk-QCZGNOTH.js +0 -2
  55. package/dist/chunk-QUNCXYYK.js +0 -1
  56. package/dist/chunk-RGXFDBYB.js +0 -7
  57. package/dist/chunk-SAIWD6VM.js +0 -3
  58. package/dist/chunk-Y3UKTEZO.js +0 -2
  59. package/dist/chunk-YV7IQDBM.js +0 -50
  60. package/dist/create-BO2I3ESU.js +0 -1
  61. package/dist/module-layout-J56LHEGH.js +0 -1
  62. package/dist/pipeline-VUQ6AXKF.js +0 -5
  63. package/dist/workspace-foundation-G74V6K4U.js +0 -1
  64. package/dist/workspace-run-EDM3SUPA.js +0 -1
@@ -1,12 +1,12 @@
1
- import {i,d as d$2,l,k as k$1,f as f$1,g,h}from'./chunk-IATULVMR.js';import {a,d,b as b$1}from'./chunk-RV6HBTFC.js';import {a as a$2,e,d as d$1,f,c,k as k$2}from'./chunk-Z5LKRG57.js';import {b}from'./chunk-AC6KIKII.js';import {a as a$1}from'./chunk-VM2TOHNX.js';import {promises}from'fs';import*as k from'fs-extra';import m from'path';import q from'inquirer';import t from'chalk';import F from'ora';import {execa}from'execa';function A(){return c()}async function U(e,o,n,r){let l=d(o,b(),n);r&&(l.metadata||(l.metadata={}),l.metadata.python={version:r}),await b$1(e,l);}async function L(e){await k.outputFile(m.join(e,".gitignore"),`.venv/
1
+ import {i,d as d$2,l,k,f as f$1,g as g$1,h}from'./chunk-IATULVMR.js';import {a,d,b as b$2}from'./chunk-RV6HBTFC.js';import {b as b$1}from'./chunk-AC6KIKII.js';import {a as a$1}from'./chunk-VM2TOHNX.js';import {a as a$2,e,d as d$1,f,c,k as k$1}from'./chunk-Z5LKRG57.js';import {promises}from'fs';import*as b from'fs-extra';import g from'path';import q from'inquirer';import t from'chalk';import F from'ora';import {execa}from'execa';function A(){return c()}async function H(e,o,n,a){let s=d(o,b$1(),n);a&&(s.metadata||(s.metadata={}),s.metadata.python={version:a}),await b$2(e,s);}async function L(e){await b.outputFile(g.join(e,".gitignore"),`.venv/
2
2
  __pycache__/
3
3
  *.pyc
4
4
  .env
5
5
  .rapidkit-workspace/
6
6
 
7
- `,"utf-8");}async function z(e,o){let n=o.replace(/[^a-z0-9-]/gi,"-").toLowerCase();await k.outputFile(m.join(e,"poetry.toml"),`[virtualenvs]
7
+ `,"utf-8");}async function U(e,o){let n=o.replace(/[^a-z0-9-]/gi,"-").toLowerCase();await b.outputFile(g.join(e,"poetry.toml"),`[virtualenvs]
8
8
  in-project = true
9
- `,"utf-8"),await k.outputFile(m.join(e,"pyproject.toml"),`[tool.poetry]
9
+ `,"utf-8"),await b.outputFile(g.join(e,"pyproject.toml"),`[tool.poetry]
10
10
  name = "${n}"
11
11
  version = "0.1.0"
12
12
  description = "RapidKit workspace"
@@ -20,7 +20,7 @@ rapidkit-core = "*"
20
20
  [build-system]
21
21
  requires = ["poetry-core"]
22
22
  build-backend = "poetry.core.masonry.api"
23
- `,"utf-8");}function ht(e,o,n,r){return JSON.stringify({schema_version:"1.0",workspace_name:e,rapidkit_version:b(),created_at:new Date().toISOString(),created_by:"rapidkit-npm",profile:r||"minimal",engine:{install_method:o,python_version:n||null}},null,2)}function ft(e,o,n,r,l){return JSON.stringify({schema_version:"1.0",generated_by:"rapidkit-npm",generated_at:new Date().toISOString(),runtime:{python:{version:o||null,install_method:e},node:{version:n||process.version},go:{version:r||null},java:{version:null,build_tool:null,build_tool_version:null},dotnet:{version:l||null,sdk:l||null}}},null,2)}function wt(){return `version: "1.0"
23
+ `,"utf-8");}function ht(e,o,n,a,s){return JSON.stringify({schema_version:"1.0",workspace_name:e,rapidkit_version:b$1(),created_at:new Date().toISOString(),created_by:"rapidkit-npm",profile:a||"minimal",...s?.profileRequested?{profile_requested:s.profileRequested}:{},...s?.bootstrapNote?{bootstrap_note:s.bootstrapNote}:{},engine:{install_method:o,python_version:n||null}},null,2)}function ft(e,o,n,a,s){return JSON.stringify({schema_version:"1.0",generated_by:"rapidkit-npm",generated_at:new Date().toISOString(),runtime:{python:{version:o||null,install_method:e},node:{version:n||process.version},go:{version:a||null},java:{version:null,build_tool:null,build_tool_version:null},dotnet:{version:s||null,sdk:s||null}}},null,2)}function wt(){return `version: "1.0"
24
24
  mode: warn # "warn" or "strict"
25
25
  dependency_sharing_mode: isolated # "isolated" or "shared-runtime-caches" or "shared-node-deps"
26
26
  # change profile (recommended): npx rapidkit bootstrap --profile polyglot
@@ -35,14 +35,14 @@ cache:
35
35
  prune_on_bootstrap: false
36
36
  self_heal: true
37
37
  verify_integrity: false
38
- `}async function kt(){try{let{stdout:e}=await execa("go",["version"],{timeout:3e3,stdio:"pipe"}),o=e.match(/go(\d+\.\d+(?:\.\d+)?)/i);return o?o[1]:void 0}catch{return}}async function Pt(){try{let{stdout:e}=await execa("dotnet",["--version"],{timeout:3e3,stdio:"pipe"}),o=e.trim();return o.length>0?o:void 0}catch{return}}async function Y(e,o,n,r,l){let[p,c]=await Promise.all([kt(),Pt()]);await k.outputFile(m.join(e,".rapidkit","workspace.json"),ht(o,n,r,l),"utf-8"),await k.outputFile(m.join(e,".rapidkit","toolchain.lock"),ft(n,r,process.version,p,c),"utf-8"),await k.outputFile(m.join(e,".rapidkit","policies.yml"),wt(),"utf-8"),await k.outputFile(m.join(e,".rapidkit","cache-config.yml"),vt(),"utf-8");}async function se(e,o){let{workspaceName:n=m.basename(e),installMethod:r="venv",pythonVersion:l,profile:p,writeMarker:c=true,writeGitignore:u=true,onlyIfMissing:g=true}=o||{},h=[],[a$1,i]=await Promise.all([kt(),Pt()]),y=[{relPath:m.join(".rapidkit","workspace.json"),content:ht(n,r,l,p)},{relPath:m.join(".rapidkit","toolchain.lock"),content:ft(r,l,process.version,a$1,i)},{relPath:m.join(".rapidkit","policies.yml"),content:wt()},{relPath:m.join(".rapidkit","cache-config.yml"),content:vt()}];for(let d of y){let P=m.join(e,d.relPath);g&&await k.pathExists(P)||(await k.outputFile(P,d.content,"utf-8"),h.push(d.relPath));}if(c&&(!!!await a(e)||!g)){let P=d(n,b(),r);l&&(P.metadata||(P.metadata={}),P.metadata.python={version:l}),await b$1(e,P),h.push(".rapidkit-workspace");}if(u){let d=m.join(e,".gitignore");(!g||!await k.pathExists(d))&&(await L(e),h.push(".gitignore"));}return h}var K="3.10",bt=["3.10","3.11","3.12"];async function gt(e){try{let{stdout:o}=await execa(e,["--version"],{timeout:3e3}),n=o.match(/Python (\d+\.\d+\.\d+)/);if(n)return n[1]}catch{}return null}async function Mt(e,o){try{await promises.writeFile(m.join(e,".python-version"),`${o}
39
- `,"utf-8"),a$1.debug(`Created .python-version with ${o}`);}catch(n){a$1.warn(`Failed to create .python-version: ${n}`);}}function O(){let n=[...(process.env.PATH||"").split(m.delimiter).filter(Boolean)];for(let r of k$2())n.includes(r)||n.unshift(r);process.env.PATH=n.join(m.delimiter);}async function tt(e,o){O(),e.start("Checking pipx installation");try{return await execa("pipx",["--version"]),e.succeed("pipx found"),{kind:"binary"}}catch{}let n=A();try{return await execa(n,["-m","pipx","--version"]),e.succeed("pipx found"),{kind:"python-module",pythonCmd:n}}catch{}if(o)throw new h;e.stop?.();let{installPipx:r}=await q.prompt([{type:"confirm",name:"installPipx",message:"pipx is not installed. Install it now (user install via python -m pip)?",default:true}]);if(!r)throw new h;e.start("Installing pipx (user install)");try{try{await execa(n,["-m","pip","install","--user","--upgrade","pip"]);}catch{}await execa(n,["-m","pip","install","--user","--upgrade","pipx"]);}catch(l){let p=l,c=String(p?.stderr||p?.shortMessage||p?.message||"");throw new k$1("Install pipx with python -m pip",l instanceof Error?l:new Error(c))}e.succeed("pipx installed"),O();try{return await execa(n,["-m","pipx","--version"]),{kind:"python-module",pythonCmd:n}}catch(l){let p=l,c=String(p?.stderr||p?.shortMessage||p?.message||"pipx not runnable after install");throw new k$1("Verify pipx after install",new Error(`${c}
38
+ `}async function kt(){try{let{stdout:e}=await execa("go",["version"],{timeout:3e3,stdio:"pipe"}),o=e.match(/go(\d+\.\d+(?:\.\d+)?)/i);return o?o[1]:void 0}catch{return}}async function Pt(){try{let{stdout:e}=await execa("dotnet",["--version"],{timeout:3e3,stdio:"pipe"}),o=e.trim();return o.length>0?o:void 0}catch{return}}async function z(e,o,n,a,s,d){let[c,p]=await Promise.all([kt(),Pt()]);await b.outputFile(g.join(e,".rapidkit","workspace.json"),ht(o,n,a,s,d),"utf-8"),await b.outputFile(g.join(e,".rapidkit","toolchain.lock"),ft(n,a,process.version,c,p),"utf-8"),await b.outputFile(g.join(e,".rapidkit","policies.yml"),wt(),"utf-8"),await b.outputFile(g.join(e,".rapidkit","cache-config.yml"),vt(),"utf-8");}async function de(e,o){let{workspaceName:n=g.basename(e),installMethod:a$1="venv",pythonVersion:s,profile:d$1,writeMarker:c=true,writeGitignore:p=true,onlyIfMissing:u=true}=o||{},h=[],[m,r]=await Promise.all([kt(),Pt()]),i=[{relPath:g.join(".rapidkit","workspace.json"),content:ht(n,a$1,s,d$1)},{relPath:g.join(".rapidkit","toolchain.lock"),content:ft(a$1,s,process.version,m,r)},{relPath:g.join(".rapidkit","policies.yml"),content:wt()},{relPath:g.join(".rapidkit","cache-config.yml"),content:vt()}];for(let f of i){let y=g.join(e,f.relPath);u&&await b.pathExists(y)||(await b.outputFile(y,f.content,"utf-8"),h.push(f.relPath));}if(c&&(!!!await a(e)||!u)){let y=d(n,b$1(),a$1);s&&(y.metadata||(y.metadata={}),y.metadata.python={version:s}),await b$2(e,y),h.push(".rapidkit-workspace");}if(p){let f=g.join(e,".gitignore");(!u||!await b.pathExists(f))&&(await L(e),h.push(".gitignore"));}return h}var bt=new Set(["go-only","java-only","dotnet-only","node-only","minimal"]),Tt={"python-only":"minimal",polyglot:"node-only",enterprise:"polyglot"};function Kt(e){let o=e,n=new Set;for(;!bt.has(o);){if(n.has(o))return "minimal";n.add(o);let a=Tt[o];if(!a)return "minimal";o=a;}return o}var T="3.10",xt=["3.10","3.11","3.12"];async function gt(e){try{let{stdout:o}=await execa(e,["--version"],{timeout:3e3}),n=o.match(/Python (\d+\.\d+\.\d+)/);if(n)return n[1]}catch{}return null}async function Nt(e,o){try{await promises.writeFile(g.join(e,".python-version"),`${o}
39
+ `,"utf-8"),a$1.debug(`Created .python-version with ${o}`);}catch(n){a$1.warn(`Failed to create .python-version: ${n}`);}}function N(){let n=[...(process.env.PATH||"").split(g.delimiter).filter(Boolean)];for(let a of k$1())n.includes(a)||n.unshift(a);process.env.PATH=n.join(g.delimiter);}async function tt(e,o){N(),e.start("Checking pipx installation");try{return await execa("pipx",["--version"]),e.succeed("pipx found"),{kind:"binary"}}catch{}let n=A();try{return await execa(n,["-m","pipx","--version"]),e.succeed("pipx found"),{kind:"python-module",pythonCmd:n}}catch{}if(o)throw new h;e.stop?.();let{installPipx:a}=await q.prompt([{type:"confirm",name:"installPipx",message:"pipx is not installed. Install it now (user install via python -m pip)?",default:true}]);if(!a)throw new h;e.start("Installing pipx (user install)");try{try{await execa(n,["-m","pip","install","--user","--upgrade","pip"]);}catch{}await execa(n,["-m","pip","install","--user","--upgrade","pipx"]);}catch(s){let d=s,c=String(d?.stderr||d?.shortMessage||d?.message||"");throw new k("Install pipx with python -m pip",s instanceof Error?s:new Error(c))}e.succeed("pipx installed"),N();try{return await execa(n,["-m","pipx","--version"]),{kind:"python-module",pythonCmd:n}}catch(s){let d=s,c=String(d?.stderr||d?.shortMessage||d?.message||"pipx not runnable after install");throw new k("Verify pipx after install",new Error(`${c}
40
40
 
41
- Try reopening your terminal or run: ${n} -m pipx ensurepath`))}}async function N(e,o){return e.kind==="binary"?execa("pipx",o):execa(e.pythonCmd,["-m","pipx",...o])}function Dt(e){let o=e.match(/^(\d+)\.(\d+)/);return o?`${o[1]}.${o[2]}`:null}function mt(e){if(!e)return null;let o=e.match(/Python\s+(\d+)\.(\d+)(?:\.\d+)?/i);return o?`${o[1]}.${o[2]}`:null}function lt(e,o){let[n,r]=e.split(".").map(c=>Number(c)),[l,p]=o.split(".").map(c=>Number(c));return n!==l?n-l:r-p}function V(e,o){return lt(e,o)>=0}async function Tt(e$1){let o=new Set,n=e(14,10);for(let i of n)try{let y=await execa(i.command,i.args,{timeout:2500}),d=mt(`${y.stdout||""}
42
- ${y.stderr||""}`);d&&V(d,K)&&o.add(d);}catch{}let r=null;try{let i=await execa(A(),["--version"],{timeout:2500}),y=mt(`${i.stdout||""}
43
- ${i.stderr||""}`);y&&V(y,K)&&(r=y,o.add(y));}catch{}let l=bt.filter(i=>V(i,K)),p=new Set([...l,...o]),c=Array.from(p).sort((i,y)=>lt(y,i)),u=e$1?Dt(e$1):null,g=u&&V(u,K)?u:r||c[0]||K;return p.has(g)||p.add(g),{choices:Array.from(p).sort((i,y)=>lt(y,i)).map(i=>{let y=[];return i===r&&y.push("current system"),i===K&&y.push("minimum supported"),o.has(i)&&i!==r&&y.push("detected"),{name:y.length>0?`${i} (${y.join(", ")})`:i,value:i}}),defaultValue:g}}async function Kt(){O();let e=false,o=false;try{await execa("poetry",["--version"],{timeout:2500}),e=true;}catch{e=false;}try{await execa("pipx",["--version"],{timeout:2500}),o=true;}catch{let n=c();try{await execa(n,["-m","pipx","--version"],{timeout:2500}),o=true;}catch{o=false;}}return {poetry:e,pipx:o}}async function xt(){O();try{return await execa("poetry",["--version"],{timeout:2500}),true}catch{return false}}function Nt(e,o){return e==="poetry"&&o.poetry?"poetry":e==="pipx"&&o.pipx?"pipx":e==="venv"?"venv":o.poetry?"poetry":"venv"}async function Ot(e,o){O(),e.start("Checking Poetry installation");try{await execa("poetry",["--version"]),e.succeed("Poetry found");return}catch{}if(o)throw new g;let{installPoetry:n}=await q.prompt([{type:"confirm",name:"installPoetry",message:"Poetry is not installed. Install it now using pipx?",default:true}]);if(!n)throw new g;let r=await tt(e,o);e.start("Installing Poetry with pipx");try{await N(r,["install","poetry"]);}catch(l){let p=l,c=String(p?.stderr||p?.shortMessage||p?.message||"");if(/already\s+installed|already\s+seems\s+to\s+be\s+installed|exists/i.test(c))try{await N(r,["upgrade","poetry"]);}catch{}else throw new k$1("Install Poetry with pipx",l instanceof Error?l:new Error(c))}e.succeed("Poetry installed"),O();try{await execa("poetry",["--version"]);}catch(l){let p=l,c=String(p?.stderr||p?.shortMessage||p?.message||"Poetry not found on PATH");throw new k$1("Verify Poetry after pipx install",new Error(`${c}
41
+ Try reopening your terminal or run: ${n} -m pipx ensurepath`))}}async function K(e,o){return e.kind==="binary"?execa("pipx",o):execa(e.pythonCmd,["-m","pipx",...o])}function Ot(e){let o=e.match(/^(\d+)\.(\d+)/);return o?`${o[1]}.${o[2]}`:null}function mt(e){if(!e)return null;let o=e.match(/Python\s+(\d+)\.(\d+)(?:\.\d+)?/i);return o?`${o[1]}.${o[2]}`:null}function lt(e,o){let[n,a]=e.split(".").map(c=>Number(c)),[s,d]=o.split(".").map(c=>Number(c));return n!==s?n-s:a-d}function V(e,o){return lt(e,o)>=0}async function Ft(e$1){let o=new Set,n=e(14,10);for(let r of n)try{let i=await execa(r.command,r.args,{timeout:2500}),f=mt(`${i.stdout||""}
42
+ ${i.stderr||""}`);f&&V(f,T)&&o.add(f);}catch{}let a=null;try{let r=await execa(A(),["--version"],{timeout:2500}),i=mt(`${r.stdout||""}
43
+ ${r.stderr||""}`);i&&V(i,T)&&(a=i,o.add(i));}catch{}let s=xt.filter(r=>V(r,T)),d=new Set([...s,...o]),c=Array.from(d).sort((r,i)=>lt(i,r)),p=e$1?Ot(e$1):null,u=p&&V(p,T)?p:a||c[0]||T;return d.has(u)||d.add(u),{choices:Array.from(d).sort((r,i)=>lt(i,r)).map(r=>{let i=[];return r===a&&i.push("current system"),r===T&&i.push("minimum supported"),o.has(r)&&r!==a&&i.push("detected"),{name:i.length>0?`${r} (${i.join(", ")})`:r,value:r}}),defaultValue:u}}async function Lt(){N();let e=false,o=false;try{await execa("poetry",["--version"],{timeout:2500}),e=true;}catch{e=false;}try{await execa("pipx",["--version"],{timeout:2500}),o=true;}catch{let n=c();try{await execa(n,["-m","pipx","--version"],{timeout:2500}),o=true;}catch{o=false;}}return {poetry:e,pipx:o}}async function Rt(){N();try{return await execa("poetry",["--version"],{timeout:2500}),true}catch{return false}}function Vt(e,o){return e==="poetry"&&o.poetry?"poetry":e==="pipx"&&o.pipx?"pipx":e==="venv"?"venv":o.poetry?"poetry":"venv"}async function Gt(e,o){N(),e.start("Checking Poetry installation");try{await execa("poetry",["--version"]),e.succeed("Poetry found");return}catch{}if(o)throw new g$1;let{installPoetry:n}=await q.prompt([{type:"confirm",name:"installPoetry",message:"Poetry is not installed. Install it now using pipx?",default:true}]);if(!n)throw new g$1;let a=await tt(e,o);e.start("Installing Poetry with pipx");try{await K(a,["install","poetry"]);}catch(s){let d=s,c=String(d?.stderr||d?.shortMessage||d?.message||"");if(/already\s+installed|already\s+seems\s+to\s+be\s+installed|exists/i.test(c))try{await K(a,["upgrade","poetry"]);}catch{}else throw new k("Install Poetry with pipx",s instanceof Error?s:new Error(c))}e.succeed("Poetry installed"),N();try{await execa("poetry",["--version"]);}catch(s){let d=s,c=String(d?.stderr||d?.shortMessage||d?.message||"Poetry not found on PATH");throw new k("Verify Poetry after pipx install",new Error(`${c}
44
44
 
45
- Poetry may be installed but not on PATH yet. Try reopening your terminal or run: pipx ensurepath`))}}function Ft(e){let o=e==="poetry";return `#!/usr/bin/env sh
45
+ Poetry may be installed but not on PATH yet. Try reopening your terminal or run: pipx ensurepath`))}}function Wt(e){let o=e==="poetry";return `#!/usr/bin/env sh
46
46
  set -eu
47
47
 
48
48
  SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
@@ -74,7 +74,7 @@ echo "- If you used venv: ensure .venv exists (or re-run the installer)." 1>&2
74
74
  ${o?`echo "- If you used Poetry: run 'poetry install' and retry, or activate the env." 1>&2
75
75
  `:""}echo "Tip: you can also run: ./.venv/bin/rapidkit --help" 1>&2
76
76
  exit 1
77
- `}function Lt(e){return `@echo off
77
+ `}function Ht(e){return `@echo off
78
78
  setlocal
79
79
 
80
80
  set "SCRIPT_DIR=%~dp0"
@@ -111,27 +111,27 @@ echo RapidKit launcher could not find a local Python CLI. 1>&2
111
111
  echo Tip: run .venv\\Scripts\\rapidkit.exe --help 1>&2
112
112
  echo Tip: for npm-owned workspace commands, run npx --yes --package rapidkit rapidkit %* from a shell where npm is on PATH. 1>&2
113
113
  exit /b 1
114
- `}async function It(e,o){await k.outputFile(m.join(e,"rapidkit"),Ft(o),{encoding:"utf-8",mode:493}),await k.outputFile(m.join(e,"rapidkit.cmd"),Lt(o),"utf-8");}async function le(e,o){let{skipGit:n=false,testMode:r=false,demoMode:l=false,dryRun:p=false,yes:c=false,userConfig:u={},installMethod:g,profile:h}=o,a=e||"rapidkit",i$1=m.resolve(process.cwd(),a);if(await k.pathExists(i$1))throw new i(a);if(p){let f=h||(c?"minimal":void 0),R=g||u.defaultInstallMethod||"poetry",b=u.pythonVersion||"3.10";await Gt(i$1,a,l,u,f,R,b);return}if(l){await Vt(i$1,a,n);return}let y=new Set(["python-only","polyglot","enterprise"]),d=h||"";if(!c&&!h){let{selectedProfile:f}=await q.prompt([{type:"rawlist",name:"selectedProfile",message:"Select workspace profile:",choices:[{name:"minimal \u2014 Foundation files only (fastest bootstrap, mixed projects)",value:"minimal"},{name:"java-only \u2014 Java runtime (Spring Boot services)",value:"java-only"},{name:"python-only \u2014 Python + Poetry (FastAPI, Django, ML pipelines)",value:"python-only"},{name:"node-only \u2014 Node.js runtime (NestJS, Express, Next.js)",value:"node-only"},{name:"go-only \u2014 Go runtime (Fiber, Gin, gRPC, microservices)",value:"go-only"},{name:"dotnet-only \u2014 .NET runtime (ASP.NET Core services)",value:"dotnet-only"},{name:"polyglot \u2014 Python + Node.js + Go + Java + .NET multi-runtime workspace",value:"polyglot"},{name:"enterprise \u2014 Polyglot + governance + Sigstore verification",value:"enterprise"}],default:1}]);d=f;}else d||(d="minimal");let P=!c&&y.has(d),$=typeof u.pythonVersion=="string"&&u.pythonVersion.trim().length>0?u.pythonVersion.trim():void 0,D=g||u.defaultInstallMethod||"poetry",_=P?await Kt():{poetry:true,pipx:true},G=P?await Tt($):{choices:bt.map(f=>({name:f,value:f})),defaultValue:K},et=Nt(D,_),Ct=[{name:_.poetry?"\u{1F3AF} Poetry (Recommended - includes virtual env + dependency mgmt)":"\u{1F3AF} Poetry (Recommended) \u2014 not detected (we can install it)",value:"poetry"},{name:"\u{1F4E6} pip with venv (Standard, zero extra tools)",value:"venv"},{name:_.pipx?"\u{1F527} pipx (Global isolated - RapidKit CLI only, no local venv)":"\u{1F527} pipx (Global isolated) \u2014 not detected (we can install it)",value:"pipx"}],x=P?await q.prompt([{type:"rawlist",name:"pythonVersion",message:"Select Python version for RapidKit:",choices:G.choices,default:G.defaultValue},{type:"rawlist",name:"installMethod",message:"How would you like to manage the workspace environment?",choices:Ct,default:et}]):await(async()=>{let f=g||u.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"}})();return {pythonVersion:u.pythonVersion||"3.10",installMethod:f}})();if(P&&(console.log(t.gray(`
115
- \u{1F4CC} Configuration notes:`)),x.pythonVersion==="3.10"?console.log(t.gray(" \u2022 Python 3.10: Latest stable with widespread compatibility")):x.pythonVersion==="3.11"?console.log(t.gray(" \u2022 Python 3.11: Newer, faster (3.10-3.11: ~10% speed improvement)")):x.pythonVersion==="3.12"&&console.log(t.gray(" \u2022 Python 3.12: Cutting edge, excellent for performance")),x.installMethod==="poetry"?console.log(t.gray(" \u2022 Poetry: Dependency management + virtual env (recommended for teams)")):x.installMethod==="venv"?console.log(t.gray(" \u2022 venv: Standard library approach, lightweight, zero dependencies")):console.log(t.gray(" \u2022 pipx: Global isolated, RapidKit CLI only, no local venv")),console.log("")),new Set(["go-only","java-only","dotnet-only","node-only","minimal"]).has(d)){let f=F("Creating workspace").start();try{await k.ensureDir(i$1),f.succeed("Directory created"),await U(i$1,a,"venv",void 0),await Y(i$1,a,"venv",void 0,d),await L(i$1),await z(i$1,a);let R={"go-only":"Go-only","java-only":"Java-only","dotnet-only":".NET-only","node-only":"Node.js-only",minimal:"Minimal"};if(await k.outputFile(m.join(i$1,"README.md"),`# ${a}
114
+ `}async function It(e,o){await b.outputFile(g.join(e,"rapidkit"),Wt(o),{encoding:"utf-8",mode:493}),await b.outputFile(g.join(e,"rapidkit.cmd"),Ht(o),"utf-8");}async function pe(e,o){let{skipGit:n=false,testMode:a=false,demoMode:s=false,dryRun:d=false,yes:c=false,userConfig:p={},installMethod:u,profile:h,parentDirectory:m}=o,r=e||"rapidkit",i$1=m?g.resolve(m,r):g.resolve(process.cwd(),r);if(await b.pathExists(i$1))throw new i(r);if(d){let w=h||(c?"minimal":void 0),I=u||p.defaultInstallMethod||"poetry",v=p.pythonVersion||"3.10";await zt(i$1,r,s,p,w,I,v);return}if(s){await Ut(i$1,r,n);return}let f=new Set(["python-only","polyglot","enterprise"]),y=h||"";if(!c&&!h){let{selectedProfile:w}=await q.prompt([{type:"rawlist",name:"selectedProfile",message:"Select workspace profile:",choices:[{name:"minimal \u2014 Foundation files only (fastest bootstrap, mixed projects)",value:"minimal"},{name:"java-only \u2014 Java runtime (Spring Boot services)",value:"java-only"},{name:"python-only \u2014 Python + Poetry (FastAPI, Django, ML pipelines)",value:"python-only"},{name:"node-only \u2014 Node.js runtime (NestJS, Express, Next.js)",value:"node-only"},{name:"go-only \u2014 Go runtime (Fiber, Gin, gRPC, microservices)",value:"go-only"},{name:"dotnet-only \u2014 .NET runtime (ASP.NET Core services)",value:"dotnet-only"},{name:"polyglot \u2014 Python + Node.js + Go + Java + .NET multi-runtime workspace",value:"polyglot"},{name:"enterprise \u2014 Polyglot + governance + Sigstore verification",value:"enterprise"}],default:1}]);y=w;}else y||(y="minimal");let E=!c&&f.has(y),D=typeof p.pythonVersion=="string"&&p.pythonVersion.trim().length>0?p.pythonVersion.trim():void 0,C=u||p.defaultInstallMethod||"poetry",O=E?await Lt():{poetry:true,pipx:true},Y=E?await Ft(D):{choices:xt.map(w=>({name:w,value:w})),defaultValue:T},$t=Vt(C,O),At=[{name:O.poetry?"\u{1F3AF} Poetry (Recommended - includes virtual env + dependency mgmt)":"\u{1F3AF} Poetry (Recommended) \u2014 not detected (we can install it)",value:"poetry"},{name:"\u{1F4E6} pip with venv (Standard, zero extra tools)",value:"venv"},{name:O.pipx?"\u{1F527} pipx (Global isolated - RapidKit CLI only, no local venv)":"\u{1F527} pipx (Global isolated) \u2014 not detected (we can install it)",value:"pipx"}],x=E?await q.prompt([{type:"rawlist",name:"pythonVersion",message:"Select Python version for RapidKit:",choices:Y.choices,default:Y.defaultValue},{type:"rawlist",name:"installMethod",message:"How would you like to manage the workspace environment?",choices:At,default:$t}]):await(async()=>{let w=u||p.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"}})();return {pythonVersion:p.pythonVersion||"3.10",installMethod:w}})();E&&(console.log(t.gray(`
115
+ \u{1F4CC} Configuration notes:`)),x.pythonVersion==="3.10"?console.log(t.gray(" \u2022 Python 3.10: Latest stable with widespread compatibility")):x.pythonVersion==="3.11"?console.log(t.gray(" \u2022 Python 3.11: Newer, faster (3.10-3.11: ~10% speed improvement)")):x.pythonVersion==="3.12"&&console.log(t.gray(" \u2022 Python 3.12: Cutting edge, excellent for performance")),x.installMethod==="poetry"?console.log(t.gray(" \u2022 Poetry: Dependency management + virtual env (recommended for teams)")):x.installMethod==="venv"?console.log(t.gray(" \u2022 venv: Standard library approach, lightweight, zero dependencies")):console.log(t.gray(" \u2022 pipx: Global isolated, RapidKit CLI only, no local venv")),console.log(""));let et=bt;if(et.has(y)){let w=F("Creating workspace").start();try{await b.ensureDir(i$1),w.succeed("Directory created"),await H(i$1,r,"venv",void 0),await z(i$1,r,"venv",void 0,y),await L(i$1),await U(i$1,r);let I={"go-only":"Go-only","java-only":"Java-only","dotnet-only":".NET-only","node-only":"Node.js-only",minimal:"Minimal"};if(await b.outputFile(g.join(i$1,"README.md"),`# ${r}
116
116
 
117
- RapidKit **${R[d]}** workspace.
117
+ RapidKit **${I[y]}** workspace.
118
118
 
119
119
  ## Quick start
120
120
 
121
121
  \`\`\`bash
122
- `+(d==="go-only"?`npx rapidkit create project gofiber.standard my-api
122
+ `+(y==="go-only"?`npx rapidkit create project gofiber.standard my-api
123
123
  cd my-api
124
124
  npx rapidkit init
125
125
  npx rapidkit dev
126
- `:d==="java-only"?`npx rapidkit create project springboot.standard my-service
126
+ `:y==="java-only"?`npx rapidkit create project springboot.standard my-service
127
127
  cd my-service
128
128
  npx rapidkit init
129
129
  npx rapidkit dev
130
- `:d==="dotnet-only"?`npx rapidkit create project dotnet.webapi.clean my-api
130
+ `:y==="dotnet-only"?`npx rapidkit create project dotnet.webapi.clean my-api
131
131
  cd my-api
132
132
  npx rapidkit init
133
133
  npx rapidkit dev
134
- `:d==="node-only"?`npx rapidkit create project nestjs.standard my-app
134
+ `:y==="node-only"?`npx rapidkit create project nestjs.standard my-app
135
135
  cd my-app
136
136
  npx rapidkit init
137
137
  npx rapidkit dev
@@ -139,55 +139,55 @@ npx rapidkit dev
139
139
  cd <project-name>
140
140
  npx rapidkit init
141
141
  npx rapidkit dev
142
- `)+"```\n","utf-8"),!n){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:b}=await import('./workspace-AG2MQFTY.js');await b(i$1,a);}catch{}if(console.log(t.green(`
142
+ `)+"```\n","utf-8"),!n){w.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}),w.succeed("Git repository initialized");}catch{w.warn("Could not initialize git repository");}}try{let{registerWorkspace:v}=await import('./workspace-ZDL5IQU4.js');await v(i$1,r);}catch{}if(console.log(t.green(`
143
143
  \u2728 Workspace created!
144
144
  `)),console.log(t.cyan("\u{1F4C2} Location:"),t.white(i$1)),console.log(t.cyan(`
145
145
  \u{1F680} Get started:
146
- `)),console.log(t.white(` cd ${a}`)),d==="go-only"){console.log(t.white(" npx rapidkit create project gofiber.standard my-api")),console.log(t.white(" cd my-api")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
147
- `)),console.log(t.gray("\u{1F4A1} No Python required \u2014 Go kits run entirely through the npm package."));try{let{stdout:b}=await execa("go",["version"],{timeout:3e3}),w=b.match(/go version go(\d+\.\d+(?:\.\d+)?)/),S=w?w[1]:"unknown";console.log(t.gray(`\u{1F439} Go ${S} detected \u2014 ready for gofiber.standard / gogin.standard projects`));}catch{console.log(t.yellow(`
148
- \u26A0\uFE0F Go is not installed \u2014 install it from https://go.dev/dl/`));}}else if(d==="java-only")console.log(t.white(" npx rapidkit create project springboot.standard my-service")),console.log(t.white(" cd my-service")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
149
- `)),console.log(t.gray("\u{1F4A1} No Python required \u2014 Spring Boot kit runs through the npm package with Java tooling."));else if(d==="dotnet-only"){console.log(t.white(" npx rapidkit create project dotnet.webapi.clean my-api")),console.log(t.white(" cd my-api")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
150
- `)),console.log(t.gray("\u{1F4A1} No Python required \u2014 ASP.NET Core kit runs through the npm package with .NET tooling."));try{let{stdout:b}=await execa("dotnet",["--version"],{timeout:3e3});console.log(t.gray(`\u2699\uFE0F .NET SDK ${b.trim()} detected \u2014 ready for ASP.NET Core projects`));}catch{console.log(t.yellow(`
151
- \u26A0\uFE0F .NET SDK is not installed \u2014 install it from https://dotnet.microsoft.com/download`));}}else d==="node-only"?(console.log(t.white(" npx rapidkit create project nestjs.standard my-app")),console.log(t.white(" cd my-app")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
146
+ `)),console.log(t.white(` cd ${r}`)),y==="go-only"){console.log(t.white(" npx rapidkit create project gofiber.standard my-api")),console.log(t.white(" cd my-api")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
147
+ `)),console.log(t.gray("\u{1F4A1} No Python required \u2014 Go kits run entirely through the npm package."));try{let{stdout:v}=await execa("go",["version"],{timeout:3e3}),k=v.match(/go version go(\d+\.\d+(?:\.\d+)?)/),S=k?k[1]:"unknown";console.log(t.gray(`\u{1F439} Go ${S} detected \u2014 ready for gofiber.standard / gogin.standard projects`));}catch{console.log(t.yellow(`
148
+ \u26A0\uFE0F Go is not installed \u2014 install it from https://go.dev/dl/`));}}else if(y==="java-only")console.log(t.white(" npx rapidkit create project springboot.standard my-service")),console.log(t.white(" cd my-service")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
149
+ `)),console.log(t.gray("\u{1F4A1} No Python required \u2014 Spring Boot kit runs through the npm package with Java tooling."));else if(y==="dotnet-only"){console.log(t.white(" npx rapidkit create project dotnet.webapi.clean my-api")),console.log(t.white(" cd my-api")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
150
+ `)),console.log(t.gray("\u{1F4A1} No Python required \u2014 ASP.NET Core kit runs through the npm package with .NET tooling."));try{let{stdout:v}=await execa("dotnet",["--version"],{timeout:3e3});console.log(t.gray(`\u2699\uFE0F .NET SDK ${v.trim()} detected \u2014 ready for ASP.NET Core projects`));}catch{console.log(t.yellow(`
151
+ \u26A0\uFE0F .NET SDK is not installed \u2014 install it from https://dotnet.microsoft.com/download`));}}else y==="node-only"?(console.log(t.white(" npx rapidkit create project nestjs.standard my-app")),console.log(t.white(" cd my-app")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
152
152
  `)),console.log(t.gray("\u{1F4A1} Python engine will be installed automatically on first `create project nestjs.standard`."))):(console.log(t.white(" npx rapidkit create project")),console.log(t.white(" cd <project-name>")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
153
153
  `)),console.log(t.gray("\u{1F4A1} Bootstrap a specific runtime: rapidkit bootstrap --profile java-only|python-only|node-only|go-only|dotnet-only|polyglot|enterprise")));console.log(t.cyan(`
154
- \u{1F4DA} More info:`)),console.log(t.gray(" \u2022 Change profile anytime: rapidkit bootstrap --profile <profile>")),console.log(t.gray(" \u2022 View config: cat "+a+"/.rapidkit-workspace")),console.log(t.gray(" \u2022 Check health: rapidkit doctor")),console.log("");}catch(R){throw f.fail("Failed to create workspace"),console.error(t.red(`
155
- \u274C Error:`),R),R}return}{let f=A(),R=false;try{await execa(f,["--version"],{timeout:5e3}),R=true;}catch{try{await execa("python",["--version"],{timeout:5e3}),R=true;}catch{R=false;}}if(!R){let w={"python-only":"minimal",polyglot:"node-only",enterprise:"polyglot"}[d];if(P&&!c){console.log(t.yellow(`
154
+ \u{1F4DA} More info:`)),console.log(t.gray(" \u2022 Change profile anytime: rapidkit bootstrap --profile <profile>")),console.log(t.gray(" \u2022 View config: cat "+r+"/.rapidkit-workspace")),console.log(t.gray(" \u2022 Check health: rapidkit doctor")),console.log("");}catch(I){throw w.fail("Failed to create workspace"),console.error(t.red(`
155
+ \u274C Error:`),I),I}return}{let w=A(),I=false;try{await execa(w,["--version"],{timeout:5e3}),I=true;}catch{try{await execa("python",["--version"],{timeout:5e3}),I=true;}catch{I=false;}}if(!I){let v=y,k=Kt(y);if(E&&!c){console.log(t.yellow(`
156
156
  \u26A0\uFE0F Python 3.10+ is not detected on this system.
157
157
  `)),console.log(t.cyan(`You have 3 options:
158
- `));let{pythonAction:T}=await q.prompt([{type:"rawlist",name:"pythonAction",message:"What would you like to do?",choices:[{name:"\u{1F4E5} Install Python now (I'll show you the command for your OS)",value:"install"},{name:`\u{1F504} Switch to "${w}" profile (no Python required)`,value:"fallback"},{name:"\u274C Cancel and install Python manually",value:"cancel"}]}]);if(T==="cancel"&&(console.log(t.cyan(`
158
+ `));let{pythonAction:$}=await q.prompt([{type:"rawlist",name:"pythonAction",message:"What would you like to do?",choices:[{name:"\u{1F4E5} Install Python now (I'll show you the command for your OS)",value:"install"},{name:`\u{1F504} Switch to "${k}" profile (no Python required)`,value:"fallback"},{name:"\u274C Cancel and install Python manually",value:"cancel"}]}]);if($==="cancel"&&(console.log(t.cyan(`
159
159
  \u{1F4A1} How to install Python:
160
160
  `)),console.log(t.white(" Ubuntu / Debian: sudo apt install python3.10")),console.log(t.white(" macOS (Homebrew): brew install python@3.10")),console.log(t.white(` Windows: https://python.org/downloads
161
- `)),console.log(t.gray(` After installing Python, run: npx rapidkit ${a}
162
- `)),process.exit(1)),T==="install"){console.log(t.cyan(`
161
+ `)),console.log(t.gray(` After installing Python, run: npx rapidkit ${r}
162
+ `)),process.exit(1)),$==="install"){console.log(t.cyan(`
163
163
  \u{1F4A1} Install Python on your system:
164
- `));let j=process.platform;j==="linux"?console.log(t.white(` sudo apt update && sudo apt install python3.10 python3.10-venv
165
- `)):j==="darwin"?console.log(t.white(` brew install python@3.10
166
- `)):j==="win32"&&(console.log(t.white(` Download: https://python.org/downloads
164
+ `));let _=process.platform;_==="linux"?console.log(t.white(` sudo apt update && sudo apt install python3.10 python3.10-venv
165
+ `)):_==="darwin"?console.log(t.white(` brew install python@3.10
166
+ `)):_==="win32"&&(console.log(t.white(` Download: https://python.org/downloads
167
167
  `)),console.log(t.white(` Run the installer and check "Add Python to PATH"
168
- `))),console.log(t.gray(` After installing, run: npx rapidkit ${a}
169
- `)),process.exit(0);}if(T==="fallback"&&(console.log(t.green(`
170
- \u2705 Switching to "${w}" profile (no Python required).
171
- `)),d=w,new Set(["go-only","java-only","dotnet-only","node-only","minimal"]).has(w))){let C=F("Creating workspace").start();try{await k.ensureDir(i$1),C.succeed("Directory created"),await U(i$1,a,"venv",void 0),await Y(i$1,a,"venv",void 0,w),await L(i$1),await z(i$1,a);let B={"go-only":"Go-only","java-only":"Java-only","dotnet-only":".NET-only","node-only":"Node.js-only",minimal:"Minimal"};if(await k.outputFile(m.join(i$1,"README.md"),`# ${a}
168
+ `))),console.log(t.gray(` After installing, run: npx rapidkit ${r}
169
+ `)),process.exit(0);}if($==="fallback"&&(console.log(t.green(`
170
+ \u2705 Switching to "${k}" profile (no Python required).
171
+ `)),y=k,et.has(k))){let _=F("Creating workspace").start();try{await b.ensureDir(i$1),_.succeed("Directory created"),await H(i$1,r,"venv",void 0),await z(i$1,r,"venv",void 0,k,{profileRequested:v,bootstrapNote:"python-free-fallback"}),await L(i$1),await U(i$1,r);let B={"go-only":"Go-only","java-only":"Java-only","dotnet-only":".NET-only","node-only":"Node.js-only",minimal:"Minimal"};if(await b.outputFile(g.join(i$1,"README.md"),`# ${r}
172
172
 
173
- RapidKit **${B[w]}** workspace (switched from ${d} due to missing Python).
173
+ RapidKit **${B[k]}** workspace (switched from ${v} due to missing Python).
174
174
 
175
175
  ## Quick start
176
176
 
177
177
  \`\`\`bash
178
- `+(w==="go-only"?`npx rapidkit create project gofiber.standard my-api
178
+ `+(k==="go-only"?`npx rapidkit create project gofiber.standard my-api
179
179
  cd my-api
180
180
  npx rapidkit init
181
181
  npx rapidkit dev
182
- `:w==="java-only"?`npx rapidkit create project springboot.standard my-service
182
+ `:k==="java-only"?`npx rapidkit create project springboot.standard my-service
183
183
  cd my-service
184
184
  npx rapidkit init
185
185
  npx rapidkit dev
186
- `:w==="dotnet-only"?`npx rapidkit create project dotnet.webapi.clean my-api
186
+ `:k==="dotnet-only"?`npx rapidkit create project dotnet.webapi.clean my-api
187
187
  cd my-api
188
188
  npx rapidkit init
189
189
  npx rapidkit dev
190
- `:w==="node-only"?`npx rapidkit create project nestjs.standard my-app
190
+ `:k==="node-only"?`npx rapidkit create project nestjs.standard my-app
191
191
  cd my-app
192
192
  npx rapidkit init
193
193
  npx rapidkit dev
@@ -195,73 +195,73 @@ npx rapidkit dev
195
195
  cd <project-name>
196
196
  npx rapidkit init
197
197
  npx rapidkit dev
198
- `)+"```\n","utf-8"),!n){C.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 (${w} profile)`],{cwd:i$1}),C.succeed("Git repository initialized");}catch{C.warn("Could not initialize git repository");}}try{let{registerWorkspace:$t}=await import('./workspace-AG2MQFTY.js');await $t(i$1,a);}catch{}console.log(t.green(`
198
+ `)+"```\n","utf-8"),!n){_.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 (${k} profile)`],{cwd:i$1}),_.succeed("Git repository initialized");}catch{_.warn("Could not initialize git repository");}}try{let{registerWorkspace:St}=await import('./workspace-ZDL5IQU4.js');await St(i$1,r);}catch{}console.log(t.green(`
199
199
  \u2728 Workspace created with fallback profile!
200
200
  `)),console.log(t.cyan("\u{1F4C2} Location:"),t.white(i$1)),console.log(t.cyan(`
201
201
  \u{1F680} Get started:
202
- `)),console.log(t.white(` cd ${a}`)),console.log(t.white(" npx rapidkit create project")),console.log(t.white(" cd <project-name>")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
202
+ `)),console.log(t.white(` cd ${r}`)),console.log(t.white(" npx rapidkit create project")),console.log(t.white(" cd <project-name>")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
203
203
  `)),console.log(t.cyan(`\u{1F4A1} To use Python later:
204
- `)),console.log(t.gray(" 1. Install Python 3.10+")),console.log(t.gray(` 2. Run: rapidkit bootstrap --profile ${d}
205
- `)),console.log("");return}catch(B){throw C.fail("Failed to create workspace"),console.error(t.red(`
204
+ `)),console.log(t.gray(" 1. Install Python 3.10+")),console.log(t.gray(` 2. Run: rapidkit bootstrap --profile ${v}
205
+ `)),console.log("");return}catch(B){throw _.fail("Failed to create workspace"),console.error(t.red(`
206
206
  \u274C Error:`),B),B}}}else if(console.log(t.yellow(`
207
- \u26A0\uFE0F Python not detected. Auto-switching to "${w}" profile (no Python required).
208
- `)),d=w,new Set(["go-only","java-only","dotnet-only","node-only","minimal"]).has(w)){let j=F("Creating workspace").start();try{if(await k.ensureDir(i$1),j.succeed("Directory created"),await U(i$1,a,"venv",void 0),await Y(i$1,a,"venv",void 0,w),await L(i$1),await z(i$1,a),!n){j.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 (${w})`],{cwd:i$1}),j.succeed("Git repository initialized");}catch{j.warn("Could not initialize git repository");}}try{let{registerWorkspace:C}=await import('./workspace-AG2MQFTY.js');await C(i$1,a);}catch{}console.log(t.green(`
207
+ \u26A0\uFE0F Python not detected. Auto-switching to "${k}" profile (no Python required).
208
+ `)),y=k,et.has(k)){let $=F("Creating workspace").start();try{if(await b.ensureDir(i$1),$.succeed("Directory created"),await H(i$1,r,"venv",void 0),await z(i$1,r,"venv",void 0,k,{profileRequested:v,bootstrapNote:"python-free-fallback"}),await L(i$1),await U(i$1,r),!n){$.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 (${k})`],{cwd:i$1}),$.succeed("Git repository initialized");}catch{$.warn("Could not initialize git repository");}}try{let{registerWorkspace:_}=await import('./workspace-ZDL5IQU4.js');await _(i$1,r);}catch{}console.log(t.green(`
209
209
  \u2728 Workspace created (auto-fallback profile)!
210
- `)),console.log(t.cyan("\u{1F4C2} Location:"),t.white(i$1)),console.log(t.cyan("\u{1F4E6} Profile:"),t.yellow(w)),console.log(t.cyan("\u{1F4A1} Reason:"),t.gray("Python not detected; switched from "+d)),console.log(t.cyan(`
210
+ `)),console.log(t.cyan("\u{1F4C2} Location:"),t.white(i$1)),console.log(t.cyan("\u{1F4E6} Profile:"),t.yellow(k)),console.log(t.cyan("\u{1F4A1} Reason:"),t.gray(`Python not detected; switched from ${v}`)),console.log(t.cyan(`
211
211
  \u{1F680} Get started:
212
- `)),console.log(t.white(` cd ${a}`)),console.log(t.white(" npx rapidkit create project")),console.log(t.white(" cd <project-name>")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
212
+ `)),console.log(t.white(` cd ${r}`)),console.log(t.white(" npx rapidkit create project")),console.log(t.white(" cd <project-name>")),console.log(t.white(" npx rapidkit init")),console.log(t.white(` npx rapidkit dev
213
213
  `)),console.log(t.cyan(`\u{1F4A1} Add Python later:
214
- `)),console.log(t.gray(" 1. Install Python 3.10+")),console.log(t.gray(` 2. Run: cd ${a} && rapidkit bootstrap --profile ${d}
215
- `)),console.log("");return}catch(C){throw j.fail("Failed to create workspace"),console.error(t.red(`
216
- \u274C Error:`),C),C}}}}a$1.step(1,3,"Setting up RapidKit environment");let I=F("Creating directory").start();try{await k.ensureDir(i$1),I.succeed("Directory created"),I.start("Detecting Python version");let f=null,R=await Rt(x.pythonVersion);if(R)f=await gt(R),f?(a$1.info(` Detected Python ${f}`),I.succeed(`Python ${f} detected`)):I.warn("Could not detect exact Python version");else {let b=A();f=await gt(b),f?I.succeed(`Python ${f} detected`):I.warn("Could not detect Python version, proceeding with defaults");}if(x.installMethod==="poetry"&&!await xt()&&(I.warn("Poetry not found \u2014 auto-fallback to pip + venv"),x.installMethod="venv"),await U(i$1,a,x.installMethod,f||void 0),f&&await Mt(i$1,f),await Y(i$1,a,x.installMethod,f||x.pythonVersion,d||h),await L(i$1),await z(i$1,a),x.installMethod==="poetry")try{await _t(i$1,x.pythonVersion,I,r,u,c);}catch(b){let w=b?.details||b?.message||String(b);if(w.includes("pyenv")||w.includes("exit status 127")||w.includes("returned non-zero exit status 127")){I.warn("Poetry encountered Python discovery issues, trying venv method"),a$1.debug(`Poetry error (attempting venv fallback): ${w}`);try{await ct(i$1,x.pythonVersion,I,r,u),x.installMethod="venv";}catch(T){throw T}}else throw b}else x.installMethod==="venv"?await ct(i$1,x.pythonVersion,I,r,u):await Et(i$1,I,r,u,c);if(await It(i$1,x.installMethod),await jt(i$1,x.installMethod),I.succeed("RapidKit environment ready!"),!o.skipGit){I.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}),I.succeed("Git repository initialized");}catch{I.warn("Could not initialize git repository");}}try{let{registerWorkspace:b}=await import('./workspace-AG2MQFTY.js');await b(i$1,a);}catch{console.warn(t.gray("Note: Could not register workspace in shared registry"));}if(console.log(t.green(`
214
+ `)),console.log(t.gray(" 1. Install Python 3.10+")),console.log(t.gray(` 2. Run: cd ${r} && rapidkit bootstrap --profile ${v}
215
+ `)),console.log("");return}catch(_){throw $.fail("Failed to create workspace"),console.error(t.red(`
216
+ \u274C Error:`),_),_}}}}a$1.step(1,3,"Setting up RapidKit environment");let R=F("Creating directory").start();try{await b.ensureDir(i$1),R.succeed("Directory created"),R.start("Detecting Python version");let w=null,I=await _t(x.pythonVersion);if(I)w=await gt(I),w?(a$1.info(` Detected Python ${w}`),R.succeed(`Python ${w} detected`)):R.warn("Could not detect exact Python version");else {let v=A();w=await gt(v),w?R.succeed(`Python ${w} detected`):R.warn("Could not detect Python version, proceeding with defaults");}if(x.installMethod==="poetry"&&!await Rt()&&(R.warn("Poetry not found \u2014 auto-fallback to pip + venv"),x.installMethod="venv"),await H(i$1,r,x.installMethod,w||void 0),w&&await Nt(i$1,w),await z(i$1,r,x.installMethod,w||x.pythonVersion,y||h),await L(i$1),await U(i$1,r),x.installMethod==="poetry")try{await Et(i$1,x.pythonVersion,R,a,p,c);}catch(v){let k=v?.details||v?.message||String(v);if(k.includes("pyenv")||k.includes("exit status 127")||k.includes("returned non-zero exit status 127")){R.warn("Poetry encountered Python discovery issues, trying venv method"),a$1.debug(`Poetry error (attempting venv fallback): ${k}`);try{await ct(i$1,x.pythonVersion,R,a,p),x.installMethod="venv";}catch($){throw $}}else throw v}else x.installMethod==="venv"?await ct(i$1,x.pythonVersion,R,a,p):await jt(i$1,R,a,p,c);if(await It(i$1,x.installMethod),await Ct(i$1,x.installMethod),R.succeed("RapidKit environment ready!"),!o.skipGit){R.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}),R.succeed("Git repository initialized");}catch{R.warn("Could not initialize git repository");}}try{let{registerWorkspace:v}=await import('./workspace-ZDL5IQU4.js');await v(i$1,r);}catch{console.warn(t.gray("Note: Could not register workspace in shared registry"));}if(console.log(t.green(`
217
217
  \u2728 RapidKit environment created successfully!
218
- `)),console.log(t.cyan("\u{1F4C2} Location:"),t.white(i$1)),console.log(t.cyan("\u2699\uFE0F Configuration:")),console.log(t.gray(` \u2022 Profile: ${d}`)),console.log(t.gray(` \u2022 Python: ${x.pythonVersion}`)),console.log(t.gray(` \u2022 Install method: ${x.installMethod}`)),console.log(t.cyan(`
218
+ `)),console.log(t.cyan("\u{1F4C2} Location:"),t.white(i$1)),console.log(t.cyan("\u2699\uFE0F Configuration:")),console.log(t.gray(` \u2022 Profile: ${y}`)),console.log(t.gray(` \u2022 Python: ${x.pythonVersion}`)),console.log(t.gray(` \u2022 Install method: ${x.installMethod}`)),console.log(t.cyan(`
219
219
  \u{1F680} Get started:
220
- `)),console.log(t.white(` cd ${a}`)),x.installMethod==="poetry"){let b="source $(poetry env info --path)/bin/activate";try{O();let{stdout:w}=await execa("poetry",["--version"]),S=w.match(/Poetry.*?(\d+)\.(\d+)/);S&&(parseInt(S[1])>=2?b="source $(poetry env info --path)/bin/activate":b="poetry shell");}catch{}console.log(t.white(` ${b} # Or: poetry run rapidkit`)),console.log(t.white(" rapidkit create # Interactive mode")),console.log(t.white(" cd <project-name>")),console.log(t.white(" rapidkit init")),console.log(t.white(" rapidkit dev")),console.log(t.gray(`
220
+ `)),console.log(t.white(` cd ${r}`)),x.installMethod==="poetry"){let v="source $(poetry env info --path)/bin/activate";try{N();let{stdout:k}=await execa("poetry",["--version"]),S=k.match(/Poetry.*?(\d+)\.(\d+)/);S&&(parseInt(S[1])>=2?v="source $(poetry env info --path)/bin/activate":v="poetry shell");}catch{}console.log(t.white(` ${v} # Or: poetry run rapidkit`)),console.log(t.white(" rapidkit create # Interactive mode")),console.log(t.white(" cd <project-name>")),console.log(t.white(" rapidkit init")),console.log(t.white(" rapidkit dev")),console.log(t.gray(`
221
221
  \u{1F4E6} Why Poetry? Includes dependency management + virtual environment`));}else x.installMethod==="venv"?(console.log(t.white(" source .venv/bin/activate # On Windows: .venv\\Scripts\\activate")),console.log(t.white(" rapidkit create # Interactive mode")),console.log(t.white(" cd <project-name>")),console.log(t.white(" rapidkit init")),console.log(t.white(" rapidkit dev")),console.log(t.gray(`
222
222
  \u{1F4E6} Why venv? Standard, zero extra tools, lightweight`))):(console.log(t.white(" rapidkit create # Interactive mode")),console.log(t.white(" cd <project-name>")),console.log(t.white(" rapidkit init")),console.log(t.white(" rapidkit dev")),console.log(t.gray(`
223
223
  \u{1F4E6} Why pipx? Global isolated install, no local venv`)));console.log(t.cyan(`
224
224
  \u{1F4DA} Next steps:`)),console.log(t.gray(" 1. Check README.md for workspace details")),console.log(t.gray(" 2. Create your first project: rapidkit create project")),console.log(t.gray(" 3. See all runtimes: rapidkit list # Shows: fastapi, nestjs, springboot, gofiber, gogin, dotnet")),console.log(t.cyan(`
225
225
  \u{1F4A1} Profile management:`)),console.log(t.gray(" \u2022 Add Python? \u2192 rapidkit bootstrap --profile python-only|polyglot")),console.log(t.gray(" \u2022 Add Node.js? \u2192 rapidkit bootstrap --profile node-only|polyglot")),console.log(t.gray(" \u2022 Add Go? \u2192 rapidkit bootstrap --profile go-only|polyglot")),console.log(t.gray(" \u2022 Add .NET? \u2192 rapidkit bootstrap --profile dotnet-only|polyglot")),console.log(t.gray(" \u2022 Full setup? \u2192 rapidkit bootstrap --profile enterprise")),console.log(t.cyan(`
226
226
  \u{1F4D6} Common commands:`)),console.log(t.white(" rapidkit create - Create a new project (interactive)")),console.log(t.white(" rapidkit list - List available kits")),console.log(t.white(" rapidkit modules - List available modules")),console.log(t.white(" rapidkit doctor - Check workspace health")),console.log(t.white(` rapidkit bootstrap --help - Advanced workspace configuration
227
- `));try{let{stdout:b}=await execa("go",["version"],{timeout:3e3}),w=b.match(/go version go(\d+\.\d+(?:\.\d+)?)/),S=w?w[1]:"unknown";console.log(t.gray(`\u{1F439} Go ${S} detected \u2014 ready for gofiber.standard projects`));}catch{console.log(t.yellow("\u26A0\uFE0F Go not installed \u2014 needed for gofiber.standard/gogin.standard projects")),console.log(t.gray(" Install: https://go.dev/dl/"));}console.log("");}catch(f){I.fail("Failed to create RapidKit environment"),console.error(t.red(`
228
- \u274C Error:`),f);try{await k.remove(i$1);}catch{}throw f}}async function Rt(e$1){let o=[];if(!a$2())try{let{stdout:p}=await execa("pyenv",["which","python"]),c=p.trim();c&&o.push(c);}catch{}let n=Number(e$1.split(".")[1]),r=e(n,10).map(p=>p.command).filter(Boolean);o.push(`python${e$1}`,...r,...d$1());let l=[...new Set(o)];for(let p of l)try{let c=p==="py"?["-3","--version"]:["--version"],u=p==="py"?["-3","-c","import sys; sys.exit(0)"]:["-c","import sys; sys.exit(0)"],{stdout:g}=await execa(p,c,{timeout:2e3}),h=g.match(/Python (\d+\.\d+)/)?.[1];if(h&&V(h,e$1))return await execa(p,u,{timeout:2e3}),p}catch{continue}return null}async function _t(e,o,n,r,l$1,p=false){await Ot(n,p),n.start("Finding Python interpreter");let c=await Rt(o);c?(a$1.debug(`Found working Python: ${c}`),n.succeed("Python found")):n.warn("Could not verify Python path, proceeding with default"),n.start("Initializing Poetry project");let u=m.join(e,"pyproject.toml"),h=(await k.pathExists(u)?await promises.readFile(u,"utf-8"):"").includes("rapidkit-core");if(h)n.succeed("Poetry project initialized");else {await execa("poetry",["init","--no-interaction","--python",`^${o}`],{cwd:e}),n.succeed("Poetry project initialized");let d=await promises.readFile(u,"utf-8");d.includes("[tool.poetry]")?d=d.replace("[tool.poetry]",`[tool.poetry]
229
- package-mode = false`):d.includes("[project]")&&(d.includes("[build-system]")?d=d.replace("[build-system]",`
227
+ `));try{let{stdout:v}=await execa("go",["version"],{timeout:3e3}),k=v.match(/go version go(\d+\.\d+(?:\.\d+)?)/),S=k?k[1]:"unknown";console.log(t.gray(`\u{1F439} Go ${S} detected \u2014 ready for gofiber.standard projects`));}catch{console.log(t.yellow("\u26A0\uFE0F Go not installed \u2014 needed for gofiber.standard/gogin.standard projects")),console.log(t.gray(" Install: https://go.dev/dl/"));}console.log("");}catch(w){R.fail("Failed to create RapidKit environment"),console.error(t.red(`
228
+ \u274C Error:`),w);try{await b.remove(i$1);}catch{}throw w}}async function _t(e$1){let o=[];if(!a$2())try{let{stdout:d}=await execa("pyenv",["which","python"]),c=d.trim();c&&o.push(c);}catch{}let n=Number(e$1.split(".")[1]),a=e(n,10).map(d=>d.command).filter(Boolean);o.push(`python${e$1}`,...a,...d$1());let s=[...new Set(o)];for(let d of s)try{let c=d==="py"?["-3","--version"]:["--version"],p=d==="py"?["-3","-c","import sys; sys.exit(0)"]:["-c","import sys; sys.exit(0)"],{stdout:u}=await execa(d,c,{timeout:2e3}),h=u.match(/Python (\d+\.\d+)/)?.[1];if(h&&V(h,e$1))return await execa(d,p,{timeout:2e3}),d}catch{continue}return null}async function Et(e,o,n,a,s,d=false){await Gt(n,d),n.start("Finding Python interpreter");let c=await _t(o);c?(a$1.debug(`Found working Python: ${c}`),n.succeed("Python found")):n.warn("Could not verify Python path, proceeding with default"),n.start("Initializing Poetry project");let p=g.join(e,"pyproject.toml"),h=(await b.pathExists(p)?await promises.readFile(p,"utf-8"):"").includes("rapidkit-core");if(h)n.succeed("Poetry project initialized");else {await execa("poetry",["init","--no-interaction","--python",`^${o}`],{cwd:e}),n.succeed("Poetry project initialized");let f=await promises.readFile(p,"utf-8");f.includes("[tool.poetry]")?f=f.replace("[tool.poetry]",`[tool.poetry]
229
+ package-mode = false`):f.includes("[project]")&&(f.includes("[build-system]")?f=f.replace("[build-system]",`
230
230
  [tool.poetry]
231
231
  package-mode = false
232
232
 
233
- [build-system]`):d+=`
233
+ [build-system]`):f+=`
234
234
 
235
235
  [tool.poetry]
236
236
  package-mode = false
237
- `),await promises.writeFile(u,d,"utf-8");}n.start("Configuring Poetry");try{await execa("poetry",["config","virtualenvs.in-project","true","--local"],{cwd:e}),n.succeed("Poetry configured");}catch{n.warn("Could not configure Poetry virtualenvs.in-project");}n.start("Creating virtualenv");let a=c||A(),i=f(m.join(e,".venv"));try{await execa(a,["-m","venv",".venv"],{cwd:e,timeout:6e4}),n.succeed("Virtualenv created");}catch(y){a$1.debug(`python -m venv failed: ${y}`),n.warn("Could not pre-create virtualenv, Poetry will try"),i=c||A();}try{await execa("poetry",["env","use",i||A()],{cwd:e}),a$1.debug(`Poetry env set to: ${i}`);}catch(y){a$1.debug(`Could not set Poetry env: ${y}`);}if(n.start("Installing RapidKit"),h&&!r){let y=d$2(l$1||{}),d=y?await k.pathExists(y):false,P=d&&y?y:"rapidkit-core";y&&!d&&a$1.warn(`RAPIDKIT_DEV_PATH is set but path does not exist: ${y}. Falling back to PyPI.`),n.text=d?"Installing RapidKit from local path":"Installing RapidKit from PyPI";let $=false,D=null;for(let _=1;_<=3;_++)try{await execa(i,["-m","pip","install",P,"--quiet"],{cwd:e,timeout:18e4}),$=true;break}catch(G){D=G,a$1.debug(`pip install rapidkit-core attempt ${_} failed: ${G}`),_<3&&(n.text=`Retrying installation (attempt ${_+1}/3)`,await new Promise(et=>setTimeout(et,2e3)));}if(!$){let _=D?.stderr||D?.message||"Unknown error";throw a$1.debug(`All pip install attempts failed. Last error: ${_}`),_.includes("Could not find")||_.includes("No matching distribution")?new l:new k$1("Install rapidkit-core with pip",new Error(`Failed to install rapidkit-core after 3 attempts.
238
- Error: ${_}
237
+ `),await promises.writeFile(p,f,"utf-8");}n.start("Configuring Poetry");try{await execa("poetry",["config","virtualenvs.in-project","true","--local"],{cwd:e}),n.succeed("Poetry configured");}catch{n.warn("Could not configure Poetry virtualenvs.in-project");}n.start("Creating virtualenv");let m=c||A(),r=f(g.join(e,".venv"));try{await execa(m,["-m","venv",".venv"],{cwd:e,timeout:6e4}),n.succeed("Virtualenv created");}catch(i){a$1.debug(`python -m venv failed: ${i}`),n.warn("Could not pre-create virtualenv, Poetry will try"),r=c||A();}try{await execa("poetry",["env","use",r||A()],{cwd:e}),a$1.debug(`Poetry env set to: ${r}`);}catch(i){a$1.debug(`Could not set Poetry env: ${i}`);}if(n.start("Installing RapidKit"),h&&!a){let i=d$2(s||{}),f=i?await b.pathExists(i):false,y=f&&i?i:"rapidkit-core";i&&!f&&a$1.warn(`RAPIDKIT_DEV_PATH is set but path does not exist: ${i}. Falling back to PyPI.`),n.text=f?"Installing RapidKit from local path":"Installing RapidKit from PyPI";let E=false,D=null;for(let C=1;C<=3;C++)try{await execa(r,["-m","pip","install",y,"--quiet"],{cwd:e,timeout:18e4}),E=true;break}catch(O){D=O,a$1.debug(`pip install rapidkit-core attempt ${C} failed: ${O}`),C<3&&(n.text=`Retrying installation (attempt ${C+1}/3)`,await new Promise(Y=>setTimeout(Y,2e3)));}if(!E){let C=D?.stderr||D?.message||"Unknown error";throw a$1.debug(`All pip install attempts failed. Last error: ${C}`),C.includes("Could not find")||C.includes("No matching distribution")?new l:new k("Install rapidkit-core with pip",new Error(`Failed to install rapidkit-core after 3 attempts.
238
+ Error: ${C}
239
239
 
240
240
  Possible solutions:
241
241
  1. Check your internet connection
242
- 2. Try installing manually: cd ${m.basename(e)} && poetry add rapidkit-core
243
- 3. Use venv method instead: npx rapidkit ${m.basename(e)} --install-method=venv`))}}else {n.text="Syncing Poetry environment";try{await execa("poetry",["install","--no-root"],{cwd:e,timeout:12e4}),n.succeed("Poetry environment synced");}catch(y){a$1.debug(`poetry install --no-root failed: ${y}`),n.warn("Could not sync Poetry environment, proceeding with add command");}if(n.start("Installing RapidKit"),r){let y=d$2(l$1||{});if(!y)throw new k$1("Test mode installation",new Error("No local RapidKit path configured. Set RAPIDKIT_DEV_PATH environment variable."));a$1.debug(`Installing from local path: ${y}`),n.text="Installing RapidKit from local path (test mode)",await execa("poetry",["add",y],{cwd:e});}else {n.text="Installing RapidKit from PyPI";let y=false,d=null;for(let P=1;P<=3;P++)try{await execa("poetry",["add","rapidkit-core"],{cwd:e,timeout:6e4*P}),y=true;break}catch($){d=$,a$1.debug(`Poetry add attempt ${P} failed: ${$}`),P<3&&(n.text=`Retrying installation (attempt ${P+1}/3)`,await new Promise(D=>setTimeout(D,2e3)));}if(!y){let P=d?.stderr||d?.message||"Unknown error";throw a$1.debug(`All Poetry install attempts failed. Last error: ${P}`),P.includes("Could not find")||P.includes("No matching distribution")?new l:new k$1("Install rapidkit-core with Poetry",new Error(`Failed to install rapidkit-core after 3 attempts.
244
- Error: ${P}
242
+ 2. Try installing manually: cd ${g.basename(e)} && poetry add rapidkit-core
243
+ 3. Use venv method instead: npx rapidkit ${g.basename(e)} --install-method=venv`))}}else {n.text="Syncing Poetry environment";try{await execa("poetry",["install","--no-root"],{cwd:e,timeout:12e4}),n.succeed("Poetry environment synced");}catch(i){a$1.debug(`poetry install --no-root failed: ${i}`),n.warn("Could not sync Poetry environment, proceeding with add command");}if(n.start("Installing RapidKit"),a){let i=d$2(s||{});if(!i)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: ${i}`),n.text="Installing RapidKit from local path (test mode)",await execa("poetry",["add",i],{cwd:e});}else {n.text="Installing RapidKit from PyPI";let i=false,f=null;for(let y=1;y<=3;y++)try{await execa("poetry",["add","rapidkit-core"],{cwd:e,timeout:6e4*y}),i=true;break}catch(E){f=E,a$1.debug(`Poetry add attempt ${y} failed: ${E}`),y<3&&(n.text=`Retrying installation (attempt ${y+1}/3)`,await new Promise(D=>setTimeout(D,2e3)));}if(!i){let y=f?.stderr||f?.message||"Unknown error";throw a$1.debug(`All Poetry install attempts failed. Last error: ${y}`),y.includes("Could not find")||y.includes("No matching distribution")?new l:new k("Install rapidkit-core with Poetry",new Error(`Failed to install rapidkit-core after 3 attempts.
244
+ Error: ${y}
245
245
 
246
246
  Possible solutions:
247
247
  1. Check your internet connection
248
- 2. Try installing manually: cd ${m.basename(e)} && poetry add rapidkit-core
249
- 3. Use venv method instead: npx rapidkit ${m.basename(e)} --install-method=venv`))}}}n.succeed("RapidKit installed in project virtualenv");try{let{checkRapidkitCoreAvailable:y}=await import('./pythonRapidkitExec-MNWRC4F2.js');if(!await y()&&!r){n.start("Checking optional global pipx installation");let P=await tt(n,true);try{n.start("Installing RapidKit globally with pipx for CLI access"),await N(P,["install","rapidkit-core"]),n.succeed("RapidKit installed globally");}catch($){n.warn("Could not install globally (non-fatal, project virtualenv has RapidKit)"),a$1.debug(`pipx install failed: ${$}`);}}}catch(y){n.succeed("Skipped optional global pipx installation"),a$1.debug(`Global install check skipped: ${y}`);}}async function ct(e,o,n,r,l$1,p=false){n.start(`Checking Python ${o}`);let c=A();try{let{stdout:g}=await execa(c,["--version"]),h=g.match(/Python (\d+\.\d+)/)?.[1];if(h&&!V(h,o))throw new f$1(o,h);n.succeed(`Python ${h} found`);}catch(g){throw g instanceof f$1?g:new f$1(o)}n.start("Creating virtual environment");try{await execa(c,["-m","venv",".venv"],{cwd:e}),n.succeed("Virtual environment created");}catch(g){if(n.fail("Failed to create virtual environment"),(a=>typeof a=="object"&&a!==null&&"stdout"in a&&typeof a.stdout=="string")(g)&&g.stdout.includes("ensurepip is not")){let a=g.stdout.match(/apt install (python[\d.]+-venv)/),i=a?a[1]:"python3-venv";throw new k$1("Python venv module not available",new Error(`Virtual environment creation failed.
248
+ 2. Try installing manually: cd ${g.basename(e)} && poetry add rapidkit-core
249
+ 3. Use venv method instead: npx rapidkit ${g.basename(e)} --install-method=venv`))}}}n.succeed("RapidKit installed in project virtualenv");try{let{checkRapidkitCoreAvailable:i}=await import('./pythonRapidkitExec-MNWRC4F2.js');if(!await i()&&!a){n.start("Checking optional global pipx installation");let y=await tt(n,true);try{n.start("Installing RapidKit globally with pipx for CLI access"),await K(y,["install","rapidkit-core"]),n.succeed("RapidKit installed globally");}catch(E){n.warn("Could not install globally (non-fatal, project virtualenv has RapidKit)"),a$1.debug(`pipx install failed: ${E}`);}}}catch(i){n.succeed("Skipped optional global pipx installation"),a$1.debug(`Global install check skipped: ${i}`);}}async function ct(e,o,n,a,s,d=false){n.start(`Checking Python ${o}`);let c=A();try{let{stdout:u}=await execa(c,["--version"]),h=u.match(/Python (\d+\.\d+)/)?.[1];if(h&&!V(h,o))throw new f$1(o,h);n.succeed(`Python ${h} found`);}catch(u){throw u instanceof f$1?u:new f$1(o)}n.start("Creating virtual environment");try{await execa(c,["-m","venv",".venv"],{cwd:e}),n.succeed("Virtual environment created");}catch(u){if(n.fail("Failed to create virtual environment"),(m=>typeof m=="object"&&m!==null&&"stdout"in m&&typeof m.stdout=="string")(u)&&u.stdout.includes("ensurepip is not")){let m=u.stdout.match(/apt install (python[\d.]+-venv)/),r=m?m[1]:"python3-venv";throw new k("Python venv module not available",new Error(`Virtual environment creation failed.
250
250
 
251
251
  On Debian/Ubuntu systems, install the venv package:
252
- sudo apt install ${i}
252
+ sudo apt install ${r}
253
253
 
254
254
  Or use Poetry instead (recommended):
255
- npx rapidkit ${m.basename(e)} --yes`))}throw new k$1("Virtual environment creation",g instanceof Error?g:new Error(String(g)))}n.start("Installing RapidKit");let u=f(m.join(e,".venv"));if(await execa(u,["-m","pip","install","--upgrade","pip"],{cwd:e}),r){let g=d$2(l$1||{});if(!g)throw new k$1("Test mode installation",new Error("No local RapidKit path configured. Set RAPIDKIT_DEV_PATH environment variable."));a$1.debug(`Installing from local path: ${g}`),n.text="Installing RapidKit from local path (test mode)",await execa(u,["-m","pip","install","-e",g],{cwd:e});}else {n.text="Installing RapidKit from PyPI";let g=false,h=null;for(let a=1;a<=3;a++)try{await execa(u,["-m","pip","install","rapidkit-core"],{cwd:e,timeout:6e4*a}),g=true;break}catch(i){h=i,a$1.debug(`pip install attempt ${a} failed: ${i}`),a<3&&(n.text=`Retrying installation (attempt ${a+1}/3)`,await new Promise(y=>setTimeout(y,2e3)));}if(!g){let a=h?.stderr||h?.message||"Unknown error";throw a$1.debug(`All pip install attempts failed. Last error: ${a}`),a.includes("Could not find")||a.includes("No matching distribution")?new l:new k$1("Install rapidkit-core with pip",new Error(`Failed to install rapidkit-core after 3 attempts.
256
- Error: ${a}
255
+ npx rapidkit ${g.basename(e)} --yes`))}throw new k("Virtual environment creation",u instanceof Error?u:new Error(String(u)))}n.start("Installing RapidKit");let p=f(g.join(e,".venv"));if(await execa(p,["-m","pip","install","--upgrade","pip"],{cwd:e}),a){let u=d$2(s||{});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 execa(p,["-m","pip","install","-e",u],{cwd:e});}else {n.text="Installing RapidKit from PyPI";let u=false,h=null;for(let m=1;m<=3;m++)try{await execa(p,["-m","pip","install","rapidkit-core"],{cwd:e,timeout:6e4*m}),u=true;break}catch(r){h=r,a$1.debug(`pip install attempt ${m} failed: ${r}`),m<3&&(n.text=`Retrying installation (attempt ${m+1}/3)`,await new Promise(i=>setTimeout(i,2e3)));}if(!u){let m=h?.stderr||h?.message||"Unknown error";throw a$1.debug(`All pip install attempts failed. Last error: ${m}`),m.includes("Could not find")||m.includes("No matching distribution")?new l:new k("Install rapidkit-core with pip",new Error(`Failed to install rapidkit-core after 3 attempts.
256
+ Error: ${m}
257
257
 
258
258
  Possible solutions:
259
259
  1. Check your internet connection
260
- 2. Try installing manually: cd ${m.basename(e)} && ${f(".venv")} -m pip install rapidkit-core
261
- 3. Use Poetry instead: npx rapidkit ${m.basename(e)} --install-method=poetry`))}}n.succeed("RapidKit installed in project virtualenv");try{let{checkRapidkitCoreAvailable:g}=await import('./pythonRapidkitExec-MNWRC4F2.js');if(!await g()&&!r){n.start("Checking optional global pipx installation");let a=await tt(n,true);try{n.start("Installing RapidKit globally with pipx for CLI access"),await N(a,["install","rapidkit-core"]),n.succeed("RapidKit installed globally");}catch(i){n.warn("Could not install globally (non-fatal, project virtualenv has RapidKit)"),a$1.debug(`pipx install failed: ${i}`);}}}catch(g){n.succeed("Skipped optional global pipx installation"),a$1.debug(`Global install check skipped: ${g}`);}}async function Et(e,o,n,r,l$1=false){if(!n)try{let{checkRapidkitCoreVersionCompatible:c}=await import('./pythonRapidkitExec-MNWRC4F2.js'),u=await c();if(u.isCompatible){o.succeed(`RapidKit ${u.installedVersion??""} already compatible globally; skipping pipx installation`),await k.outputFile(m.join(e,".rapidkit-global"),`RapidKit already available globally (version ${u.installedVersion??"unknown"}) and satisfies expected constraint ${u.expectedConstraint??"n/a"}; workspace will reuse the existing installation
262
- `,"utf-8");return}u.reason==="constraint-missing"?o.warn('Version-aware global reuse skipped: no explicit rapidkit-core version constraint found. Set RAPIDKIT_CORE_PYTHON_PACKAGE (example: RAPIDKIT_CORE_PYTHON_PACKAGE="rapidkit-core>=0.4.0,<0.9.0") to enable version-aware reuse. Proceeding with pipx install/upgrade.'):u.reason==="constraint-unsupported"&&o.warn('Version-aware global reuse skipped: RAPIDKIT_CORE_PYTHON_PACKAGE uses an unsupported spec (path/url/git). Use a version range instead (example: RAPIDKIT_CORE_PYTHON_PACKAGE="rapidkit-core==0.4.0" or "rapidkit-core>=0.4.0,<0.9.0"). Proceeding with pipx install/upgrade.'),a$1.debug(`Global RapidKit install is not reusable via version-aware policy (reason=${u.reason}, installed=${u.installedVersion??"unknown"}, expected=${u.expectedConstraint??"none"}). Proceeding with pipx install/upgrade.`);}catch(c){a$1.debug(`Global RapidKit version-aware check failed before pipx install: ${c}`);}let p=await tt(o,l$1);if(o.start("Installing RapidKit globally with pipx"),n){let c=d$2(r||{});if(!c)throw new k$1("Test mode installation",new Error("No local RapidKit path configured. Set RAPIDKIT_DEV_PATH environment variable."));a$1.debug(`Installing from local path: ${c}`),o.text="Installing RapidKit from local path (test mode)",await N(p,["install","-e",c]);}else {o.text="Installing RapidKit from PyPI";try{await N(p,["install","rapidkit-core"]);}catch(c){try{o.text="RapidKit already installed globally, upgrading to match expected version",await N(p,["upgrade","rapidkit-core"]);}catch(u){throw a$1.debug(`pipx install/upgrade failed: install=${c}, upgrade=${u}`),new l}}}o.succeed("RapidKit installed globally"),await k.outputFile(m.join(e,".rapidkit-global"),`RapidKit installed globally with pipx
263
- `,"utf-8");}async function ce(e,o){let{skipGit:n=false,testMode:r=false,userConfig:l={},yes:p=false,installMethod:c,pythonVersion:u="3.10"}=o||{},g=c||l.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=g==="poetry"&&!await xt()?"venv":g;await U(e,m.basename(e),h),await L(e),await Y(e,m.basename(e),h,u,o?.profile);let a=F("Registering workspace").start();try{h==="poetry"?(await z(e,m.basename(e)),await _t(e,u,a,r,l,p)):h==="venv"?await ct(e,u,a,r,l):await Et(e,a,r,l,p),await It(e,h),await jt(e,h),a.succeed("Workspace registered");try{let{registerWorkspace:i}=await import('./workspace-AG2MQFTY.js');await i(e,m.basename(e));}catch{}if(!n){a.start("Initializing git repository");try{await execa("git",["init"],{cwd:e}),await execa("git",["add","."],{cwd:e}),await execa("git",["commit","-m","Initial commit: RapidKit workspace"],{cwd:e}),a.succeed("Git repository initialized");}catch{a.warn("Could not initialize git repository");}}}catch(i){throw a.fail("Failed to register workspace"),i}}async function jt(e,o){let n=o==="poetry"?`source $(poetry env info --path)/bin/activate
264
- # Or simply use: poetry run rapidkit <command>`:o==="venv"?"source .venv/bin/activate # On Windows: .venv\\Scripts\\activate":"N/A (globally installed)",r=o==="poetry"?`# No activation needed (recommended):
260
+ 2. Try installing manually: cd ${g.basename(e)} && ${f(".venv")} -m pip install rapidkit-core
261
+ 3. Use Poetry instead: npx rapidkit ${g.basename(e)} --install-method=poetry`))}}n.succeed("RapidKit installed in project virtualenv");try{let{checkRapidkitCoreAvailable:u}=await import('./pythonRapidkitExec-MNWRC4F2.js');if(!await u()&&!a){n.start("Checking optional global pipx installation");let m=await tt(n,true);try{n.start("Installing RapidKit globally with pipx for CLI access"),await K(m,["install","rapidkit-core"]),n.succeed("RapidKit installed globally");}catch(r){n.warn("Could not install globally (non-fatal, project virtualenv has RapidKit)"),a$1.debug(`pipx install failed: ${r}`);}}}catch(u){n.succeed("Skipped optional global pipx installation"),a$1.debug(`Global install check skipped: ${u}`);}}async function jt(e,o,n,a,s=false){if(!n)try{let{checkRapidkitCoreVersionCompatible:c}=await import('./pythonRapidkitExec-MNWRC4F2.js'),p=await c();if(p.isCompatible){o.succeed(`RapidKit ${p.installedVersion??""} already compatible globally; skipping pipx installation`),await b.outputFile(g.join(e,".rapidkit-global"),`RapidKit already available globally (version ${p.installedVersion??"unknown"}) and satisfies expected constraint ${p.expectedConstraint??"n/a"}; workspace will reuse the existing installation
262
+ `,"utf-8");return}p.reason==="constraint-missing"?o.warn('Version-aware global reuse skipped: no explicit rapidkit-core version constraint found. Set RAPIDKIT_CORE_PYTHON_PACKAGE (example: RAPIDKIT_CORE_PYTHON_PACKAGE="rapidkit-core>=0.4.0,<0.9.0") to enable version-aware reuse. Proceeding with pipx install/upgrade.'):p.reason==="constraint-unsupported"&&o.warn('Version-aware global reuse skipped: RAPIDKIT_CORE_PYTHON_PACKAGE uses an unsupported spec (path/url/git). Use a version range instead (example: RAPIDKIT_CORE_PYTHON_PACKAGE="rapidkit-core==0.4.0" or "rapidkit-core>=0.4.0,<0.9.0"). Proceeding with pipx install/upgrade.'),a$1.debug(`Global RapidKit install is not reusable via version-aware policy (reason=${p.reason}, installed=${p.installedVersion??"unknown"}, expected=${p.expectedConstraint??"none"}). Proceeding with pipx install/upgrade.`);}catch(c){a$1.debug(`Global RapidKit version-aware check failed before pipx install: ${c}`);}let d=await tt(o,s);if(o.start("Installing RapidKit globally with pipx"),n){let c=d$2(a||{});if(!c)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: ${c}`),o.text="Installing RapidKit from local path (test mode)",await K(d,["install","-e",c]);}else {o.text="Installing RapidKit from PyPI";try{await K(d,["install","rapidkit-core"]);}catch(c){try{o.text="RapidKit already installed globally, upgrading to match expected version",await K(d,["upgrade","rapidkit-core"]);}catch(p){throw a$1.debug(`pipx install/upgrade failed: install=${c}, upgrade=${p}`),new l}}}o.succeed("RapidKit installed globally"),await b.outputFile(g.join(e,".rapidkit-global"),`RapidKit installed globally with pipx
263
+ `,"utf-8");}async function ue(e,o){let{skipGit:n=false,testMode:a=false,userConfig:s={},yes:d=false,installMethod:c,pythonVersion:p="3.10"}=o||{},u=c||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=u==="poetry"&&!await Rt()?"venv":u;await H(e,g.basename(e),h),await L(e),await z(e,g.basename(e),h,p,o?.profile);let m=F("Registering workspace").start();try{h==="poetry"?(await U(e,g.basename(e)),await Et(e,p,m,a,s,d)):h==="venv"?await ct(e,p,m,a,s):await jt(e,m,a,s,d),await It(e,h),await Ct(e,h),m.succeed("Workspace registered");try{let{registerWorkspace:r}=await import('./workspace-ZDL5IQU4.js');await r(e,g.basename(e));}catch{}if(!n){m.start("Initializing git repository");try{await execa("git",["init"],{cwd:e}),await execa("git",["add","."],{cwd:e}),await execa("git",["commit","-m","Initial commit: RapidKit workspace"],{cwd:e}),m.succeed("Git repository initialized");}catch{m.warn("Could not initialize git repository");}}}catch(r){throw m.fail("Failed to register workspace"),r}}async function Ct(e,o){let n=o==="poetry"?`source $(poetry env info --path)/bin/activate
264
+ # Or simply use: poetry run rapidkit <command>`:o==="venv"?"source .venv/bin/activate # On Windows: .venv\\Scripts\\activate":"N/A (globally installed)",a=o==="poetry"?`# No activation needed (recommended):
265
265
  ./rapidkit --help
266
266
  # or:
267
267
  poetry run rapidkit --help`:o==="venv"?`# No activation needed (recommended):
@@ -269,7 +269,7 @@ poetry run rapidkit --help`:o==="venv"?`# No activation needed (recommended):
269
269
  # or direct:
270
270
  ./.venv/bin/rapidkit --help`:`# Optional: use the local launcher
271
271
  ./rapidkit --help
272
- # (pipx installs may require Poetry/venv to be present in this folder)`,l=a$2()?"python --version (or: py -3 --version)":"python3 --version (or: python --version)",p=`# RapidKit Workspace
272
+ # (pipx installs may require Poetry/venv to be present in this folder)`,s=a$2()?"python --version (or: py -3 --version)":"python3 --version (or: python --version)",d=`# RapidKit Workspace
273
273
 
274
274
  This directory contains a RapidKit development environment.
275
275
 
@@ -284,7 +284,7 @@ This directory contains a RapidKit development environment.
284
284
  This workspace includes a local launcher script so you can run the Python Core CLI without activating the environment:
285
285
 
286
286
  \`\`\`bash
287
- ${r}
287
+ ${a}
288
288
  \`\`\`
289
289
 
290
290
  ### 1. Activate Environment
@@ -367,11 +367,11 @@ README.md # This file
367
367
 
368
368
  If you encounter issues:
369
369
 
370
- 1. Ensure Python 3.10+ is installed: \`${l}\`
370
+ 1. Ensure Python 3.10+ is installed: \`${s}\`
371
371
  2. Check RapidKit installation: \`rapidkit --version\`
372
372
  3. Run diagnostics: \`rapidkit doctor\`
373
373
  4. Visit RapidKit documentation or GitHub issues
374
- `;await promises.writeFile(m.join(e,"README.md"),p,"utf-8");}async function Vt(e,o,n){let r=F("Creating demo workspace").start();try{await k.ensureDir(e),r.succeed("Directory created"),r.start("Setting up demo kit generator");let l=JSON.stringify({name:`${o}-workspace`,version:"1.0.0",private:true,description:"RapidKit demo workspace",scripts:{generate:"node generate-demo.js"}},null,2);await promises.writeFile(m.join(e,"package.json"),l,"utf-8"),await promises.writeFile(m.join(e,"generate-demo.js"),`#!/usr/bin/env node
374
+ `;await promises.writeFile(g.join(e,"README.md"),d,"utf-8");}async function Ut(e,o,n){let a=F("Creating demo workspace").start();try{await b.ensureDir(e),a.succeed("Directory created"),a.start("Setting up demo kit generator");let s=JSON.stringify({name:`${o}-workspace`,version:"1.0.0",private:true,description:"RapidKit demo workspace",scripts:{generate:"node generate-demo.js"}},null,2);await promises.writeFile(g.join(e,"package.json"),s,"utf-8"),await promises.writeFile(g.join(e,"generate-demo.js"),`#!/usr/bin/env node
375
375
  /**
376
376
  * Demo Kit Generator - Create FastAPI demo projects
377
377
  *
@@ -767,7 +767,7 @@ venv/
767
767
  }
768
768
 
769
769
  main().catch(console.error);
770
- `,"utf-8");try{await execa("chmod",["+x",m.join(e,"generate-demo.js")]);}catch{}let c=`# RapidKit Demo Workspace
770
+ `,"utf-8");try{await execa("chmod",["+x",g.join(e,"generate-demo.js")]);}catch{}let c=`# RapidKit Demo Workspace
771
771
 
772
772
  Welcome to your RapidKit demo workspace! This environment lets you generate FastAPI demo projects using bundled RapidKit templates, without needing to install Python RapidKit.
773
773
 
@@ -854,7 +854,7 @@ ${o}/
854
854
  ---
855
855
 
856
856
  **Generated with RapidKit** | [GitHub](https://github.com/rapidkitlabs/rapidkit-npm)
857
- `;if(await promises.writeFile(m.join(e,"README.md"),c,"utf-8"),r.succeed("Demo workspace setup complete"),!n){r.start("Initializing git repository");try{await execa("git",["init"],{cwd:e}),await k.outputFile(m.join(e,".gitignore"),`# Dependencies
857
+ `;if(await promises.writeFile(g.join(e,"README.md"),c,"utf-8"),a.succeed("Demo workspace setup complete"),!n){a.start("Initializing git repository");try{await execa("git",["init"],{cwd:e}),await b.outputFile(g.join(e,".gitignore"),`# Dependencies
858
858
  node_modules/
859
859
 
860
860
  # Generated projects
@@ -867,17 +867,17 @@ __pycache__/
867
867
  *.pyc
868
868
  .venv/
869
869
  .env
870
- `,"utf-8"),await execa("git",["add","."],{cwd:e}),await execa("git",["commit","-m","Initial commit: Demo workspace"],{cwd:e}),r.succeed("Git repository initialized");}catch{r.warn("Could not initialize git repository");}}console.log(t.green(`
870
+ `,"utf-8"),await execa("git",["add","."],{cwd:e}),await execa("git",["commit","-m","Initial commit: Demo workspace"],{cwd:e}),a.succeed("Git repository initialized");}catch{a.warn("Could not initialize git repository");}}console.log(t.green(`
871
871
  \u2728 Demo workspace created successfully!
872
872
  `)),console.log(t.cyan("\u{1F4C2} Location:"),t.white(e)),console.log(t.cyan(`\u{1F680} Get started:
873
- `)),console.log(t.white(` cd ${o}`)),console.log(t.white(" node generate-demo.js my-api")),console.log(t.white(" cd my-api")),console.log(t.white(" rapidkit init")),console.log(t.white(" rapidkit dev")),console.log(),console.log(t.yellow("\u{1F4A1} Note:"),"This is a demo workspace. For full RapidKit features:"),console.log(t.cyan(" pipx install rapidkit")),console.log();}catch(l){throw r.fail("Failed to create demo workspace"),l}}async function Gt(e,o,n,r,l,p,c){if(console.log(t.cyan(`
873
+ `)),console.log(t.white(` cd ${o}`)),console.log(t.white(" node generate-demo.js my-api")),console.log(t.white(" cd my-api")),console.log(t.white(" rapidkit init")),console.log(t.white(" rapidkit dev")),console.log(),console.log(t.yellow("\u{1F4A1} Note:"),"This is a demo workspace. For full RapidKit features:"),console.log(t.cyan(" pipx install rapidkit")),console.log();}catch(s){throw a.fail("Failed to create demo workspace"),s}}async function zt(e,o,n,a,s,d,c){if(console.log(t.cyan(`
874
874
  \u{1F50D} Dry-run mode - what would be created:
875
875
  `)),console.log(t.white("\u{1F4C2} Workspace path:"),e),console.log(t.white("\u{1F4DB} Name:"),t.cyan(o)),n)console.log(t.white("\u{1F4E6} Type:"),"Demo environment"),console.log(t.white(`
876
876
  \u{1F4DD} Files to create:`)),console.log(t.gray(" - package.json")),console.log(t.gray(" - generate-demo.js (project generator)")),console.log(t.gray(" - README.md")),console.log(t.gray(" - .gitignore")),console.log(t.white(`
877
- \u{1F3AF} Capabilities:`)),console.log(t.gray(" - Generate FastAPI/NestJS demo projects")),console.log(t.gray(" - No Python RapidKit installation required")),console.log(t.gray(" - Bundled templates"));else {let u=l||"minimal",g=p,h=c,i=new Set(["python-only","polyglot","enterprise"]).has(u);console.log(t.white("\u{1F4E6} Profile:"),t.cyan(u)),console.log(t.white("\u{1F4DD} Configuration:")),i?(console.log(t.gray(` - Python version: ${h}`)),console.log(t.gray(` - Install method: ${g}`)),console.log(t.gray(` - Git init: ${r.skipGit?"No":"Yes"}`))):(console.log(t.gray(" - Python-free profile (no Python needed)")),console.log(t.gray(` - Git init: ${r.skipGit?"No":"Yes"}`))),console.log(t.white(`
878
- \u{1F4CB} Files to create:`)),console.log(t.gray(" - .rapidkit-workspace (workspace marker)")),console.log(t.gray(" - .rapidkit/ (workspace config directory)")),console.log(t.gray(" - README.md")),console.log(t.gray(" - .gitignore")),i&&console.log(t.gray(` - ${g==="poetry"?"pyproject.toml + poetry.lock":".venv/ (virtual environment)"}`)),console.log(t.white(`
879
- \u2699\uFE0F Environment setup:`)),i&&console.log(g==="poetry"?t.gray(" - Poetry virtual environment created (recommended, includes dependency management)"):g==="venv"?t.gray(" - Python venv created in .venv/ (standard, zero extra tools)"):t.gray(" - Global pipx install (isolated, not local to workspace)")),console.log(t.white(`
877
+ \u{1F3AF} Capabilities:`)),console.log(t.gray(" - Generate FastAPI/NestJS demo projects")),console.log(t.gray(" - No Python RapidKit installation required")),console.log(t.gray(" - Bundled templates"));else {let p=s||"minimal",u=d,h=c,r=new Set(["python-only","polyglot","enterprise"]).has(p);console.log(t.white("\u{1F4E6} Profile:"),t.cyan(p)),console.log(t.white("\u{1F4DD} Configuration:")),r?(console.log(t.gray(` - Python version: ${h}`)),console.log(t.gray(` - Install method: ${u}`)),console.log(t.gray(` - Git init: ${a.skipGit?"No":"Yes"}`))):(console.log(t.gray(" - Python-free profile (no Python needed)")),console.log(t.gray(` - Git init: ${a.skipGit?"No":"Yes"}`))),console.log(t.white(`
878
+ \u{1F4CB} Files to create:`)),console.log(t.gray(" - .rapidkit-workspace (workspace marker)")),console.log(t.gray(" - .rapidkit/ (workspace config directory)")),console.log(t.gray(" - README.md")),console.log(t.gray(" - .gitignore")),r&&console.log(t.gray(` - ${u==="poetry"?"pyproject.toml + poetry.lock":".venv/ (virtual environment)"}`)),console.log(t.white(`
879
+ \u2699\uFE0F Environment setup:`)),r&&console.log(u==="poetry"?t.gray(" - Poetry virtual environment created (recommended, includes dependency management)"):u==="venv"?t.gray(" - Python venv created in .venv/ (standard, zero extra tools)"):t.gray(" - Global pipx install (isolated, not local to workspace)")),console.log(t.white(`
880
880
  \u{1F680} Next steps:`)),console.log(t.gray(" 1. cd "+o)),console.log(t.gray(" 2. npx rapidkit create project")),console.log(t.gray(" 3. npx rapidkit init")),console.log(t.gray(" 4. npx rapidkit dev")),console.log(t.white(`
881
881
  \u{1F4A1} Learn more:`)),console.log(t.gray(" \u2022 Change profile later: rapidkit bootstrap --profile <profile>")),console.log(t.gray(" \u2022 Profile options: minimal|java-only|python-only|node-only|go-only|dotnet-only|polyglot|enterprise")),console.log(t.gray(" \u2022 Help: npx rapidkit --help"));}console.log(t.white(`
882
882
  \u2728 To proceed: remove --dry-run flag
883
- `));}export{se as a,It as b,le as c,ce as d};
883
+ `));}export{ht as a,de as b,bt as c,Kt as d,It as e,pe as f,ue as g};