You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
This PR simplifies the `gaia-code` CLI by removing confusing subcommands
and creating a flat, intuitive interface.
## Problem
The current CLI has two subcommands (`run` and `init`) that don't make
sense:
- `run` is the only operation the CLI does - why require it?
- `init` should happen automatically, not manually
- Help was broken: `gaia-code --help` didn't show actual arguments (they
were hidden on the `run` subparser)
- Examples in help didn't work: showed `gaia-code "prompt"` but required
`gaia-code run "prompt"`
## Changes
### Removed All Subcommands
- ❌ Deleted `run` subcommand (unnecessary - it's the default operation)
- ❌ Deleted `init` subcommand (auto-initializes on first run now)
- ❌ Removed `cmd_init()` function (166 lines)
- ❌ Removed `_add_common_args()` helper (54 lines)
- ✅ All arguments now top-level on main parser
### Improved User Experience
- ✅ `gaia-code "Build me an app"` - works directly
- ✅ `gaia-code --interactive` - starts interactive mode
- ✅ `gaia-code --help` - shows ALL arguments (previously hidden)
- ✅ Auto-initialization - models load automatically on first use
- ✅ All examples in help actually work
### Code Quality
- **176 lines removed** (611 → 435 lines)
- Simpler argument parsing
- No more `sys.argv` manipulation hacks
- Cleaner code structure
## Testing
```bash
# All these now work as expected:
gaia-code "Build me a todo app"
gaia-code "Build me an app" --path ~/projects/myapp
gaia-code --interactive
gaia-code --list-tools
gaia-code --help # Shows all arguments
```
## Breaking Change
The `run` subcommand has been removed. Users must update their commands:
- ❌ `gaia-code run "Build me an app"` (no longer works)
- ✅ `gaia-code "Build me an app"` (new syntax)
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/guides/code.mdx
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ The GAIA Code Agent turns a natural-language prompt into a working Next.js appli
83
83
84
84
<Steptitle="Generate an app">
85
85
```bash
86
-
gaiacode "Build me a movie tracking app in nextjs where I can track the movie title, genre, date watched, and a score out of 10" --path movie-web-app
86
+
gaia-code "Build me a movie tracking app in nextjs where I can track the movie title, genre, date watched, and a score out of 10" --path movie-web-app
87
87
```
88
88
</Step>
89
89
@@ -101,31 +101,31 @@ The GAIA Code Agent turns a natural-language prompt into a working Next.js appli
101
101
<Tabs>
102
102
<Tabtitle="Workout Tracker">
103
103
```bash
104
-
gaiacode "Build me a workout tracking app in nextjs where I can track workout, duration, date, and goal"
104
+
gaia-code "Build me a workout tracking app in nextjs where I can track workout, duration, date, and goal"
105
105
```
106
106
</Tab>
107
107
108
108
<Tabtitle="Restaurant Reviews">
109
109
```bash
110
-
gaiacode "Build me a restaurant rating application in nextjs. I want to be able to put the location of the restaurant, the food that I ate, and my review"
110
+
gaia-code "Build me a restaurant rating application in nextjs. I want to be able to put the location of the restaurant, the food that I ate, and my review"
111
111
```
112
112
</Tab>
113
113
114
114
<Tabtitle="AI Tool Leaderboard">
115
115
```bash
116
-
gaiacode "Build me an AI tool rater in nextjs where I can give the name of the AI programming tool, give it a score out of 10 for speed and quality in a text box, as well as provide a description. Show a little leaderboard that will show the highest performing to lowest performing tools by averaging those scores."
116
+
gaia-code "Build me an AI tool rater in nextjs where I can give the name of the AI programming tool, give it a score out of 10 for speed and quality in a text box, as well as provide a description. Show a little leaderboard that will show the highest performing to lowest performing tools by averaging those scores."
117
117
```
118
118
</Tab>
119
119
120
120
<Tabtitle="Simple Todos">
121
121
```bash
122
-
gaiacode "Build me a todo tracking app using typescript"
122
+
gaia-code "Build me a todo tracking app using typescript"
123
123
```
124
124
</Tab>
125
125
126
126
<Tabtitle="Interactive Mode">
127
127
```bash
128
-
gaiacode --interactive
128
+
gaia-code --interactive
129
129
# then type your prompt when prompted
130
130
```
131
131
</Tab>
@@ -172,21 +172,21 @@ your-app/
172
172
<CardGroupcols={2}>
173
173
<Cardtitle="Debug Logging"icon="bug">
174
174
```bash
175
-
gaiacode "Create a todo tracking app in nextjs" --debug
175
+
gaia-code "Create a todo tracking app in nextjs" --debug
176
176
```
177
177
See internal decision logs
178
178
</Card>
179
179
180
180
<Cardtitle="JSON Trace"icon="file-code">
181
181
```bash
182
-
gaiacode "Create a todo tracking app in nextjs" --trace
182
+
gaia-code "Create a todo tracking app in nextjs" --trace
Copy file name to clipboardExpand all lines: docs/playbooks/code-agent/part-2-app-creation.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Let's walk through creating a movie tracking app to understand each component.
26
26
### The Prompt
27
27
28
28
```bash
29
-
gaiacode "Build me a movie tracking app in nextjs where I can track the movie title, genre, date watched, and a score out of 10"
29
+
gaia-code "Build me a movie tracking app in nextjs where I can track the movie title, genre, date watched, and a score out of 10"
30
30
```
31
31
32
32
This single command triggers a complete generation pipeline.
@@ -573,31 +573,31 @@ Here are verified prompts that generate complete applications:
573
573
### Movie Tracking App
574
574
575
575
```bash
576
-
gaiacode "Build me a movie tracking app in nextjs where I can track the movie title, genre, date watched, and a score out of 10"
576
+
gaia-code "Build me a movie tracking app in nextjs where I can track the movie title, genre, date watched, and a score out of 10"
577
577
```
578
578
579
579
### Workout Tracking App
580
580
581
581
```bash
582
-
gaiacode "Build me a workout tracking app in nextjs where I can track workout, duration, date, and goal"
582
+
gaia-code "Build me a workout tracking app in nextjs where I can track workout, duration, date, and goal"
583
583
```
584
584
585
585
### Restaurant Rating App
586
586
587
587
```bash
588
-
gaiacode "Build me a restaurant rating application. I want to be able to put the location of the restaurant, the food that I ate, and my review"
588
+
gaia-code "Build me a restaurant rating application. I want to be able to put the location of the restaurant, the food that I ate, and my review"
589
589
```
590
590
591
591
### AI Tool Rating with Leaderboard
592
592
593
593
```bash
594
-
gaiacode "Build me an AI tool rating algorithm in nextjs where I can give the name of the AI programming tool, give it a score out of 10 for speed and quality in a text box, as well as provide a description. Show a little leaderboard that will show the highest performing to lowest performing tools by averaging those scores"
594
+
gaia-code "Build me an AI tool rating algorithm in nextjs where I can give the name of the AI programming tool, give it a score out of 10 for speed and quality in a text box, as well as provide a description. Show a little leaderboard that will show the highest performing to lowest performing tools by averaging those scores"
595
595
```
596
596
597
597
### Simple Todo Tracker
598
598
599
599
```bash
600
-
gaiacode "Build me a todo tracking app using typescript"
600
+
gaia-code "Build me a todo tracking app using typescript"
0 commit comments