Merged
Conversation
- Create new standalone CLI at src/gaia/agents/code/cli.py following EMR pattern - Add gaia-code entry point in setup.py - Remove code subcommand from main CLI (parser and handler) - Delete deprecated src/gaia/agents/code/app.py - Update documentation: replace 'gaia code' with 'gaia-code' in 8 files The new gaia-code CLI includes: - RoutingAgent integration for intelligent language detection - Lemonade initialization (32768 context) - init subcommand for model setup - All features from previous implementation - Rich console output following EMR agent pattern
Remove confusing `run` and `init` subcommands from gaia-code CLI. The `run` subcommand was unnecessary (it's the only operation), and `init` is now automatic on first use. Changes: - Remove all subparser logic (run/init subcommands) - Move all arguments to top-level parser - Remove manual init command (auto-initializes on first run) - Fix help display to show all available arguments - Update examples to match actual usage - Reduce code from 611 to 435 lines (-176 lines) Users can now simply run: gaia-code "Build me an app" gaia-code --interactive gaia-code --help Instead of requiring: gaia-code run "Build me an app" gaia-code init 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR successfully simplifies the gaia-code CLI by removing confusing subcommands and creating a standalone command-line tool with a flat, intuitive interface. The refactoring eliminates the need for the run subcommand and moves all functionality into a dedicated CLI module.
Key changes:
- Created a new standalone CLI entry point (
gaia-code) instead of using a subcommand undergaia - Removed 245 lines of code from the main CLI by extracting the code agent functionality
- Updated all documentation and examples to use
gaia-codeinstead ofgaia code
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/gaia/agents/code/cli.py |
New standalone CLI module with argument parsing and command execution logic |
src/gaia/cli.py |
Removed code subcommand parser and handler function (clean removal) |
src/gaia/agents/code/app.py |
Deleted old app.py file (no longer needed) |
setup.py |
Added new gaia-code entry point to console_scripts |
docs/reference/cli.mdx |
Updated all examples from gaia code to gaia-code |
docs/playbooks/code-agent/*.mdx |
Updated all tutorial examples to use new command syntax |
docs/guides/*.mdx |
Updated guide examples to use gaia-code |
.claude/agents/*.md |
Updated agent documentation references |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Remove unused CodeAgent import from src/gaia/agents/code/cli.py - Remove unused CodeAgent import block from src/gaia/cli.py - Update copyright headers to 2025-2026 All lint checks now pass: - Black: PASS - isort: PASS - Pylint: PASS - Flake8: PASS
Extract duplicated interactive mode loop into helper function, add explicit return values, and remove unused code (_print_header and Panel import). Reduces code by 53 lines while maintaining identical functionality.
kovtcharov-amd
approved these changes
Jan 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR simplifies the
gaia-codeCLI by removing confusing subcommands and creating a flat, intuitive interface.Problem
The current CLI has two subcommands (
runandinit) that don't make sense:runis the only operation the CLI does - why require it?initshould happen automatically, not manuallygaia-code --helpdidn't show actual arguments (they were hidden on therunsubparser)gaia-code "prompt"but requiredgaia-code run "prompt"Changes
Removed All Subcommands
runsubcommand (unnecessary - it's the default operation)initsubcommand (auto-initializes on first run now)cmd_init()function (166 lines)_add_common_args()helper (54 lines)Improved User Experience
gaia-code "Build me an app"- works directlygaia-code --interactive- starts interactive modegaia-code --help- shows ALL arguments (previously hidden)Code Quality
sys.argvmanipulation hacksTesting
Breaking Change
The
runsubcommand 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)