LM Studio CLI
$ lms Official Low RiskLM Studio CLI (lms) controls local GGUF and MLX models, downloads weights (lms get), loads models into memory (lms load), and manages the local OpenAI-compatible server (lms server start). Query subcommands like lms ls --json, lms ps --json, and lms server status --json expose clean machine-readable state.
npx lmstudio install-cli lms manages local model downloads, VRAM estimates (lms load --estimate-only), and server lifecycle directly on the host machine.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Provides --json on ls, ps, server status, and daemon status, plus -y (--yes) and --estimate-only for non-interactive checks.
lms ls --jsonandlms ps --jsonemit structured model metadatalms load --estimate-onlychecks memory fit without loading weights
Runs locally with no cloud credentials; --bind defaults to local access and --ttl can auto-unload idle models, though lms get downloads multi-GB files.
- Local-only model lifecycle with
--estimate-onlyand--ttlsafeguards
Supports macOS, Linux, and Windows via LM Studio or llmster, though it relies on the LM Studio runtime daemon rather than being standalone.
- Cross-platform TypeScript CLI backed by LM Studio /
llmsterdaemon
Cleanly automates model loading, GPU offloading ratios (--gpu), context sizing (--context-length), and server control.
- Granular
--gpu,--context-length, and--ttlcontrols
Official lmstudio-ai/lms repository under MIT license with active releases.
- Official LM Studio CLI repository (
lmstudio-ai/lms, MIT)
Clear official CLI documentation at lmstudio.ai/docs/cli and complete --help output.
- Dedicated reference docs at lmstudio.ai/docs/cli
Security, Auth & Guardrails
No authentication required for local inference; downloaded models and state live under ~/.lmstudio/.
MIT open-source CLI companion to LM Studio; local hardware RAM/VRAM and disk space required.
# LM Studio CLI (lms) Agent Rules - Prefer `lms ls --json`, `lms ps --json`, and `lms server status --json` for state inspection. - Run `lms load <model> --estimate-only` before loading large models; avoid `lms chat` without `-y`/prompts as it enters an interactive session.
Agent-Ready Command Recipes
Safe Read-Only Queries
lms ls --json
Returns all locally cached GGUF/MLX models, sizes, and architectures in structured JSON.
lms ps --json && lms server status --json
Inspects models currently loaded in memory and whether the local API server is running.
Controlled Writes & Previews
lms load llama-3.1-8b --estimate-only --gpu max
Calculates VRAM/RAM usage for a model configuration without actually loading it into memory.
Strengths for Agents
- + Machine-readable
--jsonoutput acrossls,ps,server status, anddaemon status. - + Built-in
lms load --estimate-onlyverifies memory fit before committing VRAM.
Caveats & Pitfalls
- ! Requires the LM Studio desktop app or
llmsterdaemon running locally. - !
lms server startandlms chatare long-running or interactive unless managed externally.