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 CHANGED
@@ -1,222 +1,204 @@
1
- # NexForge CLI 🚀
1
+ <div align="center">
2
+
3
+ # 🚀 NexForge CLI
4
+
5
+ **The ultimate Command Line Interface for NexForge — Your Custom PaaS.**
6
+
7
+ [![npm version](https://img.shields.io/npm/v/nexforge-cli.svg?style=flat-square)](https://www.npmjs.com/package/nexforge-cli)
8
+ [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg?style=flat-square)](https://opensource.org/licenses/ISC)
9
+ [![Platform](https://img.shields.io/badge/Platform-NexForge-black?style=flat-square)](https://nexforge-sandy.vercel.app/)
2
10
 
3
- The official Command Line Interface for **NexForge** - Your custom Platform as a Service (PaaS).
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!
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
- ## Installation
19
+ ## ⚡ Quick Start
15
20
 
16
- You can install the CLI globally via NPM:
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
- ## Available Commands
27
+ Once installed, you can instantly scaffold a new project or log in to manage existing ones!
23
28
 
24
- Here is the complete list of commands available in the NexForge CLI:
29
+ ---
25
30
 
26
- ### 🔐 1. `nexforge login`
31
+ ## đŸ›¤ī¸ End-to-End Workflow (Step-by-Step)
27
32
 
28
- **Description:** Authenticate your local machine with your NexForge account.
29
- **Usage:**
33
+ Here is exactly how you go from an empty folder to a live, deployed application on NexForge:
30
34
 
31
- ```bash
32
- nexforge login
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
- **Details:**
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
- - 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`.
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
- ### ✨ 2. `nexforge init`
49
+ ## 🌟 The Ultimate Project Generator: `nexforge create`
44
50
 
45
- **Description:** Initialize a new NexForge project right from your terminal without opening the browser.
46
- **Usage:**
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 init
56
+ nexforge create
50
57
  ```
51
58
 
52
- **Details:**
59
+ **How it works:**
53
60
 
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.
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
- ### đŸ—ī¸ 3. `nexforge create`
67
+ **3ī¸âƒŖ Pick your Framework**
68
+ Next.js, React, Vue, or Express with your database of choice.
61
69
 
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:**
70
+ **4ī¸âƒŖ Zero-Bloat Selection**
71
+ Choose add-ons like Animations (GSAP/Framer), State Management (Redux), or AI SDKs (OpenAI/Groq).
64
72
 
65
- ```bash
66
- nexforge create
67
- ```
73
+ **5ī¸âƒŖ Ready to Go**
74
+ The CLI installs everything. Just `cd` into your directory, run `nexforge init`, and deploy!
68
75
 
69
- **How it works (Step-by-Step):**
76
+ ### 📂 Generated Folder Structures
70
77
 
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!
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
- ### 🚀 4. `nexforge deploy`
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
- **Description:** Package and deploy your current directory to NexForge.
89
- **Usage:**
95
+ ### đŸ“Ļ Available Zero-Bloat Packages
90
96
 
91
- ```bash
92
- nexforge deploy
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
- **Details:**
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
- - Instantly zips your source code (ignoring `node_modules`, `.git`, and `.env`).
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
- ### 🌐 5. `nexforge env`
116
+ ## đŸ› ī¸ CLI Command Reference
105
117
 
106
- **Description:** Manage your environment variables securely.
118
+ Manage your NexForge deployments effortlessly. Below is the complete suite of commands available.
107
119
 
108
- #### Push Variables
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 env push
125
+ nexforge login
112
126
  ```
113
127
 
114
- - Reads your local `.env` file and securely pushes all variables to your NexForge project.
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 env pull
131
+ nexforge init
120
132
  ```
121
133
 
122
- - Fetches all environment variables from your live NexForge project and saves them into a local `.env` file.
134
+ ### 🚀 Deployment & Monitoring
123
135
 
124
- ---
125
-
126
- ### 📜 6. `nexforge logs`
127
-
128
- **Description:** Stream live build and deployment logs for your project.
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
- **Details:**
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
- **Details:**
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 rename
159
+ nexforge env push
165
160
  ```
166
161
 
167
- **Details:**
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 info
165
+ nexforge env pull
182
166
  ```
183
167
 
184
- **Details:**
185
-
186
- - Fetches and displays your project name, framework, custom domains, live URL, and latest deployment status directly in the terminal.
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
- **Details:**
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
- ### 🌍 11. `nexforge open`
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
- **Description:** Opens your live project in your default web browser.
210
- **Usage:**
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
- ### Built With â¤ī¸ by Manav Sharma
202
+ <div align="center">
203
+ <b>Built with â¤ī¸ by Manav Sharma</b>
204
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexforge-cli",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Custom Deployment CLI for NexForge",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -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)