nexforge-cli 1.1.1 â 1.1.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 +92 -171
- package/package.json +1 -1
- package/src/commands/create.js +2 -2
package/README.md
CHANGED
|
@@ -1,222 +1,143 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# đ NexForge CLI
|
|
4
|
+
|
|
5
|
+
**The ultimate Command Line Interface for NexForge â Your Custom PaaS.**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/nexforge-cli)
|
|
8
|
+
[](https://opensource.org/licenses/ISC)
|
|
9
|
+
[](https://nexforge-sandy.vercel.app/)
|
|
2
10
|
|
|
3
|
-
|
|
4
|
-
Deploy, manage, and scale your applications directly from your terminal with zero friction!
|
|
5
|
-
<a href="https://nexforge-sandy.vercel.app/">Visit Nexforge</a>
|
|
11
|
+
Deploy, manage, and scale your applications directly from your terminal with zero friction.
|
|
6
12
|
|
|
7
|
-
|
|
8
|
-
### đ Special Feature: Project Folder Structure Generator
|
|
9
|
-
Try **`nexforge create`** to instantly scaffold Fullstack, React, Next.js, Vue, MongoDB, MySQL, and Postgres projects! It features an interactive UI and a **Zero-Bloat Dependency Selection** system that injects only the packages you want (Redux, GSAP, AI SDKs) for lightning-fast setups!
|
|
10
|
-
|
|
11
|
-
*(đĄ **Note:** `nexforge create` is a standalone tool. You can use it to generate projects instantly without needing to log in with GitHub or connect to a NexForge account!)*
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Installation
|
|
15
|
-
|
|
16
|
-
You can install the CLI globally via NPM:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
npm install -g nexforge-cli
|
|
20
|
-
```
|
|
13
|
+
[Visit NexForge](https://nexforge-sandy.vercel.app/) âĸ [Report Bug](https://github.com/manavsharma111/nexforge/issues)
|
|
21
14
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
Here is the complete list of commands available in the NexForge CLI:
|
|
25
|
-
|
|
26
|
-
### đ 1. `nexforge login`
|
|
27
|
-
|
|
28
|
-
**Description:** Authenticate your local machine with your NexForge account.
|
|
29
|
-
**Usage:**
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
nexforge login
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
**Details:**
|
|
36
|
-
|
|
37
|
-
- Prompts you for your personal **CLI Token** (which you can generate from your NexForge Dashboard Settings).
|
|
38
|
-
- Prompts you for your **Project ID**.
|
|
39
|
-
- Saves your credentials securely in `~/.nexforge/config.json`.
|
|
15
|
+
</div>
|
|
40
16
|
|
|
41
17
|
---
|
|
42
18
|
|
|
43
|
-
|
|
19
|
+
## ⥠Quick Start
|
|
44
20
|
|
|
45
|
-
|
|
46
|
-
**Usage:**
|
|
21
|
+
Install the NexForge CLI globally to access it from anywhere on your system:
|
|
47
22
|
|
|
48
23
|
```bash
|
|
49
|
-
nexforge
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
**Details:**
|
|
53
|
-
|
|
54
|
-
- Asks for your **Project Name**.
|
|
55
|
-
- Asks for the **Framework** you are using (e.g., React, Vue, Express, Node.js).
|
|
56
|
-
- Automatically registers the project on NexForge servers and links your current directory to the new Project ID.
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
### đī¸ 3. `nexforge create`
|
|
61
|
-
|
|
62
|
-
**Description:** The ultimate project generator. Scaffold a fully configured project (React, Next.js, Vue, MERN, Postgres, MySQL) with an interactive UI, blazing fast copy, and **Zero Bloat** dependency selection!
|
|
63
|
-
**Usage:**
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
nexforge create
|
|
24
|
+
npm install -g nexforge-cli
|
|
67
25
|
```
|
|
68
26
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
1. **Run the Command:** Type `nexforge create` in your terminal. You'll be greeted by a beautiful, interactive CLI.
|
|
72
|
-
2. **Project Name:** Enter a name for your new app.
|
|
73
|
-
3. **Select your Stack:** Choose from 3 primary modes:
|
|
74
|
-
- **Fullstack:** Automatically generates a combined frontend + backend repository.
|
|
75
|
-
- **Frontend Only:** Choose between **React + Vite**, **Next.js**, or **Vue + Vite**.
|
|
76
|
-
- **Backend Only:** Choose between **Express + MongoDB**, **Express + PostgreSQL**, or **Express + MySQL**.
|
|
77
|
-
4. **Zero-Bloat Dependency Selection:** Instead of downloading a massive, bloated template, the CLI asks you exactly what you need:
|
|
78
|
-
- *Need Animations?* Select yes to inject GSAP & Framer Motion.
|
|
79
|
-
- *Need State Management?* Select yes to inject Redux Toolkit.
|
|
80
|
-
- *Need AI?* Select yes to inject OpenAI & Groq SDKs.
|
|
81
|
-
- The CLI intelligently injects *only* the packages you selected into your `package.json` for a lightning-fast install.
|
|
82
|
-
5. **Ready to Deploy:** Once finished, simply `cd` into your new folder, run `nexforge init` to connect it to your account, and `nexforge deploy` to take it live!
|
|
27
|
+
Once installed, you can instantly scaffold a new project or log in to manage existing ones!
|
|
83
28
|
|
|
84
29
|
---
|
|
85
30
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
**Description:** Package and deploy your current directory to NexForge.
|
|
89
|
-
**Usage:**
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
nexforge deploy
|
|
93
|
-
```
|
|
31
|
+
## đ¤ī¸ End-to-End Workflow (Step-by-Step)
|
|
94
32
|
|
|
95
|
-
|
|
33
|
+
Here is exactly how you go from an empty folder to a live, deployed application on NexForge:
|
|
96
34
|
|
|
97
|
-
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
35
|
+
1. **Create a Project** (Optional but recommended):
|
|
36
|
+
Run `nexforge create` to instantly scaffold a pre-configured React/Next/Vue or Backend project without any bloat.
|
|
37
|
+
2. **Login to NexForge**:
|
|
38
|
+
Run `nexforge login` in your terminal. You'll need your **CLI Token** and **Project ID** from your NexForge web dashboard.
|
|
39
|
+
3. **Initialize the Project**:
|
|
40
|
+
Navigate into your project folder and run `nexforge init`. This links your local directory to your NexForge servers.
|
|
41
|
+
4. **Deploy to the World!** đ
|
|
42
|
+
Run `nexforge deploy`. The CLI will zip your code, upload it, and stream live build logs directly in your terminal. Once done, it gives you a live URL!
|
|
101
43
|
|
|
102
44
|
---
|
|
103
45
|
|
|
104
|
-
|
|
46
|
+
## đ The Ultimate Project Generator: `nexforge create`
|
|
105
47
|
|
|
106
|
-
**
|
|
48
|
+
**Say goodbye to bloated boilerplate.** `nexforge create` is a standalone project generator that instantly scaffolds Fullstack, React, Next.js, Vue, and backend templates (MongoDB, PostgreSQL, MySQL).
|
|
107
49
|
|
|
108
|
-
|
|
50
|
+
It features an interactive UI and a **Zero-Bloat Dependency System** that injects *only* the packages you explicitly request (like Redux, GSAP, or AI SDKs) for lightning-fast setups.
|
|
109
51
|
|
|
110
52
|
```bash
|
|
111
|
-
nexforge
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
- Reads your local `.env` file and securely pushes all variables to your NexForge project.
|
|
115
|
-
|
|
116
|
-
#### Pull Variables
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
nexforge env pull
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
- Fetches all environment variables from your live NexForge project and saves them into a local `.env` file.
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
### đ 6. `nexforge logs`
|
|
127
|
-
|
|
128
|
-
**Description:** Stream live build and deployment logs for your project.
|
|
129
|
-
**Usage:**
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
nexforge logs
|
|
53
|
+
nexforge create
|
|
133
54
|
```
|
|
134
55
|
|
|
135
|
-
**
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
56
|
+
**How it works:**
|
|
57
|
+
1. **Interactive UI**: Run the command and enter your project name.
|
|
58
|
+
2. **Choose your Stack**: Select Fullstack, Frontend Only, or Backend Only.
|
|
59
|
+
3. **Pick your Framework**: Next.js, React, Vue, or Express with your database of choice.
|
|
60
|
+
4. **Zero-Bloat Selection**: Choose add-ons like Animations (GSAP/Framer), State Management (Redux), or AI SDKs (OpenAI/Groq).
|
|
61
|
+
5. **Ready to Go**: The CLI installs everything. Just `cd` into your directory, run `nexforge init`, and deploy!
|
|
140
62
|
|
|
141
|
-
###
|
|
63
|
+
### đ Generated Folder Structures
|
|
142
64
|
|
|
143
|
-
|
|
144
|
-
**Usage:**
|
|
65
|
+
Depending on your choice, the CLI organizes your project perfectly:
|
|
145
66
|
|
|
146
|
-
|
|
147
|
-
|
|
67
|
+
**Fullstack Mode**
|
|
68
|
+
```text
|
|
69
|
+
my-awesome-app/
|
|
70
|
+
âââ frontend/ # Your chosen frontend (React / Next.js / Vue)
|
|
71
|
+
âââ backend/ # Your chosen backend (Express + DB)
|
|
148
72
|
```
|
|
149
73
|
|
|
150
|
-
**
|
|
151
|
-
|
|
152
|
-
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
### âī¸ 8. `nexforge rename`
|
|
159
|
-
|
|
160
|
-
**Description:** Rename the subdomain of your project.
|
|
161
|
-
**Usage:**
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
nexforge rename
|
|
74
|
+
**Single Stack Mode (Frontend or Backend)**
|
|
75
|
+
```text
|
|
76
|
+
my-awesome-app/
|
|
77
|
+
âââ src/ # Source code for your framework
|
|
78
|
+
âââ package.json # Pre-configured scripts & selected deps
|
|
79
|
+
âââ ... # Config files (Tailwind, Vite, etc.)
|
|
165
80
|
```
|
|
166
81
|
|
|
167
|
-
|
|
82
|
+
### đĻ Available Zero-Bloat Packages
|
|
168
83
|
|
|
169
|
-
|
|
170
|
-
- Validates availability on the NexForge servers.
|
|
171
|
-
- Instantly updates your live URL to the new subdomain.
|
|
84
|
+
The CLI dynamically injects only the packages you approve. Here is exactly what gets installed when you select "Yes":
|
|
172
85
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
86
|
+
**Frontend Add-ons:**
|
|
87
|
+
- **Animations:** `framer-motion`, `gsap`, `lenis`
|
|
88
|
+
- **State Management:** `@reduxjs/toolkit`, `react-redux`
|
|
89
|
+
- **Websockets:** `socket.io-client`
|
|
90
|
+
- **UI Extras:** `react-toastify`, `react-icons`, `@heroicons/react`
|
|
91
|
+
- **Charts:** `recharts`
|
|
176
92
|
|
|
177
|
-
**
|
|
178
|
-
**
|
|
93
|
+
**Backend Add-ons:**
|
|
94
|
+
- **AI SDKs:** `openai`, `@google/genai`, `groq-sdk`
|
|
95
|
+
- **Redis & Queues:** `redis`, `ioredis`, `bullmq`
|
|
96
|
+
- **S3 Storage:** `@aws-sdk/client-s3`, `multer`
|
|
97
|
+
- **Websockets:** `socket.io`
|
|
179
98
|
|
|
180
|
-
|
|
181
|
-
nexforge info
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
**Details:**
|
|
185
|
-
|
|
186
|
-
- Fetches and displays your project name, framework, custom domains, live URL, and latest deployment status directly in the terminal.
|
|
99
|
+
*(đĄ **Note:** `nexforge create` works entirely locally. You don't need a NexForge account to use it as an everyday project generator!)*
|
|
187
100
|
|
|
188
101
|
---
|
|
189
102
|
|
|
190
|
-
|
|
103
|
+
## đ ī¸ CLI Command Reference
|
|
191
104
|
|
|
192
|
-
|
|
193
|
-
**Usage:**
|
|
194
|
-
|
|
195
|
-
```bash
|
|
196
|
-
nexforge domains add <your-domain.com>
|
|
197
|
-
nexforge domains ls
|
|
198
|
-
```
|
|
105
|
+
Manage your NexForge deployments effortlessly. Below is the complete suite of commands available.
|
|
199
106
|
|
|
200
|
-
|
|
107
|
+
### đ Authentication & Setup
|
|
201
108
|
|
|
202
|
-
|
|
203
|
-
|
|
109
|
+
| Command | Description |
|
|
110
|
+
|---------|-------------|
|
|
111
|
+
| **`nexforge login`** | Authenticate your CLI. Prompts for your Personal CLI Token and Project ID, saving credentials securely to `~/.nexforge/config.json`. |
|
|
112
|
+
| **`nexforge init`** | Initialize a new NexForge project in the current directory. Registers your project on the server without opening a browser. |
|
|
204
113
|
|
|
205
|
-
|
|
114
|
+
### đ Deployment & Monitoring
|
|
206
115
|
|
|
207
|
-
|
|
116
|
+
| Command | Description |
|
|
117
|
+
|---------|-------------|
|
|
118
|
+
| **`nexforge deploy`** | Packages your code (ignoring `node_modules`, `.git`, `.env`), uploads to NexForge, and streams live build logs via WebSocket. Returns a live URL on success. |
|
|
119
|
+
| **`nexforge logs`** | Connects to the WebSocket server and streams real-time logs for any ongoing deployment pipelines. |
|
|
120
|
+
| **`nexforge rollback`** | Revert to a previous stable deployment instantly with zero downtime and no rebuild required. |
|
|
208
121
|
|
|
209
|
-
|
|
210
|
-
**Usage:**
|
|
122
|
+
### đ Environment & Domains
|
|
211
123
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
124
|
+
| Command | Description |
|
|
125
|
+
|---------|-------------|
|
|
126
|
+
| **`nexforge env push`** | Reads your local `.env` file and securely syncs all variables to your live NexForge project. |
|
|
127
|
+
| **`nexforge env pull`** | Fetches all environment variables from your live NexForge project and saves them into your local `.env` file. |
|
|
128
|
+
| **`nexforge domains add <domain>`** | Links a new custom domain to your project directly from the terminal. |
|
|
129
|
+
| **`nexforge domains ls`** | Lists all custom domains currently linked to your active project. |
|
|
215
130
|
|
|
216
|
-
|
|
131
|
+
### âšī¸ Utility Commands
|
|
217
132
|
|
|
218
|
-
|
|
133
|
+
| Command | Description |
|
|
134
|
+
|---------|-------------|
|
|
135
|
+
| **`nexforge info`** | View project status, framework, custom domains, live URL, and recent deployment status. |
|
|
136
|
+
| **`nexforge rename`** | Change your project's subdomain instantly. Validates availability and updates your live URL. |
|
|
137
|
+
| **`nexforge open`** | Instantly opens your live project URL in your default web browser. |
|
|
219
138
|
|
|
220
139
|
---
|
|
221
140
|
|
|
222
|
-
|
|
141
|
+
<div align="center">
|
|
142
|
+
<b>Built with â¤ī¸ by Manav Sharma</b>
|
|
143
|
+
</div>
|
package/package.json
CHANGED
package/src/commands/create.js
CHANGED
|
@@ -150,7 +150,7 @@ export default (program) => {
|
|
|
150
150
|
if (project.stackType === "fullstack") {
|
|
151
151
|
if (project.frontendFramework === "nextjs") {
|
|
152
152
|
s.message("Bootstrapping Next.js... (this might take a minute)")
|
|
153
|
-
runCommand(`npx create-next-app@latest ${project.name} --js --tailwind --eslint --app --src-dir --import-alias "@/*"`, process.cwd())
|
|
153
|
+
runCommand(`npx --yes create-next-app@latest ${project.name} --js --tailwind --eslint --app --src-dir --import-alias "@/*"`, process.cwd())
|
|
154
154
|
injectDependencies(targetDir, "frontend")
|
|
155
155
|
s.message("Installing selected NexForge dependencies for Next.js...")
|
|
156
156
|
runCommand("npm install", targetDir)
|
|
@@ -173,7 +173,7 @@ export default (program) => {
|
|
|
173
173
|
} else if (project.stackType === "frontend") {
|
|
174
174
|
if (project.frontendFramework === "nextjs") {
|
|
175
175
|
s.message("Bootstrapping Next.js... (this might take a minute)")
|
|
176
|
-
runCommand(`npx create-next-app@latest ${project.name} --js --tailwind --eslint --app --src-dir --import-alias "@/*"`, process.cwd())
|
|
176
|
+
runCommand(`npx --yes create-next-app@latest ${project.name} --js --tailwind --eslint --app --src-dir --import-alias "@/*"`, process.cwd())
|
|
177
177
|
injectDependencies(targetDir, "frontend")
|
|
178
178
|
s.message("Installing selected NexForge dependencies for Next.js...")
|
|
179
179
|
runCommand("npm install", targetDir)
|