nebutra 0.0.1 → 0.1.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.
- package/README.md +76 -17
- package/dist/chunk-I7AUKTXE.js +1 -0
- package/dist/chunk-JDX5NXDX.js +2 -0
- package/dist/chunk-LGUMYJ4Q.js +6 -0
- package/dist/delegate-YL6SAZNF.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +758 -0
- package/dist/logger-KLED6BEE.js +1 -0
- package/package.json +28 -27
- package/index.js +0 -29
package/README.md
CHANGED
|
@@ -1,29 +1,88 @@
|
|
|
1
1
|
# nebutra
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Unified CLI for Nebutra project scaffolding, component management, AI integration, and platform operations.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
npm install -g nebutra
|
|
9
|
+
# or run directly
|
|
10
|
+
npx nebutra
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Usage
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
```bash
|
|
16
|
+
# Initialize a new project
|
|
17
|
+
nebutra init
|
|
18
|
+
|
|
19
|
+
# Add components
|
|
20
|
+
nebutra add button card --yes
|
|
21
|
+
|
|
22
|
+
# Scaffold a new app
|
|
23
|
+
nebutra create ./my-app
|
|
24
|
+
|
|
25
|
+
# Start dev server
|
|
26
|
+
nebutra dev --preset=ai-saas
|
|
27
|
+
|
|
28
|
+
# Database migrations
|
|
29
|
+
nebutra db migrate
|
|
30
|
+
|
|
31
|
+
# Generate a new app or module
|
|
32
|
+
nebutra generate app blog
|
|
33
|
+
|
|
34
|
+
# Brand customization
|
|
35
|
+
nebutra brand palette --primary=#7C3AED
|
|
36
|
+
|
|
37
|
+
# Project health check
|
|
38
|
+
nebutra doctor
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Commands
|
|
42
|
+
|
|
43
|
+
| Command | Description |
|
|
44
|
+
|---------|-------------|
|
|
45
|
+
| `init` | Initialize project with `nebutra.config.json` |
|
|
46
|
+
| `add [components...]` | Add components (supports `--21st`, `--v0` sources) |
|
|
47
|
+
| `create` | Scaffold a new Nebutra project |
|
|
48
|
+
| `dev` | Start development server |
|
|
49
|
+
| `generate` | Scaffold apps, modules, and code |
|
|
50
|
+
| `db` | Database migration and management |
|
|
51
|
+
| `brand` | Color palette and brand customization |
|
|
52
|
+
| `i18n` | Internationalization management |
|
|
53
|
+
| `infra` | Infrastructure management (Docker, services) |
|
|
54
|
+
| `env` | Environment variable management |
|
|
55
|
+
| `license` | License activation and management |
|
|
56
|
+
| `ai` | AI provider configuration |
|
|
57
|
+
| `auth` | Authentication setup |
|
|
58
|
+
| `billing` | Billing and subscription management |
|
|
59
|
+
| `preset` | List and apply SaaS presets |
|
|
60
|
+
| `test` | Run unit/E2E tests |
|
|
61
|
+
| `stats` | Monorepo overview and metrics |
|
|
62
|
+
| `schema` | Output full CLI schema (for agents) |
|
|
63
|
+
| `doctor` | Check project health |
|
|
64
|
+
| `admin` | Platform administration (tenants, health) |
|
|
65
|
+
| `community` | Community health and showcase |
|
|
66
|
+
| `ecosystem` | Template marketplace and OPC network |
|
|
67
|
+
| `services` | Microservice management |
|
|
68
|
+
| `search` | Search index management |
|
|
69
|
+
| `secrets` | Encrypted secrets management |
|
|
19
70
|
|
|
20
|
-
##
|
|
71
|
+
## Global Options
|
|
21
72
|
|
|
22
|
-
|
|
|
23
|
-
|
|
24
|
-
|
|
|
25
|
-
|
|
|
73
|
+
| Flag | Description |
|
|
74
|
+
|------|-------------|
|
|
75
|
+
| `--verbose` | Enable verbose output |
|
|
76
|
+
| `--quiet` | Suppress non-essential output |
|
|
77
|
+
| `--format <type>` | Output format: `json`, `table`, `plain` |
|
|
78
|
+
| `--yes` | Skip interactive prompts (CI/agent mode) |
|
|
79
|
+
| `--no-color` | Disable colored output |
|
|
26
80
|
|
|
27
|
-
##
|
|
81
|
+
## Environment Variables
|
|
28
82
|
|
|
29
|
-
|
|
83
|
+
| Variable | Description |
|
|
84
|
+
|----------|-------------|
|
|
85
|
+
| `NEBUTRA_LOG_LEVEL` | Log level (`debug`, `info`, `warn`, `error`) |
|
|
86
|
+
| `NEBUTRA_OUTPUT_FORMAT` | Default output format |
|
|
87
|
+
| `NO_COLOR` | Disable colored output |
|
|
88
|
+
| `CI` | Auto-enable non-interactive mode |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var d=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});export{d as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{spinner as f}from"@clack/prompts";import o from"picocolors";var s={debug:0,info:1,warn:2,error:3,success:1};function c(t){if(t.quiet)return"error";if(t.verbose)return"debug";let e=process.env.NEBUTRA_LOG_LEVEL;return e&&s[e]!==void 0?e:t.level??"info"}function a(t){return process.env.NEBUTRA_LOG_FORMAT==="json"?"json":t.format??"plain"}function L(t,e,r){let i=new Date().toISOString().split("T")[1].split(".")[0],n=r?`[${r}]`:"";switch(t){case"error":return`${o.red(`\u2716 ${n}`)} ${e}`.trim();case"warn":return`${o.yellow(`\u26A0 ${n}`)} ${e}`.trim();case"success":return`${o.green(`\u2713 ${n}`)} ${e}`.trim();case"debug":return`${o.dim(`[debug ${i}] ${n}`)} ${e}`.trim();default:return`${o.blue(`\u2139 ${n}`)} ${e}`.trim()}}function u(t,e,r,i){let n={timestamp:new Date().toISOString(),level:t,scope:r,message:e,...i&&{details:i}};return JSON.stringify(n)}function p(){let t=f();return{start(e){t.start(o.cyan(e))},stop(e,r){e?r===0?t.stop(o.green(`\u2713 ${e}`)):t.stop(o.red(`\u2716 ${e}`)):t.stop("")},message(e){t.message(o.cyan(e))}}}var g=class t{config;effectiveLevel;format;constructor(e={}){this.config=e,this.effectiveLevel=c(e),this.format=a(e)}shouldLog(e){return s[e]>=s[this.effectiveLevel]}log(e,r,i){if(!this.shouldLog(e))return;let n=this.format==="json"?u(e,r,this.config.scope,i):L(e,r,this.config.scope);(e==="error"||e==="warn"?process.stderr:process.stdout).write(n+`
|
|
2
|
+
`)}debug(e,r){this.log("debug",e,r)}info(e,r){this.log("info",e,r)}warn(e,r){this.log("warn",e,r)}error(e,r){this.log("error",e,r)}success(e,r){this.log("success",e,r)}step(e,r,i){let n=o.cyan(`[${e}/${r}]`);this.log("info",`${n} ${i}`)}spinner(){return p()}scope(e){return new t({...this.config,scope:e})}setConfig(e){this.config={...this.config,...e},this.effectiveLevel=c(this.config),this.format=a(this.config)}getLevel(){return this.effectiveLevel}};function l(t){return new g(t)}var h=l({level:process.env.NEBUTRA_LOG_LEVEL??"info",verbose:process.argv.includes("--verbose"),quiet:process.argv.includes("--quiet")});export{l as a,h as b};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{spawn as R}from"child_process";import{readdirSync as h,readFileSync as b}from"fs";import{dirname as y,resolve as v}from"path";import{fileURLToPath as x}from"url";import u from"picocolors";function w(){let t=x(import.meta.url),e=y(t),r=e,a="/";for(;r!==a;){try{let i=h(r);if(i.includes("pnpm-workspace.yaml"))return r;if(i.includes("package.json")){let s=v(r,"package.json");if(JSON.parse(b(s,"utf-8")).workspaces)return r}}catch{}r=y(r)}return e.split("/packages/")[0]||e}async function d(t){let{command:e,args:r,cwd:a=w(),env:c={},interactive:i=!1,label:s=e,dryRun:f=!1}=t;if(f){let o={mode:"dry-run",timestamp:new Date().toISOString(),command:e,args:r,cwd:a,env:Object.keys(c).length>0?c:void 0};return process.stdout.write(JSON.stringify(o,null,2)+`
|
|
2
|
+
`),{exitCode:0,stdout:JSON.stringify(o),stderr:""}}return i&&!process.env.NEBUTRA_QUIET&&process.stderr.write(u.cyan(`\u2192 ${s}: ${e} ${r.join(" ")}
|
|
3
|
+
`)),new Promise(o=>{let l=R(e,r,{cwd:a,env:{...process.env,...c},stdio:i?"inherit":["pipe","pipe","pipe"]}),p="",m="";i||(l.stdout?.on("data",n=>{p+=n.toString()}),l.stderr?.on("data",n=>{m+=n.toString()})),l.on("close",n=>{let g=n??1;!i&&!process.env.NEBUTRA_QUIET&&(g===0?process.stderr.write(u.green(`\u2713 ${s} completed
|
|
4
|
+
`)):process.stderr.write(u.red(`\u2716 ${s} failed with exit code ${g}
|
|
5
|
+
`))),o({exitCode:g,stdout:p,stderr:m})}),l.on("error",n=>{process.stderr.write(u.red(`\u2716 Failed to execute ${e}: ${n.message}
|
|
6
|
+
`)),o({exitCode:1,stdout:p,stderr:n.message})})})}async function P(t,e){let r=["run"];return e?.filter&&r.push("--filter",e.filter),r.push(t),e?.args&&r.push("--",...e.args),d({command:"pnpm",args:r,dryRun:e?.dryRun,interactive:e?.interactive??!0,label:`pnpm run ${t}`})}async function N(t,e){let r=["run",t];return e?.filter&&r.push("--filter",e.filter),d({command:"turbo",args:r,dryRun:e?.dryRun,interactive:!0,label:`turbo run ${t}`})}async function C(t,e){let r=["compose"];return e?.profile&&r.push("--profile",e.profile),e?.file&&r.push("-f",e.file),r.push(...t.split(" ")),d({command:"docker",args:r,dryRun:e?.dryRun,interactive:!0,label:`docker compose ${t}`})}async function T(t,e){let r=["prisma",t];return e?.args&&r.push(...e.args),d({command:"npx",args:r,dryRun:e?.dryRun,interactive:e?.interactive??!0,label:`prisma ${t}`})}export{w as a,d as b,P as c,N as d,C as e,T as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f}from"./chunk-LGUMYJ4Q.js";import"./chunk-I7AUKTXE.js";export{b as delegate,e as dockerCompose,a as findMonorepoRoot,c as pnpmRun,f as prismaRun,d as turboRun};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|