kyawthiha-nextjs-agent-cli 1.0.1 β†’ 1.0.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.
Files changed (2) hide show
  1. package/README.md +184 -97
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,188 +1,275 @@
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
11
+ ## ✨ Features
12
12
 
13
- This CLI is designed to behave like a real developer inside a real project environment.
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
14
19
 
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
20
+ ---
21
21
 
22
- The focus is reliability, correctness, and real execution.
22
+ ## πŸ“‹ Requirements
23
23
 
24
- ---
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
25
28
 
26
- ## Features
29
+ ### Search Tools (Recommended)
27
30
 
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
31
+ For enhanced code search capabilities, install these CLI tools:
36
32
 
37
- ---
33
+ | Tool | Description | Install Guide |
34
+ | ---- | ----------- | ------------- |
35
+ | **ripgrep (rg)** | Fast regex search | [Installation Guide](https://github.com/BurntSushi/ripgrep#installation) |
36
+ | **fd** | Fast file finder | [Installation Guide](https://github.com/sharkdp/fd#installation) |
37
+
38
+ **Quick Install:**
38
39
 
39
- ## Requirements
40
+ ```bash
41
+ # Windows (winget)
42
+ winget install BurntSushi.ripgrep.MSVC
43
+ winget install sharkdp.fd
40
44
 
41
- Before installing, ensure you have:
45
+ # macOS (Homebrew)
46
+ brew install ripgrep fd
42
47
 
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
48
+ # Ubuntu/Debian
49
+ sudo apt install ripgrep fd-find
50
+ ```
47
51
 
48
52
  ---
49
53
 
50
- ## Installation (Step by Step)
54
+ ## πŸš€ Quick Start
51
55
 
52
- 1. Clone the repository
53
- ```bash
54
- git clone https://github.com/kywthiha/nextjs-agent-cli.git
55
- ```
56
+ ### Install Globally
56
57
 
57
- 2. Move into the project directory
58
58
  ```bash
59
- cd nextjs-agent-cli
59
+ npm install -g kyawthiha-nextjs-agent-cli
60
60
  ```
61
61
 
62
- 3. Install dependencies
63
- ```bash
64
- npm install
65
- ```
62
+ ### Set Your API Key (One Time)
66
63
 
67
- 4. Configure environment variables
68
64
  ```bash
69
- cp .env.example .env
65
+ next-agent config set-api-key
70
66
  ```
71
67
 
72
- Add your Gemini API key to the `.env` file:
73
- ```
74
- GEMINI_API_KEY=your_api_key_here
68
+ ### Start Building
69
+
70
+ ```bash
71
+ next-agent start
75
72
  ```
76
73
 
77
74
  ---
78
75
 
79
- ## Running the CLI
76
+ ## πŸ“– Commands
77
+
78
+ | Command | Description |
79
+ |---------|-------------|
80
+ | `next-agent start` | Start the AI agent to build a new project |
81
+ | `next-agent config set-api-key` | Set or update your Gemini API key |
82
+ | `next-agent config show` | Show current configuration |
83
+ | `next-agent --help` | Display all available commands |
80
84
 
81
- Start the CLI in development mode:
85
+ ### Start Command Options
82
86
 
83
87
  ```bash
84
- npm run dev
85
- ```
88
+ next-agent start [options]
86
89
 
87
- The agent will launch an interactive session in your terminal.
90
+ Options:
91
+ -n, --project-name <name> Project name (created in current directory)
92
+ -m, --max-iterations <num> Maximum agent iterations (default: 500)
93
+ --skip-db Skip PostgreSQL configuration
94
+ --no-verbose Disable verbose logging
95
+ ```
88
96
 
89
97
  ---
90
98
 
91
- ## Interactive Workflow
99
+ ## 🎯 Interactive Workflow
92
100
 
93
- ### 1. Project Creation
101
+ ### 1. Project Setup
94
102
 
95
- Choose where the Next.js project should be created.
96
103
  ```
97
- ? Where should the project be created? (./my-app)
104
+ ╔═══════════════════════════════════════════════════════════╗
105
+ β•‘ πŸš€ Next.js Fullstack Agent CLI β•‘
106
+ β•‘ Build full-stack apps with AI assistance β•‘
107
+ β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
108
+
109
+ βœ” Ready to build!
110
+
111
+ ? What is your project name? my-app
98
112
  ```
99
113
 
100
- ---
114
+ ### 2. API Key (First Time Only)
101
115
 
102
- ### 2. Model Selection
116
+ ```
117
+ ? Please enter your Gemini API Key: ********
118
+ ? Save API key for future sessions? Yes
119
+ βœ” API key saved to C:\Users\User\.nextjs-agent-cli\cred.json
120
+ ```
103
121
 
104
- Select the Gemini model for the agent.
105
- - gemini-3-flash-preview
106
- - gemini-3-pro-preview
122
+ ### 3. Model Selection
107
123
 
108
- ---
124
+ ```
125
+ ? Select Gemini Model:
126
+ ❯ gemini-3-flash-preview
127
+ gemini-3-pro-preview
128
+ ```
109
129
 
110
- ### 3. Database Configuration (Optional)
130
+ ### 4. Database Configuration (Optional)
111
131
 
112
- If your project requires a database, configure PostgreSQL:
113
132
  ```
114
133
  --- PostgreSQL Configuration ---
115
134
  ? Host: localhost
116
135
  ? Port: 5432
117
136
  ? Username: postgres
118
- ? Password: [HIDDEN]
137
+ ? Password: postgres
138
+ ? Database Name: my-app
139
+ ```
140
+
141
+ Use `--skip-db` to skip this step for static sites.
142
+
143
+ ### 5. Describe Your App
144
+
145
+ ```
146
+ ? What do you want to build or modify?
147
+ > Build a todo app with user authentication and task categories
119
148
  ```
120
149
 
121
150
  The agent will:
122
- - Verify the connection
123
- - Create the database if it does not exist
124
- - Handle schema setup when required
151
+ - πŸ“ Create an implementation plan
152
+ - βœ… Execute tasks step by step
153
+ - πŸ” Verify builds and runtime
154
+ - πŸ”§ Auto-fix errors when possible
125
155
 
126
156
  ---
127
157
 
128
- ### 4. Define Your Goal
158
+ ## πŸ—‚οΈ Project Structure
159
+
160
+ After the agent runs, your project will have:
129
161
 
130
- Describe what you want to build using natural language.
131
162
  ```
132
- ? What do you want to build or modify?
133
- > Build inventory management for a mobile shop with POS and user management
163
+ my-app/
164
+ β”œβ”€β”€ .agent/
165
+ β”‚ β”œβ”€β”€ plan1.md # Implementation plan
166
+ β”‚ └── task1.md # Task checklist
167
+ β”œβ”€β”€ src/
168
+ β”‚ β”œβ”€β”€ app/ # Next.js app router
169
+ β”‚ β”œβ”€β”€ components/ # React components
170
+ β”‚ └── lib/ # Utilities
171
+ β”œβ”€β”€ prisma/ # Database schema (if using DB)
172
+ β”œβ”€β”€ package.json
173
+ └── ...
134
174
  ```
135
175
 
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
176
  ---
144
177
 
145
- ## Testing and Verification
178
+ ## βš™οΈ Configuration
179
+
180
+ ### API Key Storage
146
181
 
147
- Verification is a core part of the agent’s workflow.
182
+ API keys are stored securely at:
183
+ - **Windows**: `C:\Users\<User>\.nextjs-agent-cli\cred.json`
184
+ - **macOS/Linux**: `~/.nextjs-agent-cli/cred.json`
148
185
 
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
186
+ ### Environment Variables
155
187
 
156
- If a failure requires a business or architectural decision, the agent will pause and request manual input instead of guessing.
188
+ You can also set your API key via environment variable:
189
+
190
+ ```bash
191
+ export GEMINI_API_KEY=your_api_key_here
192
+ ```
193
+
194
+ Priority: Environment variable > Credential store > Interactive prompt
157
195
 
158
196
  ---
159
197
 
160
- ## Manual Testing (Optional)
198
+ ## πŸ§ͺ After Generation
161
199
 
162
- After the agent finishes, you can manually verify the generated project:
200
+ Once the agent finishes, run your project:
163
201
 
164
202
  ```bash
165
203
  cd my-app
166
204
  npm run dev
167
205
  ```
168
206
 
169
- Open the browser at:
207
+ Open http://localhost:3000 in your browser.
208
+
209
+ ---
210
+
211
+ ## πŸ› οΈ Development
212
+
213
+ ### Clone and Build
214
+
215
+ ```bash
216
+ git clone https://github.com/kywthiha/nextjs-agent-cli.git
217
+ cd nextjs-agent-cli
218
+ npm install
219
+ npm run build
170
220
  ```
171
- http://localhost:3000
221
+
222
+ ### Run Locally
223
+
224
+ ```bash
225
+ npm run dev
172
226
  ```
173
227
 
174
228
  ---
175
229
 
176
- ## Limitations
230
+ ## πŸ“ Examples
231
+
232
+ ### Create a Todo App
233
+
234
+ ```bash
235
+ next-agent start -n my-todo-app
236
+ # Then enter: "Build a todo app with categories and due dates"
237
+ ```
238
+
239
+ ### Create an E-commerce Site
240
+
241
+ ```bash
242
+ next-agent start -n my-shop
243
+ # Then enter: "Build a product catalog with shopping cart and checkout"
244
+ ```
177
245
 
178
- - Some runtime issues require human decisions
179
- - Complex architecture changes may need guidance
180
- - The agent prioritizes safety and correctness over aggressive automation
246
+ ### Static Landing Page (No Database)
181
247
 
182
- These constraints are intentional.
248
+ ```bash
249
+ next-agent start -n landing --skip-db
250
+ # Then enter: "Build a modern landing page for a SaaS product"
251
+ ```
183
252
 
184
253
  ---
185
254
 
186
- ## License
255
+ ## ⚠️ Limitations
256
+
257
+ - Complex architecture decisions may need guidance
258
+ - Some runtime issues require manual intervention
259
+ - The agent prioritizes safety over aggressive automation
260
+
261
+ ---
262
+
263
+ ## πŸ“„ License
187
264
 
188
265
  MIT License
266
+
267
+ ---
268
+
269
+ ## 🀝 Contributing
270
+
271
+ Contributions are welcome! Please open an issue or submit a pull request.
272
+
273
+ ---
274
+
275
+ **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.3",
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",