create-bunext 0.1.0 → 1.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.
package/README.md ADDED
@@ -0,0 +1,218 @@
1
+ [![Bunext](https://bunext.ardastroid.com/ogImage.jpg)](https://bunext.ardastroid.com/)
2
+
3
+ # create-bunext
4
+
5
+ A CLI tool to scaffold the A CLI tool to scaffold the **Bunext** Next.js 16 starter kit configured with Tailwind CSS, Shadcn UI, Tailwind Motion, React Motion, and a bunch of utilities pre-configured.
6
+
7
+ ## Quick Start
8
+
9
+ ```bash
10
+ # Recommended (Bun)
11
+ bun create bunext my-app
12
+
13
+ # Or with npm
14
+ npm create bunext@latest my-app
15
+ ```
16
+
17
+ ## CLI Usage
18
+
19
+ ### Interactive Mode
20
+
21
+ Run without extra flags for a guided setup:
22
+
23
+ ```bash
24
+ bun create bunext
25
+ ```
26
+
27
+ The CLI will guide you through:
28
+
29
+ 1. **Project name & directory** (with validation and safety checks)
30
+ 2. **Install dependencies?** (yes/no)
31
+ 3. **Initialize git repository?** (yes/no)
32
+ 4. **Connect to a remote repository?** (GitHub/GitLab, optional)
33
+ 5. **Open in editor?** (Cursor / VS Code / Skip)
34
+
35
+ You can also target the **current directory**:
36
+
37
+ ```bash
38
+ bun create bunext .
39
+ ```
40
+
41
+ > The current directory must be empty (ignoring dotfiles); otherwise the CLI will abort with a clear message.
42
+
43
+ ### Quick Setup
44
+
45
+ ```bash
46
+ # Use defaults (install deps, init git, ask for editor)
47
+ bun create bunext my-app -y
48
+
49
+ # Open in editor after creation
50
+ bun create bunext my-app --cursor
51
+ bun create bunext my-app --vscode
52
+
53
+ # Skip steps
54
+ bun create bunext my-app --no-install
55
+ bun create bunext my-app --no-git
56
+
57
+ # Use current directory (must be empty)
58
+ bun create bunext . -y
59
+
60
+ # Combine options
61
+ bun create bunext my-app -y --cursor
62
+ ```
63
+
64
+ ### Available Flags
65
+
66
+ | Flag | Description |
67
+ | :--------------------------- | :--------------------------------------------------------- |
68
+ | `-y`, `--yes` | Skip all prompts and use defaults (install deps, init git) |
69
+ | `--install` / `--no-install` | Install or skip installing dependencies |
70
+ | `--git` / `--no-git` | Initialize or skip git repository |
71
+ | `--cursor` | Open project in Cursor after creation |
72
+ | `--vscode` | Open project in VS Code after creation |
73
+ | `-h`, `--help` | Show help message with examples |
74
+ | `-v`, `--version` | Show CLI version |
75
+
76
+ > For the full help output:
77
+
78
+ ```bash
79
+ bun create bunext --help
80
+ ```
81
+
82
+ ## CLI Features
83
+
84
+ - 🎨 **Nice terminal UX** – Uses `@clack/prompts` and `picocolors` for clean, interactive output with spinners.
85
+ - 💬 **Interactive prompts** – Guided flow for project name, install, git init, remote setup, and editor.
86
+ - ⚡ **Fast mode** – `-y` / `--yes` to skip all prompts and use sane defaults.
87
+ - 🧹 **Template cleanup** – Clones `ardzero/bunext`, then removes CLI-only bits (`packages`, `create-bunext`, docs, workflows).
88
+ json` name.
89
+ - 🛡️ **Graceful error handling** – Friendly messages for network issues, permission problems, git config issues, etc.
90
+ - 🔗 **Git & remote integration** – Can init git, add a remote (GitHub/GitLab), and optionally push on first run.
91
+ - 🎯 **Editor integration** – One-click open in Cursor or VS Code (via `cursor` / `code` CLIs).
92
+
93
+ ## Troubleshooting
94
+
95
+ ### Network Issues (Cloning or Installing)
96
+
97
+ If cloning the template fails (e.g. cannot reach GitHub):
98
+
99
+ ```bash
100
+ # Check connection and retry
101
+ bun create bunext my-app
102
+ ```
103
+
104
+ If dependency installation is the problem, you can skip it:
105
+
106
+ ```bash
107
+ # Create without installing dependencies
108
+ bun create bunext my-app --no-install
109
+
110
+ # Then install manually later
111
+ cd my-app
112
+
113
+ # Using Bun
114
+ bun install
115
+
116
+ # Or npm
117
+ npm install
118
+ ```
119
+
120
+ On install failures, the CLI will offer to continue without installing and print the exact command you can run later.
121
+
122
+ ### Git Issues
123
+
124
+ If git isn’t configured or installed, the CLI will warn and continue without blocking.
125
+
126
+ ```bash
127
+ # Configure git if not already done
128
+ git config --global user.name "Your Name"
129
+ git config --global user.email "you@example.com"
130
+
131
+ # Or skip git initialization
132
+ bun create bunext my-app --no-git
133
+ ```
134
+
135
+ If you choose to connect a remote and it fails (auth, repo not found, etc.), the CLI shows the exact `git` commands you can run manually later.
136
+
137
+ ### Editor Not Opening
138
+
139
+ Make sure the CLI launchers are installed:
140
+
141
+ - **VS Code**: Install the `code` command via Command Palette → “Shell Command: Install 'code' command in PATH”
142
+ - **Cursor**: Install the `cursor` command from Cursor settings
143
+
144
+ If the editor CLI isn’t found, the tool will just print how to `cd` into the project and open it manually.
145
+
146
+ ### Current Directory Not Empty
147
+
148
+ When using:
149
+
150
+ ```bash
151
+ bun create bunext .
152
+ ```
153
+
154
+ The current directory must be empty (excluding dotfiles). If not, the CLI cancels with:
155
+
156
+ > "Current directory is not empty. Please use an empty directory or specify a new project name."
157
+
158
+ Create an empty folder first or use a project name instead:
159
+
160
+ ```bash
161
+ mkdir my-app && cd my-app
162
+ bun create bunext .
163
+ # or
164
+ cd ..
165
+ bun create bunext my-app
166
+ ```
167
+
168
+ ## What’s Included (Bunext Template)
169
+
170
+ The generated project is the **Bunext** starter, which includes:
171
+
172
+ - **Next.js 16** App Router
173
+ - **Tailwind CSS v4**
174
+ - **Shadcn UI** components
175
+ - **Tailwind Motion** for animation primitives
176
+ - **React Motion** (`motion.dev`) preconfigured for advanced animations
177
+ - **Dark / light theme support** via Next theme provider
178
+ - **Custom utility components** like `metadata`, `JsonLD`, `Img`, `Icons`, `ogImageGen`, `featureFlag`, `clink` (conditional link), `code-block`, etc.
179
+ - **Font optimization** using Next.js fonts
180
+ - **Lucide React** icon set
181
+ - **URL state with nuqs** for query param state management
182
+ - **SEO helpers** – metadata generator (including Apple touch icons)
183
+ - **Custom Image utilities** with lazy loading and generated placeholders (with or without `next/image`)
184
+ - **Prettier** with Tailwind plugin for class sorting
185
+ - Handy utilities like QR code gen, string shortener, unique code gen, image placeholders, email validation, hashing, and more
186
+
187
+ For full template documentation and live preview, see: [`https://github.com/ardzero/bunext`](https://github.com/ardzero/bunext/)
188
+
189
+ ## Socials
190
+
191
+ - Website: [ardastroid.com](https://ardastroid.com)
192
+ - Email: [hello@ardastroid.com](mailto:hello@ardastroid.com)
193
+ - GitHub: [@ardzero](https://github.com/ardzero)
194
+
195
+ ## License
196
+
197
+ MIT License
198
+
199
+ Copyright (c) 2026
200
+ Farhan Ashhab Nur / [@ardzero](https://github.com/ardzero)
201
+
202
+ Permission is hereby granted, free of charge, to any person obtaining a copy
203
+ of this software and associated documentation files (the "Software"), to deal
204
+ in the Software without restriction, including without limitation the rights
205
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
206
+ copies of the Software, and to permit persons to whom the Software is
207
+ furnished to do so, subject to the following conditions:
208
+
209
+ The above copyright notice and this permission notice shall be included
210
+ in all copies or substantial portions of the Software.
211
+
212
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
213
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
214
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
215
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
216
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
217
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
218
+ OTHER DEALINGS IN THE SOFTWARE.