nexforge-cli 1.1.1 â 1.1.3
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 +123 -141
- package/package.json +1 -1
- package/src/commands/create.js +2 -2
package/README.md
CHANGED
|
@@ -1,222 +1,204 @@
|
|
|
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
|
-
|
|
9
|
-
|
|
13
|
+
[Visit NexForge](https://nexforge-sandy.vercel.app/) âĸ [Report Bug](mailto:manavsharma3825@gmail.com)
|
|
14
|
+
|
|
15
|
+
</div>
|
|
10
16
|
|
|
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
17
|
---
|
|
13
18
|
|
|
14
|
-
##
|
|
19
|
+
## ⥠Quick Start
|
|
15
20
|
|
|
16
|
-
|
|
21
|
+
Install the NexForge CLI globally to access it from anywhere on your system:
|
|
17
22
|
|
|
18
23
|
```bash
|
|
19
24
|
npm install -g nexforge-cli
|
|
20
25
|
```
|
|
21
26
|
|
|
22
|
-
|
|
27
|
+
Once installed, you can instantly scaffold a new project or log in to manage existing ones!
|
|
23
28
|
|
|
24
|
-
|
|
29
|
+
---
|
|
25
30
|
|
|
26
|
-
|
|
31
|
+
## đ¤ī¸ End-to-End Workflow (Step-by-Step)
|
|
27
32
|
|
|
28
|
-
|
|
29
|
-
**Usage:**
|
|
33
|
+
Here is exactly how you go from an empty folder to a live, deployed application on NexForge:
|
|
30
34
|
|
|
31
|
-
|
|
32
|
-
nexforge
|
|
33
|
-
|
|
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
|
+
|
|
38
|
+
**2ī¸âŖ Login to NexForge**
|
|
39
|
+
Run `nexforge login` in your terminal. You'll need your **CLI Token** and **Project ID** from your NexForge web dashboard.
|
|
34
40
|
|
|
35
|
-
**
|
|
41
|
+
**3ī¸âŖ Initialize the Project**
|
|
42
|
+
Navigate into your project folder and run `nexforge init`. This links your local directory to your NexForge servers.
|
|
36
43
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- Saves your credentials securely in `~/.nexforge/config.json`.
|
|
44
|
+
**4ī¸âŖ Deploy to the World! đ**
|
|
45
|
+
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!
|
|
40
46
|
|
|
41
47
|
---
|
|
42
48
|
|
|
43
|
-
|
|
49
|
+
## đ The Ultimate Project Generator: `nexforge create`
|
|
44
50
|
|
|
45
|
-
**
|
|
46
|
-
|
|
51
|
+
**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).
|
|
52
|
+
|
|
53
|
+
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.
|
|
47
54
|
|
|
48
55
|
```bash
|
|
49
|
-
nexforge
|
|
56
|
+
nexforge create
|
|
50
57
|
```
|
|
51
58
|
|
|
52
|
-
**
|
|
59
|
+
**How it works:**
|
|
53
60
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- Automatically registers the project on NexForge servers and links your current directory to the new Project ID.
|
|
61
|
+
**1ī¸âŖ Interactive UI**
|
|
62
|
+
Run the command and enter your project name.
|
|
57
63
|
|
|
58
|
-
|
|
64
|
+
**2ī¸âŖ Choose your Stack**
|
|
65
|
+
Select Fullstack, Frontend Only, or Backend Only.
|
|
59
66
|
|
|
60
|
-
|
|
67
|
+
**3ī¸âŖ Pick your Framework**
|
|
68
|
+
Next.js, React, Vue, or Express with your database of choice.
|
|
61
69
|
|
|
62
|
-
**
|
|
63
|
-
|
|
70
|
+
**4ī¸âŖ Zero-Bloat Selection**
|
|
71
|
+
Choose add-ons like Animations (GSAP/Framer), State Management (Redux), or AI SDKs (OpenAI/Groq).
|
|
64
72
|
|
|
65
|
-
|
|
66
|
-
nexforge
|
|
67
|
-
```
|
|
73
|
+
**5ī¸âŖ Ready to Go**
|
|
74
|
+
The CLI installs everything. Just `cd` into your directory, run `nexforge init`, and deploy!
|
|
68
75
|
|
|
69
|
-
|
|
76
|
+
### đ Generated Folder Structures
|
|
70
77
|
|
|
71
|
-
|
|
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!
|
|
78
|
+
Depending on your choice, the CLI organizes your project perfectly:
|
|
83
79
|
|
|
84
|
-
|
|
80
|
+
**Fullstack Mode**
|
|
81
|
+
```text
|
|
82
|
+
my-awesome-app/
|
|
83
|
+
âââ frontend/ # Your chosen frontend (React / Next.js / Vue)
|
|
84
|
+
âââ backend/ # Your chosen backend (Express + DB)
|
|
85
|
+
```
|
|
85
86
|
|
|
86
|
-
|
|
87
|
+
**Single Stack Mode (Frontend or Backend)**
|
|
88
|
+
```text
|
|
89
|
+
my-awesome-app/
|
|
90
|
+
âââ src/ # Source code for your framework
|
|
91
|
+
âââ package.json # Pre-configured scripts & selected deps
|
|
92
|
+
âââ ... # Config files (Tailwind, Vite, etc.)
|
|
93
|
+
```
|
|
87
94
|
|
|
88
|
-
|
|
89
|
-
**Usage:**
|
|
95
|
+
### đĻ Available Zero-Bloat Packages
|
|
90
96
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
97
|
+
The CLI dynamically injects only the packages you approve. Here is exactly what gets installed when you select "Yes":
|
|
98
|
+
|
|
99
|
+
**Frontend Add-ons:**
|
|
100
|
+
- **Animations:** `framer-motion`, `gsap`, `lenis`
|
|
101
|
+
- **State Management:** `@reduxjs/toolkit`, `react-redux`
|
|
102
|
+
- **Websockets:** `socket.io-client`
|
|
103
|
+
- **UI Extras:** `react-toastify`, `react-icons`, `@heroicons/react`
|
|
104
|
+
- **Charts:** `recharts`
|
|
94
105
|
|
|
95
|
-
**
|
|
106
|
+
**Backend Add-ons:**
|
|
107
|
+
- **AI SDKs:** `openai`, `@google/genai`, `groq-sdk`
|
|
108
|
+
- **Redis & Queues:** `redis`, `ioredis`, `bullmq`
|
|
109
|
+
- **S3 Storage:** `@aws-sdk/client-s3`, `multer`
|
|
110
|
+
- **Websockets:** `socket.io`
|
|
96
111
|
|
|
97
|
-
|
|
98
|
-
- Uploads the code to NexForge backend servers.
|
|
99
|
-
- Automatically connects to the live **WebSocket log stream** so you can watch your build progress in real-time.
|
|
100
|
-
- Returns your live deployment URL upon success.
|
|
112
|
+
*(đĄ **Note:** `nexforge create` works entirely locally. You don't need a NexForge account to use it as an everyday project generator!)*
|
|
101
113
|
|
|
102
114
|
---
|
|
103
115
|
|
|
104
|
-
|
|
116
|
+
## đ ī¸ CLI Command Reference
|
|
105
117
|
|
|
106
|
-
|
|
118
|
+
Manage your NexForge deployments effortlessly. Below is the complete suite of commands available.
|
|
107
119
|
|
|
108
|
-
|
|
120
|
+
### đ Authentication & Setup
|
|
109
121
|
|
|
122
|
+
**Authenticate your CLI**
|
|
123
|
+
Prompts for your Personal CLI Token and Project ID, saving credentials securely to `~/.nexforge/config.json`.
|
|
110
124
|
```bash
|
|
111
|
-
nexforge
|
|
125
|
+
nexforge login
|
|
112
126
|
```
|
|
113
127
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
#### Pull Variables
|
|
117
|
-
|
|
128
|
+
**Initialize a new NexForge project**
|
|
129
|
+
Registers your project on the server without opening a browser.
|
|
118
130
|
```bash
|
|
119
|
-
nexforge
|
|
131
|
+
nexforge init
|
|
120
132
|
```
|
|
121
133
|
|
|
122
|
-
|
|
134
|
+
### đ Deployment & Monitoring
|
|
123
135
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
**Usage:**
|
|
136
|
+
**Deploy your project**
|
|
137
|
+
Packages your code (ignoring `node_modules`, `.git`, `.env`), uploads to NexForge, and streams live build logs via WebSocket. Returns a live URL on success.
|
|
138
|
+
```bash
|
|
139
|
+
nexforge deploy
|
|
140
|
+
```
|
|
130
141
|
|
|
142
|
+
**View live logs**
|
|
143
|
+
Connects to the WebSocket server and streams real-time logs for any ongoing deployment pipelines.
|
|
131
144
|
```bash
|
|
132
145
|
nexforge logs
|
|
133
146
|
```
|
|
134
147
|
|
|
135
|
-
**
|
|
136
|
-
|
|
137
|
-
- Connects to the NexForge WebSocket server and streams real-time logs for any ongoing deployment pipelines.
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
### âĒ 7. `nexforge rollback`
|
|
142
|
-
|
|
143
|
-
**Description:** Instantly revert your live website to a previous stable deployment.
|
|
144
|
-
**Usage:**
|
|
145
|
-
|
|
148
|
+
**Rollback deployment**
|
|
149
|
+
Revert to a previous stable deployment instantly with zero downtime and no rebuild required.
|
|
146
150
|
```bash
|
|
147
151
|
nexforge rollback
|
|
148
152
|
```
|
|
149
153
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
- Fetches a list of your recent successful and failed deployments.
|
|
153
|
-
- Prompts you to select a version.
|
|
154
|
-
- Instantly updates the symbolic links on the server to serve the older version with **zero downtime** and **no rebuild required**.
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
### âī¸ 8. `nexforge rename`
|
|
159
|
-
|
|
160
|
-
**Description:** Rename the subdomain of your project.
|
|
161
|
-
**Usage:**
|
|
154
|
+
### đ Environment & Domains
|
|
162
155
|
|
|
156
|
+
**Push local environment variables**
|
|
157
|
+
Reads your local `.env` file and securely syncs all variables to your live NexForge project.
|
|
163
158
|
```bash
|
|
164
|
-
nexforge
|
|
159
|
+
nexforge env push
|
|
165
160
|
```
|
|
166
161
|
|
|
167
|
-
**
|
|
168
|
-
|
|
169
|
-
- Asks for your new preferred subdomain.
|
|
170
|
-
- Validates availability on the NexForge servers.
|
|
171
|
-
- Instantly updates your live URL to the new subdomain.
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
### âšī¸ 9. `nexforge info`
|
|
176
|
-
|
|
177
|
-
**Description:** View your current project's status and details.
|
|
178
|
-
**Usage:**
|
|
179
|
-
|
|
162
|
+
**Pull remote environment variables**
|
|
163
|
+
Fetches all environment variables from your live NexForge project and saves them into your local `.env` file.
|
|
180
164
|
```bash
|
|
181
|
-
nexforge
|
|
165
|
+
nexforge env pull
|
|
182
166
|
```
|
|
183
167
|
|
|
184
|
-
**
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
### đ 10. `nexforge domains`
|
|
191
|
-
|
|
192
|
-
**Description:** Manage custom domains for your project.
|
|
193
|
-
**Usage:**
|
|
168
|
+
**Add a custom domain**
|
|
169
|
+
Links a new custom domain to your project directly from the terminal.
|
|
170
|
+
```bash
|
|
171
|
+
nexforge domains add <domain>
|
|
172
|
+
```
|
|
194
173
|
|
|
174
|
+
**List custom domains**
|
|
175
|
+
Lists all custom domains currently linked to your active project.
|
|
195
176
|
```bash
|
|
196
|
-
nexforge domains add <your-domain.com>
|
|
197
177
|
nexforge domains ls
|
|
198
178
|
```
|
|
199
179
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
- `add`: Links a new custom domain to your project without opening the dashboard.
|
|
203
|
-
- `ls`: Lists all custom domains currently linked to your project.
|
|
204
|
-
|
|
205
|
-
---
|
|
180
|
+
### âšī¸ Utility Commands
|
|
206
181
|
|
|
207
|
-
|
|
182
|
+
**View project info**
|
|
183
|
+
View project status, framework, custom domains, live URL, and recent deployment status.
|
|
184
|
+
```bash
|
|
185
|
+
nexforge info
|
|
186
|
+
```
|
|
208
187
|
|
|
209
|
-
**
|
|
210
|
-
|
|
188
|
+
**Rename project**
|
|
189
|
+
Change your project's subdomain instantly. Validates availability and updates your live URL.
|
|
190
|
+
```bash
|
|
191
|
+
nexforge rename
|
|
192
|
+
```
|
|
211
193
|
|
|
194
|
+
**Open live project**
|
|
195
|
+
Instantly opens your live project URL in your default web browser.
|
|
212
196
|
```bash
|
|
213
197
|
nexforge open
|
|
214
198
|
```
|
|
215
199
|
|
|
216
|
-
**Details:**
|
|
217
|
-
|
|
218
|
-
- Fetches your project's live URL and instantly opens it in your host OS browser.
|
|
219
|
-
|
|
220
200
|
---
|
|
221
201
|
|
|
222
|
-
|
|
202
|
+
<div align="center">
|
|
203
|
+
<b>Built with â¤ī¸ by Manav Sharma</b>
|
|
204
|
+
</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)
|