@nimbuslab/cli 0.6.3 → 0.8.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/dist/index.js +473 -150
- package/docs/CI-CD.md +181 -0
- package/package.json +1 -1
- package/src/commands/create.ts +513 -140
- package/src/index.ts +20 -20
package/src/index.ts
CHANGED
|
@@ -5,7 +5,7 @@ import pc from "picocolors"
|
|
|
5
5
|
import { create } from "./commands/create"
|
|
6
6
|
|
|
7
7
|
const PACKAGE_NAME = "@nimbuslab/cli"
|
|
8
|
-
const CURRENT_VERSION = "0.
|
|
8
|
+
const CURRENT_VERSION = "0.8.0"
|
|
9
9
|
|
|
10
10
|
const LOGO = `
|
|
11
11
|
███╗ ██╗██╗███╗ ███╗██████╗ ██╗ ██╗███████╗
|
|
@@ -44,8 +44,8 @@ function showUpdateNotice(latestVersion: string) {
|
|
|
44
44
|
const latest = latestVersion
|
|
45
45
|
const command = `bun add -g ${PACKAGE_NAME}`
|
|
46
46
|
|
|
47
|
-
const line1 = `
|
|
48
|
-
const line2 = `
|
|
47
|
+
const line1 = ` New version available: ${current} → ${latest}`
|
|
48
|
+
const line2 = ` Update with: ${command}`
|
|
49
49
|
|
|
50
50
|
const maxLen = Math.max(line1.length, line2.length)
|
|
51
51
|
const border = "─".repeat(maxLen + 2)
|
|
@@ -62,8 +62,8 @@ async function main() {
|
|
|
62
62
|
const command = args[0]
|
|
63
63
|
|
|
64
64
|
console.log(pc.cyan(LOGO))
|
|
65
|
-
console.log(pc.white(" CLI
|
|
66
|
-
console.log(pc.dim("
|
|
65
|
+
console.log(pc.white(" nimbuslab CLI"))
|
|
66
|
+
console.log(pc.dim(" Create awesome projects"))
|
|
67
67
|
console.log()
|
|
68
68
|
|
|
69
69
|
// Check for updates (non-blocking)
|
|
@@ -79,7 +79,7 @@ async function main() {
|
|
|
79
79
|
} else if (command === "version" || command === "--version" || command === "-v") {
|
|
80
80
|
showVersion()
|
|
81
81
|
} else {
|
|
82
|
-
console.log(pc.red(`
|
|
82
|
+
console.log(pc.red(`Unknown command: ${command}`))
|
|
83
83
|
showHelp()
|
|
84
84
|
process.exit(1)
|
|
85
85
|
}
|
|
@@ -87,28 +87,28 @@ async function main() {
|
|
|
87
87
|
|
|
88
88
|
function showHelp() {
|
|
89
89
|
console.log(`
|
|
90
|
-
${pc.bold("
|
|
90
|
+
${pc.bold("Usage:")} nimbus [command] [options]
|
|
91
91
|
|
|
92
|
-
${pc.bold("
|
|
93
|
-
create [
|
|
94
|
-
help
|
|
95
|
-
version
|
|
92
|
+
${pc.bold("Commands:")}
|
|
93
|
+
create [name] Create a new project
|
|
94
|
+
help Show this help
|
|
95
|
+
version Show version
|
|
96
96
|
|
|
97
97
|
${pc.bold("Templates:")}
|
|
98
98
|
--landing Landing page (Next.js 16 + Tailwind 4 + shadcn)
|
|
99
99
|
--app Web app (Landing + Better Auth + Prisma)
|
|
100
100
|
--turborepo Monorepo (Turborepo + apps/packages)
|
|
101
101
|
|
|
102
|
-
${pc.bold("
|
|
103
|
-
-y, --yes
|
|
104
|
-
--no-git
|
|
105
|
-
--no-install
|
|
106
|
-
--template <url>
|
|
102
|
+
${pc.bold("Options:")}
|
|
103
|
+
-y, --yes Accept defaults
|
|
104
|
+
--no-git Don't initialize Git
|
|
105
|
+
--no-install Don't install dependencies
|
|
106
|
+
--template <url> Use custom template
|
|
107
107
|
|
|
108
|
-
${pc.bold("
|
|
109
|
-
${pc.dim("$")} nimbus create
|
|
110
|
-
${pc.dim("$")} nimbus create
|
|
111
|
-
${pc.dim("$")} nimbus create
|
|
108
|
+
${pc.bold("Examples:")}
|
|
109
|
+
${pc.dim("$")} nimbus create my-landing --landing
|
|
110
|
+
${pc.dim("$")} nimbus create my-app --app
|
|
111
|
+
${pc.dim("$")} nimbus create my-monorepo --turborepo
|
|
112
112
|
`)
|
|
113
113
|
}
|
|
114
114
|
|