bunkit-cli 0.2.0 → 0.3.1
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 +234 -0
- package/dist/index.js +47 -19
- package/package.json +30 -2
package/README.md
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# bunkit-cli
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
____ _ _ _
|
|
7
|
+
| _ \ | | (_) |
|
|
8
|
+
| |_) |_ _ _ __ | | ___| |_
|
|
9
|
+
| _ <| | | | '_ \| |/ / | __|
|
|
10
|
+
| |_) | |_| | | | | <| | |_
|
|
11
|
+
|____/ \__,_|_| |_|_|\_\_|\__|
|
|
12
|
+
|
|
13
|
+
🍞 Bake production-ready apps in seconds
|
|
14
|
+
|
|
15
|
+
Modern • Fast • Opinionated
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
[](https://www.npmjs.com/package/bunkit-cli)
|
|
19
|
+
[](https://opensource.org/licenses/MIT)
|
|
20
|
+
[](https://bun.sh)
|
|
21
|
+
|
|
22
|
+
**Beautiful CLI for creating production-ready Bun projects**
|
|
23
|
+
|
|
24
|
+
[Features](#features) • [Installation](#installation) • [Commands](#commands) • [Examples](#examples) • [Repository](https://github.com/Arakiss/bunkit)
|
|
25
|
+
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Features
|
|
31
|
+
|
|
32
|
+
- **Lightning Fast** - Powered by Bun runtime for instant scaffolding
|
|
33
|
+
- **Interactive CLI** - Beautiful prompts powered by @clack/prompts (same as Astro)
|
|
34
|
+
- **Multiple Presets** - Choose from minimal, web, api, or full-stack templates
|
|
35
|
+
- **Modular Features** - Add auth, database, payments, and more on demand
|
|
36
|
+
- **Modern Stack** - Next.js 16, React 19, Hono, Drizzle ORM, TypeScript 5
|
|
37
|
+
- **Monorepo Ready** - Bun workspaces with dependency catalogs
|
|
38
|
+
- **Zero Config** - Smart defaults, fully customizable
|
|
39
|
+
|
|
40
|
+
## Installation
|
|
41
|
+
|
|
42
|
+
### Global Installation (Recommended)
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
bun install -g bunkit-cli
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Or use with bunx (No installation)
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
bunx bunkit-cli@latest init
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Commands
|
|
55
|
+
|
|
56
|
+
### `bunkit init`
|
|
57
|
+
|
|
58
|
+
Create a new project interactively with beautiful prompts.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
bunkit init
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
You'll be guided through:
|
|
65
|
+
- Project name selection
|
|
66
|
+
- Preset choice (minimal, web, api, full)
|
|
67
|
+
- Feature selection (auth, database, payments, etc.)
|
|
68
|
+
- Package manager preference
|
|
69
|
+
- Git initialization
|
|
70
|
+
|
|
71
|
+
### `bunkit create`
|
|
72
|
+
|
|
73
|
+
Quickly create a project without prompts.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
bunkit create <preset> <name> [options]
|
|
77
|
+
|
|
78
|
+
# Options:
|
|
79
|
+
--no-git Skip git initialization
|
|
80
|
+
--no-install Skip dependency installation
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Available Presets:**
|
|
84
|
+
|
|
85
|
+
- `minimal` - Bare Bun project with TypeScript
|
|
86
|
+
- `web` - Next.js 16 + React 19 frontend
|
|
87
|
+
- `api` - Hono backend with TypeScript
|
|
88
|
+
- `full` - Full-stack monorepo (web + api + shared packages)
|
|
89
|
+
|
|
90
|
+
### `bunkit add`
|
|
91
|
+
|
|
92
|
+
Add features to an existing project.
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
bunkit add <feature> [options]
|
|
96
|
+
|
|
97
|
+
# Options:
|
|
98
|
+
--provider <provider> Specify provider (e.g., supabase, stripe)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Available Features:**
|
|
102
|
+
|
|
103
|
+
- `auth` - Authentication (Supabase Auth, NextAuth, etc.)
|
|
104
|
+
- `database` - Database with Drizzle ORM (PostgreSQL, MySQL, SQLite)
|
|
105
|
+
- `ui` - UI components with shadcn/ui + Tailwind CSS 4
|
|
106
|
+
- `payments` - Payment integration (Stripe, Paddle)
|
|
107
|
+
- `email` - Email service (Resend, Nodemailer)
|
|
108
|
+
- `storage` - File storage (Supabase Storage, S3)
|
|
109
|
+
|
|
110
|
+
## Examples
|
|
111
|
+
|
|
112
|
+
### Create a Full-Stack Project
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
bunkit create full my-saas-app
|
|
116
|
+
cd my-saas-app
|
|
117
|
+
bun install
|
|
118
|
+
bun dev
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Create Next.js Frontend Only
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
bunkit create web my-landing-page
|
|
125
|
+
cd my-landing-page
|
|
126
|
+
bun dev
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Create Hono API Only
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
bunkit create api my-backend
|
|
133
|
+
cd my-backend
|
|
134
|
+
bun --hot src/index.ts
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Add Authentication to Existing Project
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
cd my-project
|
|
141
|
+
bunkit add auth --provider supabase
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Add UI Components
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
bunkit add ui
|
|
148
|
+
# Installs shadcn/ui with Tailwind CSS 4 and iconoir-react icons
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## What You Get
|
|
152
|
+
|
|
153
|
+
### Full-Stack Monorepo Structure
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
my-app/
|
|
157
|
+
├── apps/
|
|
158
|
+
│ ├── web/ # Next.js 16 customer-facing app
|
|
159
|
+
│ ├── platform/ # Next.js 16 dashboard/admin
|
|
160
|
+
│ └── api/ # Hono backend with Bun.serve
|
|
161
|
+
├── packages/
|
|
162
|
+
│ ├── ui/ # Shared UI components (shadcn/ui)
|
|
163
|
+
│ ├── db/ # Database schema (Drizzle ORM)
|
|
164
|
+
│ ├── utils/ # Shared utilities
|
|
165
|
+
│ └── types/ # Shared TypeScript types
|
|
166
|
+
├── package.json # Root with dependency catalogs
|
|
167
|
+
├── bunfig.toml # Bun configuration
|
|
168
|
+
└── biome.json # Code quality (linting + formatting)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Tech Stack
|
|
172
|
+
|
|
173
|
+
- **Runtime:** Bun 1.3+ (fast, native TypeScript)
|
|
174
|
+
- **Monorepo:** Bun workspaces with dependency catalogs
|
|
175
|
+
- **Frontend:** Next.js 16 + React 19 (Server Components)
|
|
176
|
+
- **Backend:** Hono (ultra-fast web framework)
|
|
177
|
+
- **Database:** Drizzle ORM with native Bun drivers
|
|
178
|
+
- **Language:** TypeScript 5 (strict mode)
|
|
179
|
+
- **Styling:** Tailwind CSS 4 (CSS-first configuration)
|
|
180
|
+
- **UI Components:** shadcn/ui with iconoir-react icons
|
|
181
|
+
- **Code Quality:** Biome (NO ESLint, NO Prettier)
|
|
182
|
+
|
|
183
|
+
## Why bunkit?
|
|
184
|
+
|
|
185
|
+
### For Indie Hackers
|
|
186
|
+
|
|
187
|
+
Ship your MVP in hours, not weeks. bunkit handles all the boring setup so you can focus on building your product.
|
|
188
|
+
|
|
189
|
+
### For Teams
|
|
190
|
+
|
|
191
|
+
Production-ready architecture from day one. Monorepo structure scales from prototype to enterprise.
|
|
192
|
+
|
|
193
|
+
### For Developers
|
|
194
|
+
|
|
195
|
+
Modern stack with zero legacy baggage. Bun runtime means fast installs, fast tests, fast everything.
|
|
196
|
+
|
|
197
|
+
## Requirements
|
|
198
|
+
|
|
199
|
+
- **Bun 1.3+** - [Install Bun](https://bun.sh)
|
|
200
|
+
- **Node.js 20.9+** (required for Next.js 16) - [Download](https://nodejs.org/)
|
|
201
|
+
- **Git** - For version control
|
|
202
|
+
|
|
203
|
+
## Philosophy
|
|
204
|
+
|
|
205
|
+
- **Quality First** - Enterprise-grade code from day one
|
|
206
|
+
- **Type Safety** - Strict TypeScript everywhere
|
|
207
|
+
- **Performance** - Native Bun APIs, minimal dependencies
|
|
208
|
+
- **Developer Experience** - Fast iteration with HMR
|
|
209
|
+
- **Modern Stack** - Latest stable versions only
|
|
210
|
+
|
|
211
|
+
## Community & Support
|
|
212
|
+
|
|
213
|
+
- **GitHub Repository:** [Arakiss/bunkit](https://github.com/Arakiss/bunkit)
|
|
214
|
+
- **Issues:** [Report bugs or request features](https://github.com/Arakiss/bunkit/issues)
|
|
215
|
+
- **License:** MIT
|
|
216
|
+
|
|
217
|
+
## Credits
|
|
218
|
+
|
|
219
|
+
Built with love for the indie hacker community.
|
|
220
|
+
|
|
221
|
+
Made possible by:
|
|
222
|
+
- [Bun](https://bun.sh) - Incredibly fast JavaScript runtime
|
|
223
|
+
- [@clack/prompts](https://github.com/natemoo-re/clack) - Beautiful CLI prompts
|
|
224
|
+
- [Next.js](https://nextjs.org) - React framework
|
|
225
|
+
- [Hono](https://hono.dev) - Ultra-fast web framework
|
|
226
|
+
- [Drizzle ORM](https://orm.drizzle.team) - TypeScript ORM
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
<div align="center">
|
|
231
|
+
|
|
232
|
+
**Don't Panic - your app is being baked** 🍞
|
|
233
|
+
|
|
234
|
+
</div>
|
package/dist/index.js
CHANGED
|
@@ -11467,19 +11467,38 @@ var import_picocolors6 = __toESM(require_picocolors(), 1);
|
|
|
11467
11467
|
|
|
11468
11468
|
// ../core/src/banner.ts
|
|
11469
11469
|
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
11470
|
-
var
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
|
|
11479
|
-
|
|
11470
|
+
var quotes = [
|
|
11471
|
+
"Don't Panic - your app is being baked",
|
|
11472
|
+
"From scratch to production in seconds",
|
|
11473
|
+
"Freshly baked, ready to serve",
|
|
11474
|
+
"The best code is the code you don't write",
|
|
11475
|
+
"Keep calm and bake on",
|
|
11476
|
+
"Made with \u2665 for indie hackers",
|
|
11477
|
+
"Ship fast, iterate faster",
|
|
11478
|
+
"Less boilerplate, more building",
|
|
11479
|
+
"Your next big idea starts here",
|
|
11480
|
+
"Baking dreams into reality"
|
|
11481
|
+
];
|
|
11482
|
+
var getRandomQuote = () => {
|
|
11483
|
+
return quotes[Math.floor(Math.random() * quotes.length)];
|
|
11484
|
+
};
|
|
11485
|
+
var createBanner = (version = "0.3.0") => {
|
|
11486
|
+
const quote = getRandomQuote();
|
|
11487
|
+
return `
|
|
11488
|
+
${import_picocolors3.default.dim("\u2554" + "\u2550".repeat(50) + "\u2557")}
|
|
11489
|
+
${import_picocolors3.default.dim("\u2551")} ${import_picocolors3.default.dim("\u2551")}
|
|
11490
|
+
${import_picocolors3.default.dim("\u2551")} ${import_picocolors3.default.yellow("\u250F\u2513 \u2533 \u2533\u250F\u2513\u2513\u250Fo\u254B")} ${import_picocolors3.default.dim("\u2551")}
|
|
11491
|
+
${import_picocolors3.default.dim("\u2551")} ${import_picocolors3.default.yellow("\u2523\u252B \u2503 \u2503\u2503\u2503\u2523\u252B\u2503 \u2503")} ${import_picocolors3.default.dim("Modern. Fast. Opinionated.")} ${import_picocolors3.default.dim("\u2551")}
|
|
11492
|
+
${import_picocolors3.default.dim("\u2551")} ${import_picocolors3.default.yellow("\u2517\u251B\u2022\u2517\u2501\u251B\u251B\u2517\u251B\u2517\u253B \u253B")} ${import_picocolors3.default.dim("\u2551")}
|
|
11493
|
+
${import_picocolors3.default.dim("\u2551")} ${import_picocolors3.default.dim("\u2551")}
|
|
11494
|
+
${import_picocolors3.default.dim("\u2551")} ${import_picocolors3.default.cyan(quote.padEnd(46))} ${import_picocolors3.default.dim("\u2551")}
|
|
11495
|
+
${import_picocolors3.default.dim("\u2551")} ${import_picocolors3.default.dim("\u2551")}
|
|
11496
|
+
${import_picocolors3.default.dim("\u2551")} ${import_picocolors3.default.dim(`v${version}`)}${" ".repeat(43 - version.length)}\uD83C\uDF5E ${import_picocolors3.default.dim("\u2551")}
|
|
11497
|
+
${import_picocolors3.default.dim("\u255A" + "\u2550".repeat(50) + "\u255D")}
|
|
11480
11498
|
`;
|
|
11481
|
-
|
|
11482
|
-
|
|
11499
|
+
};
|
|
11500
|
+
var showBanner = (version) => {
|
|
11501
|
+
console.log(createBanner(version));
|
|
11483
11502
|
};
|
|
11484
11503
|
// ../core/src/fs.ts
|
|
11485
11504
|
var import_fs_extra = __toESM(require_lib(), 1);
|
|
@@ -22664,12 +22683,19 @@ export default function RootLayout({
|
|
|
22664
22683
|
Welcome to ${context.projectName} \uD83C\uDF5E
|
|
22665
22684
|
</h1>
|
|
22666
22685
|
<p className="text-gray-600">
|
|
22667
|
-
Built with Next.js
|
|
22686
|
+
Built with Next.js 16, React 19, and bunkit
|
|
22668
22687
|
</p>
|
|
22669
22688
|
</div>
|
|
22670
22689
|
</main>
|
|
22671
22690
|
)
|
|
22672
22691
|
}
|
|
22692
|
+
|
|
22693
|
+
// Next.js 16 Note:
|
|
22694
|
+
// When you add dynamic routes with params, make your component async and await params:
|
|
22695
|
+
// export default async function Page({ params }: { params: Promise<{ slug: string }> }) {
|
|
22696
|
+
// const { slug } = await params;
|
|
22697
|
+
// return <div>{slug}</div>;
|
|
22698
|
+
// }
|
|
22673
22699
|
`;
|
|
22674
22700
|
await writeFile(join(projectPath, "src/app/page.tsx"), pageContent);
|
|
22675
22701
|
const globalsCssContent = `@import "tailwindcss";
|
|
@@ -23021,7 +23047,7 @@ async function initCommand() {
|
|
|
23021
23047
|
{
|
|
23022
23048
|
value: "web",
|
|
23023
23049
|
label: "\uD83C\uDF10 Web",
|
|
23024
|
-
hint: "Next.js
|
|
23050
|
+
hint: "Next.js 16 + React 19"
|
|
23025
23051
|
},
|
|
23026
23052
|
{
|
|
23027
23053
|
value: "api",
|
|
@@ -23156,10 +23182,12 @@ async function addCommand(feature, options) {
|
|
|
23156
23182
|
}
|
|
23157
23183
|
|
|
23158
23184
|
// src/index.ts
|
|
23185
|
+
var packageJson = await Bun.file(new URL("../package.json", import.meta.url)).json();
|
|
23186
|
+
var VERSION = packageJson.version;
|
|
23159
23187
|
var program2 = new Command;
|
|
23160
|
-
program2.name("bunkit").description("Bake production-ready apps in seconds").version(
|
|
23188
|
+
program2.name("bunkit").description("Bake production-ready apps in seconds").version(VERSION);
|
|
23161
23189
|
program2.command("init").description("Create a new project interactively").action(async () => {
|
|
23162
|
-
showBanner();
|
|
23190
|
+
showBanner(VERSION);
|
|
23163
23191
|
try {
|
|
23164
23192
|
await initCommand();
|
|
23165
23193
|
Se(import_picocolors6.default.green("\u2728 Done! Your project is ready to bake! \uD83C\uDF5E"));
|
|
@@ -23170,7 +23198,7 @@ program2.command("init").description("Create a new project interactively").actio
|
|
|
23170
23198
|
}
|
|
23171
23199
|
});
|
|
23172
23200
|
program2.command("create").argument("<preset>", "Preset type (minimal, web, api, full)").argument("<name>", "Project name").option("--no-git", "Skip git initialization").option("--no-install", "Skip dependency installation").description("Create a new project quickly").action(async (preset, name, options) => {
|
|
23173
|
-
showBanner();
|
|
23201
|
+
showBanner(VERSION);
|
|
23174
23202
|
try {
|
|
23175
23203
|
await createCommand2(preset, name, options);
|
|
23176
23204
|
Se(import_picocolors6.default.green("\u2728 Done! Your project is ready to bake! \uD83C\uDF5E"));
|
|
@@ -23181,7 +23209,7 @@ program2.command("create").argument("<preset>", "Preset type (minimal, web, api,
|
|
|
23181
23209
|
}
|
|
23182
23210
|
});
|
|
23183
23211
|
program2.command("add").argument("<feature>", "Feature to add (auth, database, ui, payments, email, storage)").option("--provider <provider>", "Provider to use").description("Add a feature to existing project").action(async (feature, options) => {
|
|
23184
|
-
showBanner();
|
|
23212
|
+
showBanner(VERSION);
|
|
23185
23213
|
try {
|
|
23186
23214
|
await addCommand(feature, options);
|
|
23187
23215
|
Se(import_picocolors6.default.green("\u2728 Feature added successfully! \uD83C\uDF5E"));
|
|
@@ -23192,6 +23220,6 @@ program2.command("add").argument("<feature>", "Feature to add (auth, database, u
|
|
|
23192
23220
|
}
|
|
23193
23221
|
});
|
|
23194
23222
|
if (process.argv.length === 2 || process.argv.length === 3 && (process.argv[2] === "--help" || process.argv[2] === "-h")) {
|
|
23195
|
-
showBanner();
|
|
23223
|
+
showBanner(VERSION);
|
|
23196
23224
|
}
|
|
23197
23225
|
program2.parse();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunkit-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Beautiful CLI for creating production-ready Bun projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -46,16 +46,44 @@
|
|
|
46
46
|
"keywords": [
|
|
47
47
|
"cli",
|
|
48
48
|
"bun",
|
|
49
|
+
"bunkit",
|
|
49
50
|
"scaffold",
|
|
51
|
+
"scaffolding",
|
|
50
52
|
"generator",
|
|
51
53
|
"template",
|
|
52
54
|
"starter",
|
|
53
55
|
"boilerplate",
|
|
54
56
|
"monorepo",
|
|
55
57
|
"nextjs",
|
|
58
|
+
"next.js",
|
|
59
|
+
"react",
|
|
60
|
+
"react-19",
|
|
56
61
|
"hono",
|
|
62
|
+
"typescript",
|
|
57
63
|
"supabase",
|
|
58
|
-
"drizzle"
|
|
64
|
+
"drizzle",
|
|
65
|
+
"drizzle-orm",
|
|
66
|
+
"tailwind",
|
|
67
|
+
"tailwindcss",
|
|
68
|
+
"shadcn",
|
|
69
|
+
"shadcn-ui",
|
|
70
|
+
"fullstack",
|
|
71
|
+
"full-stack",
|
|
72
|
+
"saas",
|
|
73
|
+
"saas-boilerplate",
|
|
74
|
+
"indie-hacker",
|
|
75
|
+
"rapid-development",
|
|
76
|
+
"project-generator",
|
|
77
|
+
"web-framework",
|
|
78
|
+
"backend",
|
|
79
|
+
"frontend",
|
|
80
|
+
"api",
|
|
81
|
+
"rest-api",
|
|
82
|
+
"typescript-template",
|
|
83
|
+
"bun-template",
|
|
84
|
+
"nextjs-template",
|
|
85
|
+
"production-ready",
|
|
86
|
+
"enterprise"
|
|
59
87
|
],
|
|
60
88
|
"author": "Arakiss",
|
|
61
89
|
"license": "MIT",
|