LM Studio CLI https://lms.dev
Find a file
Yagil Burowski cdf919fc5c
Push model.yaml drafters in manifest.json (#669)
Drafters go outside dependencies, so apps that don't know them don't
download them.

Co-authored-by: Bionic Developer <developer@Bionics-Virtual-Machine.local>
2026-11-27 13:11:16 -05:00
.github/workflows Subcommand style 2025-11-23 21:46:50 -05:00
.vscode Subcommand style 2025-11-23 21:46:50 -05:00
src Push model.yaml drafters in manifest.json (#669) 2026-11-27 13:11:16 -05:00
.eslintignore Subcommand style 2025-11-23 21:46:50 -05:00
.eslintrc.json Fix lms-create (#391) 2025-12-04 12:08:49 -05:00
.gitignore Add .turbo to gitignore (#257) 2025-07-01 17:49:33 -04:00
.nvmrc Upgrade to Node.js 25.5.0 (#496) 2026-03-17 13:07:16 -04:00
.prettierrc.json init 2024-04-15 13:20:16 -04:00
CONTRIBUTING.md Subcommand style 2025-11-23 21:46:50 -05:00
LICENSE Initial commit 2024-04-15 11:04:42 -04:00
package.json @Release-57 2026-10-14 16:49:58 -04:00
README.md Add lms link agent commands (#663) 2026-11-09 14:06:06 -08:00
tsconfig.json lms executable using bun (#370) 2025-11-26 18:19:13 -05:00


lmstudio cli logo

lms - Command Line Tool for LM Studio

Built with lmstudio.js

Installation

lms ships with LM Studio 0.2.22 and newer.

If you have trouble running the command, try running npx lmstudio install-cli to add it to path.

To check if the bootstrapping was successful, run the following in a 👉 new terminal window 👈:

lms

Usage

You can use lms --help to see a list of all available subcommands.

For details about each subcommand, run lms <subcommand> --help.

Here are some frequently used commands:

  • lms status - To check the status of LM Studio.
  • lms server start - To start the local API server.
  • lms server stop - To stop the local API server.
  • lms ls - To list all downloaded models.
    • lms ls --json - To list all downloaded models in machine-readable JSON format.
    • lms ls --decision - To list only downloaded decision models.
  • lms ps - To list all loaded models available for inferencing.
    • lms ps --json - To list all loaded models available for inferencing in machine-readable JSON format.
  • lms load - To load a model
    • lms load <model path> -y - To load a model with maximum GPU acceleration without confirmation
  • lms unload <model identifier> - To unload a model
    • lms unload --all - To unload all models
  • lms create - To create a new project with LM Studio SDK
  • lms log stream - To stream logs from LM Studio

Use llmster or Bionic to make this device available for agentic use from your other devices:

lms link agent                 # Show whether agentic use is enabled
lms link agent enable          # Show the access warning and ask for confirmation
lms link agent enable --yes    # Enable without confirmation
lms link agent disable         # Disable without confirmation

Agents can read and modify files and run commands with your user permissions. Enabling agentic use can effectively give your other devices full control of this device. Confirmation requires an explicit Y or N; non-interactive enabling requires --yes.

These commands change only the agentic-use setting. The query reports the saved setting even when LM Link is offline or signed out. Managed Runner devices report their effective Runner policy and cannot change it with these commands. LM Studio does not support agentic use. These commands use the same app selection as other lms commands.

Local app selection

lms prefers a running LM Studio or llmster over Bionic. It connects to Bionic when Bionic is the only running app, without starting another backend. When none are running, it tries valid recorded installations in this order: llmster, LM Studio, Bionic. Missing or stale installations are skipped.

Discovery, CLI authentication, and REST server settings all come from the selected app. Bionic uses ~/.lmstudio/apps/bionic/.internal; LM Studio and llmster retain ~/.lmstudio/.internal (under your configured LM Studio home). Shared model and runtime storage is unchanged.

lms status, lms server status, and lms server stop do not start an app. In development, LMS_API_SERVER_INFO_PATH selects one exact instance and never falls back to another app or starts one if that instance is unavailable.

Contributing

The CLI is part of the lmstudio.js monorepo and cannot be built standalone.

Building and Testing the CLI

# Clone and build the entire monorepo
git clone https://github.com/lmstudio-ai/lmstudio-js.git --recursive
cd lmstudio-js
npm install
npm run build

# Test your CLI changes
node publish/cli/dist/index.js <subcommand>

Example:

node publish/cli/dist/index.js --help
node publish/cli/dist/index.js status

See CONTRIBUTING.md for more information.