explaingit

lmstudio-ai/lms

4,799TypeScriptAudience · developerComplexity · 2/5Setup · moderate

TLDR

The official command-line tool bundled with LM Studio that lets you start and stop its local AI server, list downloaded models, load or unload models into memory, and stream live logs, all from a terminal.

Mindmap

mindmap
  root((lms CLI))
    Model management
      List downloaded models
      Load model into memory
      Unload to free RAM
    Server control
      Start local server
      Stop server
      Check server status
    Developer tools
      Create new project
      Stream live logs
      Per-command help
    Tech
      TypeScript
      lmstudio.js monorepo
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Control LM Studio from a terminal, start the server, check which models are loaded, and free memory by unloading models you're not using.

USE CASE 2

Create a new coding project that connects to a locally running AI model via LM Studio's JavaScript library.

USE CASE 3

Stream real-time logs from LM Studio to debug model behavior during development.

USE CASE 4

List all downloaded AI models and see which are actively loaded in memory with a single command.

Tech stack

TypeScriptNode.js

Getting it running

Difficulty · moderate Time to first run · 5min

Bundled with LM Studio 0.2.22+, contributors must clone the full lmstudio.js monorepo to build from source.

In plain English

This is the official command-line tool for LM Studio, a desktop application that lets people run AI language models directly on their own computer. The tool is called lms and it comes bundled with LM Studio versions 0.2.22 and newer, so most users already have it without needing to install anything extra. From a terminal window, lms gives you typed commands to control what LM Studio is doing. You can check whether LM Studio is running, start or stop its local server, see which AI models you have downloaded, and see which models are currently loaded and ready to respond. Commands like lms ls list your downloaded models, while lms ps shows models that are actively in memory. You can also load or unload individual models by name, which lets you control how much of your computer's memory is in use. Beyond model management, lms also has a command to create a new coding project that connects to LM Studio through its software library, and a command to stream live logs so you can watch what LM Studio is doing in real time. Every subcommand has its own --help flag that explains its options, so you do not need to memorize syntax. The tool is written in TypeScript and is part of a larger collection of code called the lmstudio.js monorepo. It cannot be built in isolation, contributors need to clone the full monorepo and build the whole set before testing their changes. The README is brief and the project's main home for documentation is the LM Studio website rather than the repository itself.

Copy-paste prompts

Prompt 1
Using the lms CLI from LM Studio, write a shell script that starts the LM Studio server, waits for it to be ready, loads a specific model by name, and sends a test prompt.
Prompt 2
Show me how to use lms ls and lms ps to see my downloaded models and currently loaded models, then unload a model to free RAM.
Prompt 3
I want to build a new TypeScript project that connects to my local LM Studio server. Show me how to use lms create and what the generated starter code looks like.
Prompt 4
Write a Bash one-liner using lms log stream that monitors LM Studio in real time and stops when it sees a specific error pattern in the output.
Open on GitHub → Explain another repo

← lmstudio-ai on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.