Add gaia init command for one-stop setup#219
Conversation
- Add `gaia install --lemonade` to install Lemonade Server - Add `gaia uninstall --lemonade` to uninstall (downloads matching MSI) - Add `gaia kill --lemonade` to kill Lemonade server on port 8000 - Add minimal installer support for --profile minimal - Update CLI reference docs with new commands - Update quickstart/setup docs with gaia init step - Add unit tests for minimal installer URL patterns
- Increase download timeout to 2 hours for large models - Show filename, speed, and detailed progress info - Add specific error handling for timeout/connection errors - List models that need downloading before starting
- Add model verification step with small inference requests - Tests LLMs with chat completions - Tests embedding models with embeddings API - Optional prompt with Ctrl+C skip support - Refresh PATH from Windows registry after installation - Allows current session to find lemonade-server immediately - No terminal restart required - Display lemonade-server installation path in step 1 - Improve gaia llm output with Rich formatting - Fix None chunk handling in streaming responses - Improve gaia uninstall console output - Rich formatting with colored output - Suppress duplicate log messages - Change model loading log from info to debug level Co-Authored-By: Claude Sonnet 4.5 (1M context) <[email protected]>
Move speed calculation inside display update condition to prevent updates every 0.5 seconds. Now only updates every 2% progress change. Co-Authored-By: Claude Sonnet 4.5 (1M context) <[email protected]>
- Add gaia uninstall --models to clear model cache - Deletes models directly from filesystem (no server required) - Shows cache location and total size - Lists all models with full names - Handles locked files gracefully - Show Lemonade installation path when uninstalling - Fix Path import shadowing issue Co-Authored-By: Claude Sonnet 4.5 (1M context) <[email protected]>
- Remove unused variables in progress callback - Fix f-string without interpolation - Add pylint disable for protected access to _estimate_model_size - Add pylint disable for Console import (used in type hints) Co-Authored-By: Claude Sonnet 4.5 (1M context) <[email protected]>
When models fail verification tests, show commands to: 1. Delete corrupted models: gaia uninstall --models --yes 2. Re-download: gaia init --profile <profile> --yes Co-Authored-By: Claude Sonnet 4.5 (1M context) <[email protected]>
Prepend registry paths to current PATH instead of replacing it. This preserves critical paths like System32 (where PowerShell lives) that are needed by lemonade-server for ZIP extraction. Co-Authored-By: Claude Sonnet 4.5 (1M context) <[email protected]>
Critical fixes: - Fix PowerShell not found during model loading - Redirect server output to ~/.gaia/lemonade-server.log instead of DEVNULL - Windows system() calls need inherited file handles to work - Expand environment variables in registry PATH (%SystemRoot%, etc.) - Kill orphaned llama-server.exe processes in gaia kill --lemonade UI improvements: - Hide verbose output (paths, status) unless --verbose flag used - Show server log location in verbose mode - Fix bitrate indicator flashing by always updating tracking state - Add manual model deletion instructions with actual file paths - Shows platform-specific commands (rmdir vs rm -rf) - Searches for actual directory names in cache Co-Authored-By: Claude Sonnet 4.5 (1M context) <[email protected]>
The unreachable code (129 lines) caused pylint errors and was no longer needed since we switched to prompting users to manually start Lemonade Server instead of automatic startup. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Code cleanup: - Remove commented debug print statements from security.py - Add Windows platform check for taskkill commands in cli.py Documentation updates: - Add --models flag and gaia kill command to CLI reference - Add gaia init mentions to features.mdx - Add Model Issues section to troubleshooting.mdx - Add Lemonade Server troubleshooting tips
Ensures gaia llm works after init by always including DEFAULT_MODEL_NAME in the model list for any profile.
|
@claude review this PR in detail. |
|
Claude finished @kovtcharov's task —— View job PR Review:
|
| File | Lines | Notes |
|---|---|---|
src/gaia/installer/init_command.py |
1388 | Main orchestration, well-structured |
src/gaia/installer/lemonade_installer.py |
619 | Platform-specific install logic |
src/gaia/installer/__init__.py |
23 | Clean exports |
tests/unit/test_init_command.py |
293 | Good coverage |
docs/reference/cli.mdx |
+208 | Comprehensive docs |
docs/quickstart.mdx |
+53 | Updated for gaia init |
scripts/start-lemonade.* |
New | CI/CD helper scripts |
Recommendation: Merge after addressing the console.print() null-safety issue.
Summary
Adds
gaia initcommand for one-stop GAIA setup: installs Lemonade Server and downloads required models.Changes
gaia initcommand with profile support (minimal, chat, code, rag, all)lemonade-server-devtolemonade-serverin all startup scriptsUsage
Files
src/gaia/installer/src/gaia/cli.pytests/unit/test_init_command.pysetup.py,docs/reference/cli.mdxscripts/start-lemonade.*Test Plan
gaia init --profile minimal --yesgaia init --skip-models