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.

AI CLI·20 commands·Last updated 2026-09-10
lmstudiolmslocal-llmmodel-managementcliggufinference

Install and Status 4

lms
Run lms for the overview
lms --help
List all commands
lms status
Show LM Studio status
lms version
Show CLI version

Model Management 9

lms ls
List downloaded models
lms ls --json
List models as JSON
lms ps
List models loaded in memory
lms get llama-3
Search and download a model
lms import /path/to/model.gguf
Import a local model file
lms load llama-3-8b-instruct
Load a model into memory
lms load llama-3-8b-instruct --gpu=max
Load with max GPU offload
lms load llama-3-8b-instruct --context-length=8192
Load with a context length
lms unload --all
Unload all loaded models

Serve and Chat 7

lms server start
Start the local API server
lms server stop
Stop the API server
lms server status
Show server status
lms chat
Start interactive terminal chat
lms chat --model llama-3-8b-instruct
Chat with a named model
lms runtime survey
Print GPU info
lms log stream
Stream request logs live

Tips

  • 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