nachui 1.0.1 → 1.0.3

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.es.md ADDED
@@ -0,0 +1,52 @@
1
+ # NachUI CLI
2
+
3
+ [English](./README.md) | [Español]
4
+
5
+ La Interfaz de Línea de Comandos oficial para el ecosistema NachUI. Diseñada para ayudarte a integrar, administrar y actualizar primitivas de React de alta fidelidad directamente en el código de tu proyecto sin complicaciones.
6
+
7
+ ## Stack Tecnológico
8
+
9
+ - **Framework de CLI**: [Commander](https://github.com/tj/commander.js)
10
+ - **Prompts Interactivos**: [@clack/prompts](https://github.com/natemoo-re/clack)
11
+ - **Estilos de Consola**: [Kleur](https://github.com/lukeed/kleur)
12
+ - **Validación de Datos**: [Zod](https://zod.dev/)
13
+
14
+ ## Características Clave
15
+
16
+ ### 1. Integración Radicalmente Simple
17
+
18
+ Inicializa NachUI en tu entorno de trabajo, configura tu proyecto y agrega componentes de React diseñados a la perfección directamente en tu código fuente. Tú eres el dueño del código.
19
+
20
+ ### 2. Flujo de Trabajo Optimizado
21
+
22
+ Administra el ciclo de vida completo de tus componentes desde la terminal: lista las primitivas disponibles, agrega nuevas, actualiza las existentes de manera sencilla, o elimina las que ya no necesitas.
23
+
24
+ ### 3. Prioridad a la Experiencia del Desarrollador
25
+
26
+ Construido con prompts interactivos elegantes, validación de errores útil y comandos intuitivos que respetan tu tiempo.
27
+
28
+ ## Uso
29
+
30
+ Puedes ejecutar el CLI directamente a través de `npx` (o tu gestor de paquetes preferido) sin necesidad de instalarlo globalmente.
31
+
32
+ ```bash
33
+ # Inicializar NachUI en tu proyecto
34
+ npx nachui init
35
+
36
+ # Agregar un componente específico
37
+ npx nachui add button
38
+
39
+ # Listar todos los componentes disponibles
40
+ npx nachui list
41
+
42
+ # Actualizar un componente instalado
43
+ npx nachui update button
44
+
45
+ # Eliminar un componente instalado
46
+ npx nachui remove button
47
+ ```
48
+
49
+ ## Arquitectura
50
+
51
+ - `src/commands`: Contiene todas las acciones del CLI (`init`, `add`, `list`, `update`, `remove`).
52
+ - `src/index.ts`: El punto de entrada principal que procesa y ejecuta los comandos mediante `commander`.
package/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # NachUI CLI
2
+
3
+ [English] | [Español](./README.es.md)
4
+
5
+ The official Command Line Interface for the NachUI ecosystem. Designed to help you seamlessly integrate, manage, and update high-fidelity React primitives directly into your codebase.
6
+
7
+ ## Tech Stack
8
+
9
+ - **CLI Framework**: [Commander](https://github.com/tj/commander.js)
10
+ - **Interactive Prompts**: [@clack/prompts](https://github.com/natemoo-re/clack)
11
+ - **Console Styling**: [Kleur](https://github.com/lukeed/kleur)
12
+ - **Data Validation**: [Zod](https://zod.dev/)
13
+
14
+ ## Key Features
15
+
16
+ ### 1. Radically Simple Integration
17
+
18
+ Initialize NachUI in your workspace, configure your environment, and add beautifully crafted React components directly to your source files. You own the code.
19
+
20
+ ### 2. Streamlined Workflow
21
+
22
+ Manage your complete component lifecycle from the terminal: list available primitives, add new ones, seamlessly update existing ones, or remove those you no longer need.
23
+
24
+ ### 3. Developer Experience First
25
+
26
+ Built with gorgeous interactive prompts, helpful validation, and intuitive commands that respect your time.
27
+
28
+ ## Usage
29
+
30
+ You can run the CLI directly via `npx` (or your package manager of choice) without installing it globally.
31
+
32
+ ```bash
33
+ # Initialize NachUI in your project
34
+ npx nachui init
35
+
36
+ # Add a specific component
37
+ npx nachui add button
38
+
39
+ # List all available components
40
+ npx nachui list
41
+
42
+ # Update an installed component
43
+ npx nachui update button
44
+
45
+ # Remove an installed component
46
+ npx nachui remove button
47
+ ```
48
+
49
+ ## Architecture
50
+
51
+ - `src/commands`: Contains all CLI action logic (`init`, `add`, `list`, `update`, `remove`).
52
+ - `src/index.ts`: The main entry point parsing terminal instructions via `commander`.
package/dist/index.js CHANGED
@@ -1,11 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import*as F from"@clack/prompts";import{Command as X}from"commander";import R from"kleur";import*as r from"@clack/prompts";import f from"kleur";import{execSync as Q}from"child_process";import I from"fs";import D from"path";var A="https://api.nach-ui.vercel.app/api/v1",h={async getComponents(){let e=await fetch(`${A}/registry`);if(!e.ok)throw new Error("Error connecting to the API.");return e.json()},async getComponent(e){let n=await fetch(`${A}/registry/${e}`);if(!n.ok)throw n.status===404?new Error(`Component "${e}" does not exist in the registry.`):new Error("Error connecting to the API.");return n.json()},async getTheme(e="default"){let n=await fetch(`${A}/themes/${e}`);if(!n.ok)throw new Error("Failed to fetch styles");return n.json()},async getThemes(){let e=await fetch(`${A}/themes`);if(!e.ok)throw new Error("Error connecting to the API.");return e.json()}};import M from"fs";import O from"path";function z(){let e=process.cwd();return M.existsSync(O.join(e,"pnpm-lock.yaml"))?"pnpm":M.existsSync(O.join(e,"yarn.lock"))?"yarn":M.existsSync(O.join(e,"bun.lockb"))?"bun":"npm"}function B(e,n){let t=n.join(" ");switch(e){case"pnpm":return`pnpm add ${t}`;case"yarn":return`yarn add ${t}`;case"bun":return`bun add ${t}`;default:return`npm install ${t}`}}async function V(e){let n=r.spinner(),t=D.join(process.cwd(),"nachui.json");if(!I.existsSync(t)){r.log.error(f.red("Error: nachui.json not found. Please run 'nachui init' first."));return}let U=JSON.parse(I.readFileSync(t,"utf-8"));n.start(`Searching for ${f.cyan(e)} in the registry...`);try{let a=await h.getComponent(e);n.stop(`Component ${f.green(e)} found.`);let l=U.aliases.components.replace("@/","src/"),o=D.join(process.cwd(),l),m=D.join(o,`${e}.tsx`);if(I.existsSync(o)||I.mkdirSync(o,{recursive:!0}),I.writeFileSync(m,a.code),r.note(f.gray(`Location: ${m}`),"Component installed"),a.dependencies&&a.dependencies.length>0){let d=D.join(process.cwd(),"package.json");if(I.existsSync(d)){let N=JSON.parse(I.readFileSync(d,"utf-8")),k={...N.dependencies,...N.devDependencies},T=a.dependencies.filter(x=>!k[x]);if(T.length>0){r.log.warn(`Missing dependencies: ${f.yellow(T.join(", "))}`);let x=await r.confirm({message:"Do you want to install missing dependencies?",initialValue:!0});if(x&&!r.isCancel(x)){let b=r.spinner();b.start("Installing dependencies...");try{let y=z(),K=B(y,T);Q(K,{stdio:"inherit"}),b.stop(f.green("Dependencies installed successfully."))}catch{b.stop(f.red("Failed to install dependencies.")),r.log.error("Please run the command manually.")}}}else r.log.info(f.green("\u2713 All dependencies are already present."))}}r.outro(f.bgGreen().black(" NachUI ")+" Component ready to use!")}catch{n.stop(f.red("Error getting the component.")),r.log.error("Make sure the slug is correct or the API is online.")}}import*as s from"@clack/prompts";import w from"kleur";import c from"fs";import u from"path";async function G(){s.intro(w.bgCyan().black(" NachUI - Initialization "));let e=s.spinner();try{e.start("Fetching available themes...");let n=await h.getThemes();e.stop(w.green("Themes loaded."));let t=await s.select({message:"Select a theme for your project:",options:n.map(y=>({value:y,label:y.charAt(0).toUpperCase()+y.slice(1)})),initialValue:"default"});if(s.isCancel(t)){s.cancel("Operation cancelled.");return}e.start(`Downloading ${w.cyan(t)} assets...`);let{css:U,config:a,utils:l}=await h.getTheme(t);e.stop(w.green(`Assets for ${t} ready.`));let o=process.cwd(),m=c.existsSync(u.join(o,"next.config.mjs"))||c.existsSync(u.join(o,"next.config.js")),d=m?"src/app/globals.css":"src/index.css";if(!c.existsSync(u.join(o,d))){let y=m?"app/globals.css":"index.css";c.existsSync(u.join(o,y))&&(d=y)}let N={...a,tailwind:{...a.tailwind,css:d}};c.writeFileSync(u.join(o,"nachui.json"),JSON.stringify(N,null,2));let k=u.join(o,d),T=U.replace(/@source\s+['"][^'"]+['"];\n/g,"");c.existsSync(k)?c.readFileSync(k,"utf8").includes("/* NachUI Tokens */")?s.log.warn("NachUI tokens already exist in your CSS. Skipping injection."):c.appendFileSync(k,`
2
+ import*as D from"@clack/prompts";import{Command as ae}from"commander";import L from"kleur";import*as i from"@clack/prompts";import C from"kleur";import{execSync as re}from"child_process";import I from"fs";import z from"path";var J="https://api-nach-ui.vercel.app/api/v1",$={async getComponents(){let e=await fetch(`${J}/registry`);if(!e.ok)throw new Error("Error connecting to the API.");return e.json()},async getComponent(e){let n=await fetch(`${J}/registry/${e}`);if(!n.ok)throw n.status===404?new Error(`Component "${e}" does not exist in the registry.`):new Error("Error connecting to the API.");return n.json()},async getTheme(e="default"){let n=await fetch(`${J}/themes/${e}`);if(!n.ok)throw new Error("Failed to fetch styles");return n.json()},async getThemes(){let e=await fetch(`${J}/themes`);if(!e.ok)throw new Error("Error connecting to the API.");return e.json()}};import W from"fs";import _ from"path";function B(){let e=process.cwd();return W.existsSync(_.join(e,"pnpm-lock.yaml"))?"pnpm":W.existsSync(_.join(e,"yarn.lock"))?"yarn":W.existsSync(_.join(e,"bun.lockb"))?"bun":"npm"}function V(e,n){let t=n.join(" ");switch(e){case"pnpm":return`pnpm add ${t}`;case"yarn":return`yarn add ${t}`;case"bun":return`bun add ${t}`;default:return`npm install ${t}`}}async function Q(e){let n=i.spinner(),t=z.join(process.cwd(),"nachui.json");if(!I.existsSync(t)){i.log.error(C.red("Error: nachui.json not found. Please run 'nachui init' first."));return}let y=JSON.parse(I.readFileSync(t,"utf-8"));n.start(`Searching for ${C.cyan(e)} in the registry...`);try{let d=await $.getComponent(e);n.stop(`Component ${C.green(e)} found.`);let p=y.aliases.components.replace("@/","src/"),s=z.join(process.cwd(),p),h=z.join(s,`${e}.tsx`);if(I.existsSync(s)||I.mkdirSync(s,{recursive:!0}),I.writeFileSync(h,d.code),i.note(C.gray(`Location: ${h}`),"Component installed"),d.dependencies&&d.dependencies.length>0){let g=z.join(process.cwd(),"package.json");if(I.existsSync(g)){let U=JSON.parse(I.readFileSync(g,"utf-8")),S={...U.dependencies,...U.devDependencies},j=d.dependencies.filter(w=>!S[w]);if(j.length>0){i.log.warn(`Missing dependencies: ${C.yellow(j.join(", "))}`);let w=await i.confirm({message:"Do you want to install missing dependencies?",initialValue:!0});if(w&&!i.isCancel(w)){let E=i.spinner();E.start("Installing dependencies...");try{let M=B(),R=V(M,j);re(R,{stdio:"inherit"}),E.stop(C.green("Dependencies installed successfully."))}catch{E.stop(C.red("Failed to install dependencies.")),i.log.error("Please run the command manually.")}}}else i.log.info(C.green("\u2713 All dependencies are already present."))}}i.outro(C.bgGreen().black(" NachUI ")+" Component ready to use!")}catch{n.stop(C.red("Error getting the component.")),i.log.error("Make sure the slug is correct or the API is online.")}}import*as o from"@clack/prompts";import c from"kleur";import{execSync as ie}from"child_process";import r from"fs";import l from"path";async function X(){o.intro(c.bgCyan().black(" NachUI - Initialization "));let e=o.spinner(),n=process.cwd();try{e.start("Fetching available themes...");let t=await $.getThemes();e.stop(c.green("Themes loaded."));let y=await o.select({message:"Select a theme for your project:",options:t.map(f=>({value:f,label:f.charAt(0).toUpperCase()+f.slice(1)})),initialValue:"default"});if(o.isCancel(y)){o.cancel("Operation cancelled.");return}e.start(`Downloading ${c.cyan(y)} assets...`);let{css:d,config:p,utils:s}=await $.getTheme(y);e.stop(c.green(`Assets for ${y} ready.`));let h=r.existsSync(l.join(n,"next.config.mjs"))||r.existsSync(l.join(n,"next.config.js")),g="";h?g=["src/app/globals.css","app/globals.css","src/pages/globals.css","pages/globals.css"].find(F=>r.existsSync(l.join(n,F)))||(r.existsSync(l.join(n,"src"))?"src/app/globals.css":"app/globals.css"):g=["src/index.css","index.css","src/main.css","main.css"].find(F=>r.existsSync(l.join(n,F)))||(r.existsSync(l.join(n,"src"))?"src/index.css":"index.css");let U={...p,tailwind:{...p.tailwind,css:g}};r.writeFileSync(l.join(n,"nachui.json"),JSON.stringify(U,null,2));let S=l.join(n,g),j=d.replace(/@source\s+['"][^'"]+['"];\n/g,""),w="/* NachUI Tokens */",E=`
3
3
 
4
- /* NachUI Tokens */
5
- ${T}`):(c.mkdirSync(u.dirname(k),{recursive:!0}),c.writeFileSync(k,`/* NachUI Tokens */
6
- ${T}`));let x=a.aliases.utils.replace("@/","src/")+".ts",b=u.join(o,x);c.existsSync(u.dirname(b))||c.mkdirSync(u.dirname(b),{recursive:!0}),c.writeFileSync(b,l),s.note(`Theme: ${w.cyan(t)}
4
+ ${w}
5
+ ${j}`;if(r.existsSync(S)){let f=r.readFileSync(S,"utf8");if(!f.includes(w))r.appendFileSync(S,E);else{let T=f.split(w)[0]+w+`
6
+ `+j;r.writeFileSync(S,T.trim()),o.log.info(c.blue("Styles updated in your existing CSS file."))}}else r.mkdirSync(l.dirname(S),{recursive:!0}),r.writeFileSync(S,`${w}
7
+ ${j}`);let M=p.aliases.utils.replace("@/","src/")+".ts",R=l.join(n,M);r.existsSync(l.dirname(R))||r.mkdirSync(l.dirname(R),{recursive:!0}),r.writeFileSync(R,s);let te=["clsx","tailwind-merge"],K=l.join(n,"package.json");if(r.existsSync(K)){let f=JSON.parse(r.readFileSync(K,"utf-8")),F={...f.dependencies,...f.devDependencies},T=te.filter(O=>!F[O]);if(T.length>0){o.log.warn(`Missing required utilities: ${c.yellow(T.join(", "))}`);let O=await o.confirm({message:"Install clsx and tailwind-merge?",initialValue:!0});if(O&&!o.isCancel(O)){let q=o.spinner();q.start("Installing core dependencies...");try{let oe=B(),se=V(oe,T);ie(se,{stdio:"ignore"}),q.stop(c.green("Core dependencies installed."))}catch{q.stop(c.red("Failed to install automatically.")),o.log.info(`Please run manually: ${c.cyan(`npm install ${T.join(" ")}`)}`)}}}}o.note(`Theme: ${c.cyan(y)}
7
8
  Config: nachui.json
8
- Styles: ${d}
9
- Utils: ${x}`,"Setup successful"),s.outro(w.bgGreen().black(" NachUI ")+" Ready to go! Try: "+w.cyan("nachui add button"))}catch(n){e.stop(w.red("Init failed.")),console.error(w.red(`
10
- Details:`),n)}}import*as $ from"@clack/prompts";import P from"kleur";async function W(){let e=$.spinner();e.start("Consulting NachUI registry...");try{let n=await h.getComponents();if(e.stop("Registry loaded successfully."),n.length===0){$.log.warn("There are no components in the registry yet.");return}console.log(""),$.log.step(P.cyan("Available components:")),n.forEach(t=>{console.log(` ${P.green("\u2192")} ${P.bold(t.name)} ${P.gray(`(${t.slug})`)}`),t.dependencies.length>0&&console.log(` ${P.dim(`Deps: ${t.dependencies.join(", ")}`)}`)}),console.log(""),$.note(`To install one, run:
11
- ${P.cyan("pnpm dlx nachui add <slug>")}`,"Tip")}catch{e.stop(P.red("Error connecting to the API.")),$.log.error("Make sure the API is running on the correct port.")}}import*as p from"@clack/prompts";import E from"fs";import C from"kleur";import J from"path";var _=async e=>{let n=p.spinner(),t=J.resolve(process.cwd(),"src","components","ui"),U=e.endsWith(".tsx")?e:`${e}.tsx`,a=J.join(t,U),l=J.join(t,e);n.start(`Searching for ${C.cyan(e)}...`);try{let o="",m=!1;if(E.existsSync(a)?o=a:E.existsSync(l)&&E.lstatSync(l).isDirectory()&&(o=l,m=!0),o){n.stop(C.yellow(`Found: ${o}`));let d=await p.confirm({message:`Are you sure you want to delete ${C.red(e)}?`});if(p.isCancel(d)||!d){p.outro(C.gray("Operation cancelled."));return}m?E.rmSync(o,{recursive:!0,force:!0}):E.rmSync(o,{force:!0}),await new Promise(N=>setTimeout(N,100)),p.log.success(`${C.green("\u2713")} ${C.bold(e)} deleted.`),p.outro(C.bgRed().black(" NachUI ")+" Clean up complete.")}else n.stop(C.red("Error: Component not found.")),p.outro("Check the name and try again.")}catch(o){n.stop(C.red("Failed to delete.")),p.log.error(`Detail: ${o instanceof Error?o.message:String(o)}`)}};import*as i from"@clack/prompts";import g from"kleur";import L from"fs";import q from"path";async function H(e){let n=i.spinner(),t=q.join(process.cwd(),"nachui.json");if(!L.existsSync(t)){i.log.error(g.red("Error: nachui.json not found. Please run 'nachui init' first."));return}let a=JSON.parse(L.readFileSync(t,"utf-8")).aliases.components.replace("@/","src/"),l=q.join(process.cwd(),a,`${e}.tsx`);if(!L.existsSync(l)){i.log.error(g.red(`The component "${e}" is not installed in ${a}.`)),i.log.info(`Try using: ${g.cyan(`nachui add ${e}`)}`);return}n.start(`Fetching latest code for ${g.cyan(e)}...`);try{let o=await h.getComponent(e);n.stop(`Latest version of ${g.green(e)} fetched.`);let m=await i.confirm({message:`Update ${g.bold(e)}? This will ${g.red("overwrite")} your local changes.`,initialValue:!1});if(i.isCancel(m)||!m){i.outro(g.yellow("Update cancelled."));return}L.writeFileSync(l,o.code),i.note(g.gray(`Location: ${l}`),"Update successful"),i.outro(g.bgBlue().white(" NachUI ")+" Component updated to the latest registry version.")}catch{n.stop(g.red("Error updating.")),i.log.error("Check your internet connection or if the component slug is correct.")}}var v=new X;v.name("nachui").description("NachUI CLI - Add, update, remove and list components").version("0.0.1");v.command("init").description("Initialize NachUI in your project").action(async()=>{console.log(""),F.intro(R.bgCyan().black(" NachUI CLI ")),await G()});v.command("add").description("Add a component to your project").argument("<component>","component slug").action(async e=>{console.log(""),F.intro(R.bgCyan().black(" NachUI CLI ")),await V(e)});v.command("list").description("List all available components").action(async()=>{console.log(""),F.intro(R.bgCyan().black(" NachUI CLI ")),await W()});v.command("update").description("Update an installed component").argument("<component>","component slug").action(async e=>{console.log(""),F.intro(R.bgCyan().black(" NachUI CLI ")),await H(e)});v.command("remove").description("Remove an installed component").argument("<component>","component slug").action(async e=>{console.log(""),F.intro(R.bgCyan().black(" NachUI CLI ")),await _(e)});v.parse();
9
+ Styles: ${g}
10
+ Utils: ${M}`,"Setup complete"),o.outro(c.bgGreen().black(" NachUI ")+" Ready! Try adding a component: "+c.cyan("nachui add button"))}catch(t){e.stop(c.red("Init failed.")),console.error(c.red(`
11
+ Details:`),t)}}import*as k from"@clack/prompts";import v from"kleur";async function Y(){let e=k.spinner();e.start("Consulting NachUI registry...");try{let n=await $.getComponents();if(e.stop("Registry loaded successfully."),n.length===0){k.log.warn("There are no components in the registry yet.");return}console.log(""),k.log.step(v.cyan("Available components:")),n.forEach(t=>{console.log(` ${v.green("\u2192")} ${v.bold(t.name)} ${v.gray(`(${t.slug})`)}`),t.dependencies.length>0&&console.log(` ${v.dim(`Deps: ${t.dependencies.join(", ")}`)}`)}),console.log(""),k.note(`To install one, run:
12
+ ${v.cyan("pnpm dlx nachui add <slug>")}`,"Tip")}catch{e.stop(v.red("Error connecting to the API.")),k.log.error("Make sure the API is running on the correct port.")}}import*as m from"@clack/prompts";import A from"fs";import x from"kleur";import H from"path";var Z=async e=>{let n=m.spinner(),t=H.resolve(process.cwd(),"src","components","ui"),y=e.endsWith(".tsx")?e:`${e}.tsx`,d=H.join(t,y),p=H.join(t,e);n.start(`Searching for ${x.cyan(e)}...`);try{let s="",h=!1;if(A.existsSync(d)?s=d:A.existsSync(p)&&A.lstatSync(p).isDirectory()&&(s=p,h=!0),s){n.stop(x.yellow(`Found: ${s}`));let g=await m.confirm({message:`Are you sure you want to delete ${x.red(e)}?`});if(m.isCancel(g)||!g){m.outro(x.gray("Operation cancelled."));return}h?A.rmSync(s,{recursive:!0,force:!0}):A.rmSync(s,{force:!0}),await new Promise(U=>setTimeout(U,100)),m.log.success(`${x.green("\u2713")} ${x.bold(e)} deleted.`),m.outro(x.bgRed().black(" NachUI ")+" Clean up complete.")}else n.stop(x.red("Error: Component not found.")),m.outro("Check the name and try again.")}catch(s){n.stop(x.red("Failed to delete.")),m.log.error(`Detail: ${s instanceof Error?s.message:String(s)}`)}};import*as a from"@clack/prompts";import u from"kleur";import G from"fs";import ee from"path";async function ne(e){let n=a.spinner(),t=ee.join(process.cwd(),"nachui.json");if(!G.existsSync(t)){a.log.error(u.red("Error: nachui.json not found. Please run 'nachui init' first."));return}let d=JSON.parse(G.readFileSync(t,"utf-8")).aliases.components.replace("@/","src/"),p=ee.join(process.cwd(),d,`${e}.tsx`);if(!G.existsSync(p)){a.log.error(u.red(`The component "${e}" is not installed in ${d}.`)),a.log.info(`Try using: ${u.cyan(`nachui add ${e}`)}`);return}n.start(`Fetching latest code for ${u.cyan(e)}...`);try{let s=await $.getComponent(e);n.stop(`Latest version of ${u.green(e)} fetched.`);let h=await a.confirm({message:`Update ${u.bold(e)}? This will ${u.red("overwrite")} your local changes.`,initialValue:!1});if(a.isCancel(h)||!h){a.outro(u.yellow("Update cancelled."));return}G.writeFileSync(p,s.code),a.note(u.gray(`Location: ${p}`),"Update successful"),a.outro(u.bgBlue().white(" NachUI ")+" Component updated to the latest registry version.")}catch{n.stop(u.red("Error updating.")),a.log.error("Check your internet connection or if the component slug is correct.")}}var N=new ae;N.name("nachui").description("NachUI CLI - Add, update, remove and list components").version("0.0.1");N.command("init").description("Initialize NachUI in your project").action(async()=>{console.log(""),D.intro(L.bgCyan().black(" NachUI CLI ")),await X()});N.command("add").description("Add a component to your project").argument("<component>","component slug").action(async e=>{console.log(""),D.intro(L.bgCyan().black(" NachUI CLI ")),await Q(e)});N.command("list").description("List all available components").action(async()=>{console.log(""),D.intro(L.bgCyan().black(" NachUI CLI ")),await Y()});N.command("update").description("Update an installed component").argument("<component>","component slug").action(async e=>{console.log(""),D.intro(L.bgCyan().black(" NachUI CLI ")),await ne(e)});N.command("remove").description("Remove an installed component").argument("<component>","component slug").action(async e=>{console.log(""),D.intro(L.bgCyan().black(" NachUI CLI ")),await Z(e)});N.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nachui",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "description": "Official CLI for NachUI",
6
6
  "main": "./dist/index.js",