LM Studio CLI Cheatsheet - lms Model Management Full Reference
The value of the lms command is that it turns LM Studio desktop model management into a scriptable interface. When it earns its place: preparing a model, starting a server or running an evaluation from CI or an automation script, where the desktop GUI becomes an obstacle. If you are only chatting locally, the graphical interface is faster and this detour is unnecessary. The sheet lays out install and status, model management, and service and chat, chaining ls, ps, get, import, load, unload, server and chat into one workflow. The detail most often missed is the difference between ls and ps: ls lists what is downloaded on disk, ps lists what is currently loaded into memory, and the gap between them is where your VRAM goes. Reach for this sheet when you hit an out-of-memory error despite having downloaded only one model, or when you need to point any OpenAI-compatible client at a local model.
Install and Status 4
lmslms --helplms statuslms versionModel Management 9
lms lslms ls --jsonlms pslms get llama-3lms import /path/to/model.gguflms load llama-3-8b-instructlms load llama-3-8b-instruct --gpu=maxlms load llama-3-8b-instruct --context-length=8192lms unload --allServe and Chat 7
lms server startlms server stoplms server statuslms chatlms chat --model llama-3-8b-instructlms runtime surveylms log streamTips
- lms ships with the LM Studio desktop app; run the desktop app once to initialize before using lms.
- lms server start exposes an OpenAI-compatible server; point a client base_url at port 1234.
- --gpu=max offloads compute to GPU; use --gpu=0 for pure CPU.
FAQ
Does lms need a separate install?
No, it ships with the LM Studio desktop app; or install it alone via npx lmstudio install-cli.
What is the default API port?
Default 1234, chat and completion use the OpenAI-compatible /v1 endpoints.
Official References
Each command links to its official documentation below, so you can verify the latest usage and read deeper.
Maintained by LaoHand
Publicly updated on Sep 10, 2026, continuously proofread against official docs.
Contact Us
Wrong command or description? Send us corrections, business inquiries or product feedback by email.
Contact Us