mishly-cli 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.
Files changed (2) hide show
  1. package/dist/index.js +4 -0
  2. package/package.json +46 -0
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import{Command as p}from"commander";import{execa as i}from"execa";import e from"chalk";import m from"ora";import d from"prompts";process.on("SIGINT",()=>process.exit(0));process.on("SIGTERM",()=>process.exit(0));var n=new p().name("mishly-cli").description("A CLI for adding Mishly UI components to your project").version("0.1.0"),l=process.env.MISHLY_REGISTRY_URL||"https://mishly-ui-docs.vercel.app/registry";n.command("add").description("Add a component to your project").argument("[component]","The component to add").action(async r=>{try{let o=r;if(!o){let t=await d({type:"text",name:"component",message:"Which component would you like to add?",validate:a=>a.length>0?!0:"Component name is required"});t.component||process.exit(0),o=t.component}console.log("");let s=m(`Adding ${e.cyan(o)} to your project...`).start(),c=`${l}/${o}.json`;try{s.stop(),await i("npx",["shadcn@latest","add",c],{stdio:"inherit"}),console.log(`
3
+ Successfully added ${e.cyan(o)} to your project.`)}catch{console.log(`
4
+ Failed to add ${e.cyan(o)}. Please ensure the component exists.`),process.exit(1)}}catch{console.error(e.red("Something went wrong. Please try again.")),process.exit(1)}});n.parse();
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "mishly-cli",
3
+ "version": "0.1.0",
4
+ "description": "A CLI for adding Mishly UI components to your project.",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "keywords": [
12
+ "react",
13
+ "tailwind",
14
+ "ui",
15
+ "components",
16
+ "mishly",
17
+ "cli"
18
+ ],
19
+ "author": "Mishly UI",
20
+ "license": "MIT",
21
+ "bin": {
22
+ "mishly-cli": "dist/index.js"
23
+ },
24
+ "scripts": {
25
+ "build": "tsup",
26
+ "dev": "tsup --watch",
27
+ "clean": "rm -rf dist",
28
+ "typecheck": "tsc --noEmit"
29
+ },
30
+ "dependencies": {
31
+ "chalk": "^5.6.2",
32
+ "commander": "^14.0.3",
33
+ "execa": "^9.6.1",
34
+ "ora": "^9.3.0",
35
+ "prompts": "^2.4.2",
36
+ "zod": "^4.3.6"
37
+ },
38
+ "devDependencies": {
39
+ "@repo/typescript-config": "workspace:*",
40
+ "@types/node": "^25.5.0",
41
+ "@types/prompts": "^2.4.9",
42
+ "tsup": "^8.5.1",
43
+ "typescript": "^6.0.2"
44
+ },
45
+ "type": "module"
46
+ }