@khalisoft/nexcl 1.0.3 → 1.0.4

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,133 @@
1
+ # nexcl
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@khalisoft/nexcl.svg)](https://www.npmjs.com/package/@khalisoft/nexcl)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ **Next.js CLI with built-in admin panel** — Scaffold production-ready Next.js apps with an optional `/ctrl` admin system in seconds.
7
+
8
+ ---
9
+
10
+ ## Features
11
+
12
+ - **Next.js scaffolding** — Creates apps with TypeScript, App Router, ESLint, and `src/` directory
13
+ - **Optional `/ctrl` admin panel** — Dashboard, Pages, Users, and Settings sections out of the box
14
+ - **Route protection** — Middleware for `/ctrl` routes (ready for your auth logic)
15
+ - **Extra dependencies** — Pre-installs `axios` and `zustand` for common use cases
16
+ - **Interactive prompts** — Simple CLI flow to configure your project
17
+
18
+ ---
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ # npm
24
+ npm install -g @khalisoft/nexcl
25
+
26
+ # pnpm
27
+ pnpm add -g @khalisoft/nexcl
28
+
29
+ # yarn
30
+ yarn global add @khalisoft/nexcl
31
+ ```
32
+
33
+ ---
34
+
35
+ ## Usage
36
+
37
+ ```bash
38
+ nexcl [project-name]
39
+ ```
40
+
41
+ If you omit the project name, you'll be prompted to enter one.
42
+
43
+ ### Example
44
+
45
+ ```bash
46
+ nexcl my-app
47
+ ```
48
+
49
+ You'll be asked:
50
+
51
+ 1. **Project name** — Defaults to `my-app` or the name you passed
52
+ 2. **Include /ctrl admin panel?** — `yes` (default) or `no`
53
+
54
+ Then run your app:
55
+
56
+ ```bash
57
+ cd my-app && npm run dev
58
+ ```
59
+
60
+ ---
61
+
62
+ ## What Gets Created
63
+
64
+ ### Base Next.js app
65
+
66
+ - TypeScript
67
+ - App Router
68
+ - ESLint
69
+ - `src/` directory
70
+ - Import alias `@/*`
71
+
72
+ ### With `/ctrl` admin (optional)
73
+
74
+ - **Layout** — Sidebar navigation (Dashboard, Pages, Users, Settings)
75
+ - **Routes** — `/ctrl`, `/ctrl/pages`, `/ctrl/users`, `/ctrl/settings`
76
+ - **Middleware** — Placeholder for admin route protection
77
+
78
+ ### Extra packages
79
+
80
+ - `axios` — HTTP client
81
+ - `zustand` — State management
82
+
83
+ ---
84
+
85
+ ## Project Structure (with /ctrl)
86
+
87
+ ```
88
+ my-app/
89
+ ├── app/
90
+ │ ├── ctrl/
91
+ │ │ ├── layout.tsx
92
+ │ │ ├── page.tsx
93
+ │ │ ├── pages/page.tsx
94
+ │ │ ├── users/page.tsx
95
+ │ │ └── settings/page.tsx
96
+ │ └── ...
97
+ ├── src/
98
+ │ └── middleware.ts
99
+ └── ...
100
+ ```
101
+
102
+ ---
103
+
104
+ ## Development
105
+
106
+ For contributors who want to run the CLI from source:
107
+
108
+ ```bash
109
+ # Clone the repo
110
+ git clone https://github.com/khalisoft/nexcl.git
111
+ cd nexcl
112
+
113
+ # Install dependencies
114
+ pnpm install
115
+
116
+ # Run in dev mode (no build)
117
+ pnpm dev
118
+
119
+ # Build for release
120
+ pnpm build
121
+ ```
122
+
123
+ ---
124
+
125
+ ## Contributing
126
+
127
+ Contributions are welcome. Please open an issue or submit a pull request.
128
+
129
+ ---
130
+
131
+ ## License
132
+
133
+ [MIT](LICENSE) © Devkaahl
package/dist/bin/cli.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,15 +1,11 @@
1
1
  {
2
2
  "name": "@khalisoft/nexcl",
3
3
  "type": "module",
4
- "version": "1.0.3",
4
+ "version": "1.0.4",
5
5
  "description": "Next.js CLI with built-in admin (/ctrl)",
6
6
  "bin": {
7
7
  "nexcl": "./dist/bin/cli.js"
8
8
  },
9
- "scripts": {
10
- "build": "tsc",
11
- "dev": "tsx bin/cli.ts"
12
- },
13
9
  "keywords": [
14
10
  "nextjs",
15
11
  "cli",
@@ -31,5 +27,11 @@
31
27
  "@types/prompts": "^2.4.9",
32
28
  "tsx": "^4.21.0",
33
29
  "typescript": "^5.9.3"
30
+ },
31
+ "scripts": {
32
+ "build": "pnpm version patch && tsc",
33
+ "build:minor": "pnpm version minor && tsc",
34
+ "build:major": "pnpm version major && tsc",
35
+ "dev": "tsx bin/cli.ts"
34
36
  }
35
- }
37
+ }