lms CLI

LM Studio commands list downloaded and loaded models, control the local API server and stream application logs in a terminal.

  • 5,404 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • The CLI loads models into memory, uses GPU resources and changes local API server state.
All reasons and checks

lmstudio-ai/lms

Install

Manual install

npx lmstudio install-cli

If the command is missing from PATH, add it and open a new terminal.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The CLI loads models into memory, uses GPU resources and changes local API server state.

This is third-party code. Review the repository files before installing.

What it does

lms selects an LM Studio model, loads it for inference and starts the local API server. Separate commands report application status and models already loaded in memory. Unloading releases a model without deleting its downloaded file. Downloaded and loaded model lists support JSON for automation. A log stream helps investigate application behavior from a terminal. When several compatible applications are installed, the CLI selects an instance through its discovery order and uses that instance’s authentication and server settings.

Who it is for. Local AI application engineers managing LM Studio models from scripts or an agent terminal.

Good fit when

  • An application author checks which model is ready for inference before a test.
  • A test script starts the local API and stops it afterward.
  • A script selects a model from a JSON list of downloaded files.
  • During a generation failure, an engineer follows application logs in another terminal.

Not a fit when

  • You need a standalone server without LM Studio or a compatible application.
  • Your workflow treats a downloaded model as already loaded for inference.
  • You cannot identify the intended instance among several running applications.

Example request

Show downloaded and loaded LM Studio models as JSON. Identify the selected application instance before loading anything new.

Limitations

lms ships with LM Studio 0.2.22 and later and requires an installed compatible application. Among running apps, LM Studio and llmster take precedence over Bionic. If none are running, the CLI tries installations in the order llmster, LM Studio, Bionic. Loading a model needs device memory; `lms load` with `-y` skips confirmation and selects maximum GPU acceleration, so leave it off when first trying a model.

How to disable. Stop the API with `lms server stop`. Use `lms unload --all` to release loaded models; their downloaded files remain.

FAQ

How do I install lms?

Install [LM Studio](https://lmstudio.ai/), which includes the CLI. If the command is missing, run `npx lmstudio install-cli`, open a new terminal and run `lms`.

How do downloaded and loaded models differ?

`lms ls --json` lists downloaded files; `lms ps --json` lists models loaded for inference. Compare them before selecting a model.

Does checking status start the application?

`lms status`, `lms server status` and `lms server stop` do not start an application. Begin with `lms status` for a status-only check.

How do I start and stop the API?

Use `lms server start`, then `lms server stop` after the test. `lms server status` checks status without starting an application.

How do I load a model and observe its activity?

Use `lms load` to load a model. Run `lms log stream` in another terminal to follow logs; `lms ps` reports loaded models.

Discussion

No questions or reviews yet.

CLI tools
Official

LM Studio is a desktop app for running open models locally, with a chat, a local server in OpenAI and Anthropic formats, and MCP support.

CLIExtended access

A CLI and Python library for OpenAI, Claude, Gemini, local and other models: prompts, chats, tools, embeddings and a SQLite log

CLIExtended access12.7KRepository stars

llmman runs Claude Code, Codex and OpenCode on a local or hosted model with one command and stores models as OCI images

CLIExtended access583Repository stars

A CLI connects a model to a Docker-container terminal so an agent can run commands, create files and save its step history

CLIBroad access247Repository stars
Official

A local model server for Apple Silicon Macs in OpenAI, Anthropic and Ollama formats: Claude Code, Codex and OpenCode connect with one command

CLIBroad access2.4KRepository stars

README in short

`lms create` starts a project using the LM Studio SDK. `lms --help` and `lms <subcommand> --help` document the installed release.

README badge

Report a problem

Foxx AIlms
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.