kyawthiha-nextjs-agent-cli 1.0.1 β†’ 1.0.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.
Files changed (2) hide show
  1. package/README.md +165 -101
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,188 +1,252 @@
1
1
  # Next.js Fullstack Agent CLI
2
2
 
3
- Gemini 3 Hackathon Entry 2026
3
+ πŸš€ **AI-powered CLI to build production-ready Next.js fullstack applications using natural language**
4
4
 
5
- **Gemini Next.js Agent CLI** is an autonomous, tool-driven developer agent that transforms natural language into verified, production-ready Next.js fullstack applications.
6
-
7
- The agent plans tasks, executes real commands, verifies results, attempts repairs, and asks for manual input only when automation is unsafe.
5
+ [![npm version](https://img.shields.io/npm/v/kyawthiha-nextjs-agent-cli.svg)](https://www.npmjs.com/package/kyawthiha-nextjs-agent-cli)
6
+ [![GitHub](https://img.shields.io/github/stars/kywthiha/nextjs-agent-cli?style=social)](https://github.com/kywthiha/nextjs-agent-cli)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
8
 
9
9
  ---
10
10
 
11
- ## Overview
12
-
13
- This CLI is designed to behave like a real developer inside a real project environment.
14
-
15
- Instead of only generating code, the agent:
16
- - Creates and modifies files directly
17
- - Runs installs and builds
18
- - Verifies results through execution
19
- - Attempts automated fixes when failures occur
20
- - Pauses for human input when decisions require clarity
11
+ ## ✨ Features
21
12
 
22
- The focus is reliability, correctness, and real execution.
13
+ - πŸ€– **AI-Powered Development** - Describe what you want, the agent builds it
14
+ - πŸ“ **Real File Operations** - Creates and modifies files directly in your project
15
+ - πŸ”§ **Automated Setup** - Installs dependencies, runs builds, handles database setup
16
+ - βœ… **Self-Verification** - Detects errors and attempts automatic fixes
17
+ - πŸ” **Secure API Key Storage** - Credentials stored locally at `~/.nextjs-agent-cli/cred.json`
18
+ - 🎨 **Beautiful CLI** - Interactive prompts with colorful output
23
19
 
24
20
  ---
25
21
 
26
- ## Features
22
+ ## πŸ“‹ Requirements
27
23
 
28
- - Runtime: Node.js
29
- - Language: TypeScript
30
- - CLI Framework: Commander, Inquirer
31
- - Agent: Gemini-powered agentic workflow
32
- - Planning before execution
33
- - Real filesystem operations
34
- - Build and runtime verification
35
- - Targeted self-repair for failures
24
+ - **Node.js** 18 or later
25
+ - **npm** or **pnpm**
26
+ - **Gemini API Key** - Get one from [Google AI Studio](https://aistudio.google.com/)
27
+ - **PostgreSQL** (optional) - Only if your project uses a database
36
28
 
37
29
  ---
38
30
 
39
- ## Requirements
40
-
41
- Before installing, ensure you have:
42
-
43
- - Node.js 18 or later
44
- - npm or pnpm
45
- - PostgreSQL (optional, only required if your project uses a database)
46
- - A Gemini API key
31
+ ## πŸš€ Quick Start
47
32
 
48
- ---
49
-
50
- ## Installation (Step by Step)
33
+ ### Install Globally
51
34
 
52
- 1. Clone the repository
53
35
  ```bash
54
- git clone https://github.com/kywthiha/nextjs-agent-cli.git
36
+ npm install -g kyawthiha-nextjs-agent-cli
55
37
  ```
56
38
 
57
- 2. Move into the project directory
58
- ```bash
59
- cd nextjs-agent-cli
60
- ```
39
+ ### Set Your API Key (One Time)
61
40
 
62
- 3. Install dependencies
63
41
  ```bash
64
- npm install
42
+ next-agent config set-api-key
65
43
  ```
66
44
 
67
- 4. Configure environment variables
68
- ```bash
69
- cp .env.example .env
70
- ```
45
+ ### Start Building
71
46
 
72
- Add your Gemini API key to the `.env` file:
73
- ```
74
- GEMINI_API_KEY=your_api_key_here
47
+ ```bash
48
+ next-agent start
75
49
  ```
76
50
 
77
51
  ---
78
52
 
79
- ## Running the CLI
53
+ ## πŸ“– Commands
54
+
55
+ | Command | Description |
56
+ |---------|-------------|
57
+ | `next-agent start` | Start the AI agent to build a new project |
58
+ | `next-agent config set-api-key` | Set or update your Gemini API key |
59
+ | `next-agent config show` | Show current configuration |
60
+ | `next-agent --help` | Display all available commands |
80
61
 
81
- Start the CLI in development mode:
62
+ ### Start Command Options
82
63
 
83
64
  ```bash
84
- npm run dev
85
- ```
65
+ next-agent start [options]
86
66
 
87
- The agent will launch an interactive session in your terminal.
67
+ Options:
68
+ -n, --project-name <name> Project name (created in current directory)
69
+ -m, --max-iterations <num> Maximum agent iterations (default: 500)
70
+ --skip-db Skip PostgreSQL configuration
71
+ --no-verbose Disable verbose logging
72
+ ```
88
73
 
89
74
  ---
90
75
 
91
- ## Interactive Workflow
76
+ ## 🎯 Interactive Workflow
92
77
 
93
- ### 1. Project Creation
78
+ ### 1. Project Setup
94
79
 
95
- Choose where the Next.js project should be created.
96
80
  ```
97
- ? Where should the project be created? (./my-app)
81
+ ╔═══════════════════════════════════════════════════════════╗
82
+ β•‘ πŸš€ Next.js Fullstack Agent CLI β•‘
83
+ β•‘ Build full-stack apps with AI assistance β•‘
84
+ β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
85
+
86
+ βœ” Ready to build!
87
+
88
+ ? What is your project name? my-app
98
89
  ```
99
90
 
100
- ---
91
+ ### 2. API Key (First Time Only)
101
92
 
102
- ### 2. Model Selection
93
+ ```
94
+ ? Please enter your Gemini API Key: ********
95
+ ? Save API key for future sessions? Yes
96
+ βœ” API key saved to C:\Users\User\.nextjs-agent-cli\cred.json
97
+ ```
103
98
 
104
- Select the Gemini model for the agent.
105
- - gemini-3-flash-preview
106
- - gemini-3-pro-preview
99
+ ### 3. Model Selection
107
100
 
108
- ---
101
+ ```
102
+ ? Select Gemini Model:
103
+ ❯ gemini-3-flash-preview
104
+ gemini-3-pro-preview
105
+ ```
109
106
 
110
- ### 3. Database Configuration (Optional)
107
+ ### 4. Database Configuration (Optional)
111
108
 
112
- If your project requires a database, configure PostgreSQL:
113
109
  ```
114
110
  --- PostgreSQL Configuration ---
115
111
  ? Host: localhost
116
112
  ? Port: 5432
117
113
  ? Username: postgres
118
- ? Password: [HIDDEN]
114
+ ? Password: postgres
115
+ ? Database Name: my-app
116
+ ```
117
+
118
+ Use `--skip-db` to skip this step for static sites.
119
+
120
+ ### 5. Describe Your App
121
+
122
+ ```
123
+ ? What do you want to build or modify?
124
+ > Build a todo app with user authentication and task categories
119
125
  ```
120
126
 
121
127
  The agent will:
122
- - Verify the connection
123
- - Create the database if it does not exist
124
- - Handle schema setup when required
128
+ - πŸ“ Create an implementation plan
129
+ - βœ… Execute tasks step by step
130
+ - πŸ” Verify builds and runtime
131
+ - πŸ”§ Auto-fix errors when possible
125
132
 
126
133
  ---
127
134
 
128
- ### 4. Define Your Goal
135
+ ## πŸ—‚οΈ Project Structure
136
+
137
+ After the agent runs, your project will have:
129
138
 
130
- Describe what you want to build using natural language.
131
139
  ```
132
- ? What do you want to build or modify?
133
- > Build inventory management for a mobile shop with POS and user management
140
+ my-app/
141
+ β”œβ”€β”€ .agent/
142
+ β”‚ β”œβ”€β”€ plan1.md # Implementation plan
143
+ β”‚ └── task1.md # Task checklist
144
+ β”œβ”€β”€ src/
145
+ β”‚ β”œβ”€β”€ app/ # Next.js app router
146
+ β”‚ β”œβ”€β”€ components/ # React components
147
+ β”‚ └── lib/ # Utilities
148
+ β”œβ”€β”€ prisma/ # Database schema (if using DB)
149
+ β”œβ”€β”€ package.json
150
+ └── ...
134
151
  ```
135
152
 
136
- The agent will then:
137
- - Generate an implementation plan (plan.md)
138
- - Generate a task checklist (task.md)
139
- - Execute tasks step by step
140
- - Verify builds and runtime behavior
141
- - Attempt fixes if errors occur
142
-
143
153
  ---
144
154
 
145
- ## Testing and Verification
155
+ ## βš™οΈ Configuration
156
+
157
+ ### API Key Storage
146
158
 
147
- Verification is a core part of the agent’s workflow.
159
+ API keys are stored securely at:
160
+ - **Windows**: `C:\Users\<User>\.nextjs-agent-cli\cred.json`
161
+ - **macOS/Linux**: `~/.nextjs-agent-cli/cred.json`
148
162
 
149
- During execution, the agent may:
150
- - Run dependency installs
151
- - Run builds
152
- - Detect runtime or build failures
153
- - Attempt automated fixes
154
- - Re-run verification steps
163
+ ### Environment Variables
155
164
 
156
- If a failure requires a business or architectural decision, the agent will pause and request manual input instead of guessing.
165
+ You can also set your API key via environment variable:
166
+
167
+ ```bash
168
+ export GEMINI_API_KEY=your_api_key_here
169
+ ```
170
+
171
+ Priority: Environment variable > Credential store > Interactive prompt
157
172
 
158
173
  ---
159
174
 
160
- ## Manual Testing (Optional)
175
+ ## πŸ§ͺ After Generation
161
176
 
162
- After the agent finishes, you can manually verify the generated project:
177
+ Once the agent finishes, run your project:
163
178
 
164
179
  ```bash
165
180
  cd my-app
166
181
  npm run dev
167
182
  ```
168
183
 
169
- Open the browser at:
184
+ Open http://localhost:3000 in your browser.
185
+
186
+ ---
187
+
188
+ ## πŸ› οΈ Development
189
+
190
+ ### Clone and Build
191
+
192
+ ```bash
193
+ git clone https://github.com/kywthiha/nextjs-agent-cli.git
194
+ cd nextjs-agent-cli
195
+ npm install
196
+ npm run build
170
197
  ```
171
- http://localhost:3000
198
+
199
+ ### Run Locally
200
+
201
+ ```bash
202
+ npm run dev
172
203
  ```
173
204
 
174
205
  ---
175
206
 
176
- ## Limitations
207
+ ## πŸ“ Examples
208
+
209
+ ### Create a Todo App
210
+
211
+ ```bash
212
+ next-agent start -n my-todo-app
213
+ # Then enter: "Build a todo app with categories and due dates"
214
+ ```
215
+
216
+ ### Create an E-commerce Site
217
+
218
+ ```bash
219
+ next-agent start -n my-shop
220
+ # Then enter: "Build a product catalog with shopping cart and checkout"
221
+ ```
177
222
 
178
- - Some runtime issues require human decisions
179
- - Complex architecture changes may need guidance
180
- - The agent prioritizes safety and correctness over aggressive automation
223
+ ### Static Landing Page (No Database)
181
224
 
182
- These constraints are intentional.
225
+ ```bash
226
+ next-agent start -n landing --skip-db
227
+ # Then enter: "Build a modern landing page for a SaaS product"
228
+ ```
183
229
 
184
230
  ---
185
231
 
186
- ## License
232
+ ## ⚠️ Limitations
233
+
234
+ - Complex architecture decisions may need guidance
235
+ - Some runtime issues require manual intervention
236
+ - The agent prioritizes safety over aggressive automation
237
+
238
+ ---
239
+
240
+ ## πŸ“„ License
187
241
 
188
242
  MIT License
243
+
244
+ ---
245
+
246
+ ## 🀝 Contributing
247
+
248
+ Contributions are welcome! Please open an issue or submit a pull request.
249
+
250
+ ---
251
+
252
+ **Made with ❀️ for the Gemini 3 Hackathon 2026**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kyawthiha-nextjs-agent-cli",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Next.js Fullstack Agent CLI",
5
5
  "keywords": [
6
6
  "nextjs",
@@ -31,7 +31,7 @@
31
31
  "license": "MIT",
32
32
  "repository": {
33
33
  "type": "git",
34
- "url": ""
34
+ "url": "https://github.com/kywthiha/nextjs-agent-cli.git"
35
35
  },
36
36
  "dependencies": {
37
37
  "@google/genai": "^1.34.0",