LM Studio CLI Cheatsheet - lms Model Management Full Reference
LM Studio is a popular desktop client for local models, and lms is its CLI for downloading, loading, unloading, serving, and even chatting from the terminal. It suits developers who want the GUI but also need to script model workflows in CI. This sheet covers status, model management, and server control so you can drive local models from the command line.
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