Skip to content

feat(install): auto-install Ollama, start server, and pull models#14

Merged
blackaxgit merged 2 commits intomainfrom
feat/install-auto-ollama
Mar 26, 2026
Merged

feat(install): auto-install Ollama, start server, and pull models#14
blackaxgit merged 2 commits intomainfrom
feat/install-auto-ollama

Conversation

@blackaxgit
Copy link
Copy Markdown
Owner

Summary

  • clx install now auto-installs Ollama via brew install ollama if missing
  • Auto-starts ollama serve if binary exists but server is not running
  • Auto-pulls required models (qwen3:1.7b, qwen3-embedding:0.6b) if Ollama is running
  • Graceful fallbacks at every step: warns and continues if any step fails

Install Flow

clx install
  -> Check Ollama binary (not found? brew install ollama)
  -> Check server running (not running? start ollama serve, poll up to 10s)
  -> Check models (missing? POST /api/pull for each, 600s timeout)
  -> Create directories, config, rules, prompts
  -> Copy binaries to ~/.clx/bin/
  -> Initialize SQLite database
  -> Configure Claude Code hooks + MCP in settings.json
  -> Inject CLX section into CLAUDE.md

Test plan

  • Fresh install on clean HOME: 20 items installed, 0 errors
  • Health after install: 8 pass, 1 warn
  • Uninstall (no purge): hooks/MCP removed, data preserved
  • Reinstall after uninstall: idempotent, 0 errors
  • Uninstall --purge: ~/.clx/ deleted completely
  • Double uninstall edge case: graceful no-op, exit 0
  • Install after purge: full fresh install works
  • Automated test suite: 162 tests pass, 0 clippy warnings
  • No Homebrew scenario: warns and continues (L0-only mode)
  • Ollama server timeout: warns and skips model pulling

Generated with Claude Code

blackaxgit and others added 2 commits March 25, 2026 20:03
clx install now handles the full Ollama lifecycle automatically:
- Auto-installs Ollama via Homebrew if missing
- Auto-starts ollama serve if not running
- Auto-pulls required models (qwen3:1.7b, qwen3-embedding:0.6b)
- Graceful fallbacks at every step (warns and continues)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@blackaxgit blackaxgit merged commit e82780b into main Mar 26, 2026
7 checks passed
@blackaxgit blackaxgit deleted the feat/install-auto-ollama branch March 26, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant