feat!: list local models by default, move catalog to mlxcel arch#142
Merged
Conversation
Bare `mlxcel list` (and its `ls` alias) now enumerates the models downloaded into the global store with repo-id, on-disk size, and path, mirroring `ollama list`. The supported model-architecture catalog moves to the new `mlxcel arch` verb (alias `mlxcel supported`), byte-identical to the prior bare-`list` output. The `mlxcel list --local` flag is removed outright; clap rejects `--local` as an unknown argument. This flips a convention that was inverted relative to every comparable tool (`ollama list`, `docker images`, `pip list`, `brew list` all show the local inventory with no flag) and relative to mlxcel's own store-centric `run` / `download` / `rm` verbs. The catalog lists model families (Llama, Qwen, Gemma) while `list` lists concrete runnable repo-ids, so the two belong under different verbs. Changes: - `src/main.rs`: `List` variant doc retargeted to the local store; new `Arch(ArchArgs)` variant with `supported` alias; `ListArgs::local` field removed and `models_dir` doc dropped its "only meaningful with --local" sentence; new empty `ArchArgs` struct; `main()` dispatch always runs `run_list_local` for `List` and renders the catalog for `Arch`. - `src/commands/models.rs`: module / `run_list_local` / `render_local_models` docs drop the `--local` framing; both empty-store hints now redirect to `mlxcel arch`; the `rm` not-found hint says `mlxcel list`; the two empty-store tests assert the new `mlxcel arch` hint. - `src/downloader/store.rs`: `StoredModel` doc surface name updated to `mlxcel list`. - `src/main_tests.rs`: parse tests for `list`, the `ls` alias, `list --models-dir`, `arch`, the `supported` alias, and a negative test pinning `list --local` rejection. - `README.md`, `docs/supported-models.md`, `docs/environment-variables.md`: `list --local` usages updated to `list`; the catalog snippet now runs `mlxcel arch`. - `CHANGELOG.md`: BREAKING `### Changed` entry under `[Unreleased]`. BREAKING CHANGE: `mlxcel list` no longer prints the supported-architecture catalog; it now lists local downloaded models (previously `mlxcel list --local`). Use `mlxcel arch` for the catalog and drop `--local` from any `mlxcel list --local` invocation. Pre-1.0 (v0.1.x) with no deprecation cycle because `--local` had not seen real-world use.
Issue #138 moved the architecture-catalog renderer (`write_supported_models` / `FAMILY_ORDER` in `src/main.rs` and the `ModelType` registry in `src/models/mod.rs`) from `mlxcel list` to the new `mlxcel arch` verb, but eight in-code doc comments still described that machinery as the `mlxcel list` output. Retarget them to `mlxcel arch` so the comments match the verb that now drives the catalog. The `mlxcel list` doc comments that genuinely describe the local-store listing (`run_list_local`, `render_local_models`, `ListArgs`, `StoredModel`) are left unchanged. Doc-comment-only; no behavioral change.
Member
Author
Security & Performance Review — PR #142Reviewed the full diff against Verdict: No security or performance findings. Approve from a security/perf standpoint. Severity breakdown
What was checked
Verification (warm target, narrow commands)
No fixes required; no developer sub-agent delegation needed. |
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
Flip the default for
mlxcel list: it now lists local downloaded models (the former--localbehavior), and the supported-architecture catalog moves to a newmlxcel archverb. The--localflag is removed outright. This is a breaking change (impact:breaking).This aligns the bare verb with every comparable tool (
ollama list,docker images,pip list,brew listall show the local inventory with no flag) and with mlxcel's own store-centricrun/download/rmverbs. The catalog lists model families (Llama, Qwen, Gemma) whereaslistlists concrete runnable repo-ids, so the two belong under separate verbs.What changed
src/main.rs—Listvariant doc retargeted to the local store (keeps thelsalias); newArch(ArchArgs)variant with asupportedalias and doc "List supported model architectures";ListArgs::localfield removed andmodels_dirdoc dropped its "only meaningful with--local" sentence; struct-levelListArgsdoc rewritten; new emptyArchArgsstruct so the verb can grow flags later;main()dispatch now always callsrun_list_localforListand renders the catalog forArch.print_supported_models/write_supported_models/FAMILY_ORDERare unchanged (now reached viaarch).src/commands/models.rs— module /run_list_local/render_local_modelsdocs drop the--localframing; both empty-store hint branches (Some/None) append "To see supported architectures, runmlxcel arch."; thermnot-found hint now saysmlxcel list; the two empty-store tests assert the newmlxcel archhint. Therender_local_modelstable format is untouched (REPO ID / SIZE / PATH — the table redesign is Improve themlxcel listoutput UI (columns, modified-time, --json/--quiet, TTY styling) #141, out of scope).src/downloader/store.rs— the now-staleStoredModeldoc surface name updated frommlxcel list --localtomlxcel list.src/main_tests.rs— new clap parse tests:list→Commands::List(defaultmodels_dir == None),lsalias →Commands::List,list --models-dir /tmp/x→Some(PathBuf::from("/tmp/x")), a negative test thatlist --localis rejected as an unknown argument (pins the removal),arch→Commands::Arch,supportedalias →Commands::Arch. Existingsupported_models_*tests remain valid (now coveringarch's renderer).README.md,docs/supported-models.md,docs/environment-variables.md—mlxcel list --localusages updated tomlxcel list; the "without--localprints the supported model architectures" paragraph rewritten to point atmlxcel arch; the model-support snippet that ranmlxcel listfor the catalog now runsmlxcel arch;docs/supported-models.md"Themlxcel listoutput..." → "Themlxcel archoutput...";docs/environment-variables.md"list --local/rm" → "list/rm".CHANGELOG.md— BREAKING### Changedentry under[Unreleased]describing the default flip, the newarchverb, and the--localremoval (pre-1.0, no deprecation cycle).Breaking change
mlxcel listno longer prints the supported-architecture catalog; it now lists local downloaded models (previouslymlxcel list --local). The--localflag is removed and clap rejects it as an unknown argument. Migration: usemlxcel archfor the catalog, and drop--localfrom anymlxcel list --localinvocation (the bare form now does the same thing). Acceptable pre-1.0 (v0.1.x) because--localhad not seen real-world use.Test plan
list/ls/arch/supported/list --models-dir, and a negative test pinslist --localrejection.supported_models_*tests remain valid (now exercisingarch's renderer);render_*tests inmodels.rsremain valid, with the two empty-store tests extended to assert themlxcel archhint.cargo test/cargo clippy/cargo fmt --check(run by the orchestrator after merge-readiness; not run in this change set).Closes #138