create-tribo-app 1.0.0 → 1.0.2

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 ADDED
@@ -0,0 +1,32 @@
1
+ # create-tribo-app
2
+
3
+ The official CLI tool to bootstrap **Tribo Ecosystem Mini Apps**.
4
+
5
+ ## Usage
6
+
7
+ You can start a new project by running:
8
+
9
+ ```bash
10
+ npx create-tribo-app
11
+ ```
12
+
13
+ Or specify a directory:
14
+
15
+ ```bash
16
+ npx create-tribo-app my-new-app
17
+ ```
18
+
19
+ ## Features
20
+
21
+ - **Interactive Menu**: Choose between cloning the full Next.js template or installing only the SDK.
22
+ - **Auto-configuration**: Sets up the latest version of `tribo-kit-sdk`.
23
+ - **Ready to Go**: Clones the official [template_ecosystem_app](https://github.com/Ortegaa03/template_ecosystem_app).
24
+
25
+ ## Requirements
26
+
27
+ - Node.js 18+
28
+ - Git
29
+
30
+ ---
31
+
32
+ Built with ❤️ by [Tribo](https://tribovault.co)
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ "use strict";var b=Object.create;var y=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var j=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of w(t))!k.call(e,a)&&a!==n&&y(e,a,{get:()=>t[a],enumerable:!(r=f(t,a))||r.enumerable});return e};var i=(e,t,n)=>(n=e!=null?b(h(e)):{},j(t||!e||!e.__esModule?y(n,"default",{value:e,enumerable:!0}):n,e));var g=require("commander"),d=i(require("inquirer")),o=i(require("chalk")),c=i(require("ora")),s=require("execa"),p=i(require("fs-extra")),m=i(require("path")),u=new g.Command;u.name("create-tribo-app").description("Bootstrap a new Tribo Ecosystem Mini App").version("1.0.0").argument("[directory]","directory to create the app in").action(async e=>{console.log(o.default.bold.blue(`
3
+ \u{1F680} Welcome to Tribo Ecosystem SDK CLI
4
+ `));let t=await d.default.prompt([{type:"input",name:"projectName",message:"What is your project name?",default:e||"my-tribo-app",when:!e},{type:"list",name:"type",message:"How would you like to start?",choices:[{name:"Clone official Template (Next.js + SDK)",value:"template"},{name:"Install SDK only (tribo-kit-sdk)",value:"sdk-only"}]}]),n=e||t.projectName,r=m.default.resolve(process.cwd(),n);if(t.type==="template"){let a=(0,c.default)(`Cloning Tribo template into ${o.default.cyan(n)}...`).start();try{await(0,s.execa)("git",["clone","https://github.com/Ortegaa03/template_ecosystem_app.git",r]),await p.default.remove(m.default.join(r,".git")),a.succeed(o.default.green("Template cloned successfully!")),console.log(`
5
+ Next steps:`),console.log(o.default.cyan(` cd ${n}`)),console.log(o.default.cyan(" npm install")),console.log(o.default.cyan(" npm run dev"))}catch(l){a.fail(o.default.red("Failed to clone template.")),console.error(l.message)}}else{let a=(0,c.default)(`Initializing project with ${o.default.cyan("tribo-kit-sdk")}...`).start();try{await p.default.ensureDir(r),await(0,s.execa)("npm",["init","-y"],{cwd:r}),await(0,s.execa)("npm",["install","tribo-kit-sdk"],{cwd:r}),a.succeed(o.default.green("SDK installed successfully!")),console.log(`
6
+ Next steps:`),console.log(o.default.cyan(` cd ${n}`)),console.log(o.default.cyan(" Start building your Tribo app!"))}catch(l){a.fail(o.default.red("Failed to initialize project.")),console.error(l.message)}}console.log(o.default.bold.blue(`
7
+ Happy hacking! \u{1F499} Tribo
8
+ `))});u.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-tribo-app",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "CLI to bootstrap Tribo Ecosystem Mini Apps",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -33,4 +33,4 @@
33
33
  "@types/fs-extra": "^11.0.0",
34
34
  "@types/inquirer": "^9.0.0"
35
35
  }
36
- }
36
+ }