feat: add exo-cli management tool for controlling a running cluster#1729
Open
ecohash-co wants to merge 2 commits intoexo-explore:mainfrom
Open
feat: add exo-cli management tool for controlling a running cluster#1729ecohash-co wants to merge 2 commits intoexo-explore:mainfrom
ecohash-co wants to merge 2 commits intoexo-explore:mainfrom
Conversation
Adds `exo-cli` as a separate entrypoint for managing a running exo cluster over HTTP, analogous to kubectl/kubelet or obsidian-cli/obsidian. Commands: exo-cli status Cluster overview exo-cli health Quick liveness (exits 1 if down) exo-cli nodes [<id>] List or inspect nodes exo-cli models Loaded models + downloads exo-cli models status <name> Poll readiness exo-cli models load [--wait] <name> Load with auto-placement exo-cli models unload <name> Unload by name exo-cli models swap [--wait] <old> <new> Atomic model swap Key features: - --wait flag blocks until async ops complete (no polling loops in scripts) - --json flag for machine-readable output - --host/--port to target any node - Human-friendly table output by default - Zero new dependencies (stdlib urllib + argparse) Closes exo-explore#1728 Depends on exo-explore#1727 (cluster management API endpoints) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Two updates based on feedback on #1728:
Will rebase and update once the team is ready. Ping us anytime. |
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.
Motivation
The
exocommand starts a node — it's a long-running daemon. There's currently no CLI tool for managing a running cluster. This addsexo-clias a separate entrypoint following the same pattern askubectl/kubeletorobsidian-cli/obsidian.Closes #1728
Depends on #1727 (cluster management API endpoints)
Changes
New package:
src/exo/cli/(4 modules, ~500 lines + 300 lines of tests)client.py/v1/cluster/*endpointsformat.pymain.pytests/test_cli.pyNew entrypoint in
pyproject.toml:Commands
Key features
--waitflag blocks until async operations complete — eliminates polling loops in scripts--jsonflag for machine-readable output (pipe tojq)--host/--portto target any node in the clusterurllibandargparseExample: day/night model rotation cron
Example: health check in monitoring
Why It Works
The CLI is a pure HTTP client — it talks to the cluster management API endpoints from #1727 and does no server-side work. Each command maps 1:1 to an API endpoint. The
--waitflag usesGET /v1/cluster/models/{id}/statusin a polling loop with configurable interval and timeout.Test Plan
Automated Testing
20 tests in
src/exo/cli/tests/test_cli.py:Full suite: 266 passed, 0 failed across the entire repo.
Manual Testing
Not yet tested against a live cluster (the CLI depends on #1727 endpoints). The HTTP client uses standard
urllib— the interesting logic is all in the argument parsing and output formatting, which are well-covered by tests.