
LM Studio CLI (lms)
CLILM Studio 官方命令行:列出、加载与卸载本地模型,启停本地 API 服务,查看运行状态与日志,ls、ps 等命令支持 --json 输出,便于脚本与 agent 调用。需先安装 LM Studio 桌面应用。
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 modellms load <model path> -y- To load a model with maximum GPU acceleration without confirmation
lms unload <model identifier>- To unload a modellms unload --all- To unload all models
lms create- To create a new project with LM Studio SDKlms log stream- To stream logs from LM Studio
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.
相关资源

Ollama
CLI在本机一条命令下载并运行 Gemma 等开源大模型,提供 REST API 与 Python / JS 库,还能用 ollama launch 让 Claude Code、Codex 等 agent 改用本地模型。
ollama/ollama183k
OpenCode
CLI开源终端编码 Agent,可自由切换多家模型供应商,内置可改代码的 build 与只读分析的 plan 两种 agent 及子代理,另有桌面客户端。原 sst/opencode。
anomalyco/opencode214k
Gemini CLI
CLIGoogle 官方开源终端 Agent,使用 Gemini 模型与 100 万 token 上下文,内置 Google 搜索、文件与 Shell 工具并支持 MCP;个人 Google 账号有免费额度。
google-gemini/gemini-cli107k
Aider
CLI终端里的 AI 结对编程工具:为整个代码库建立仓库地图,改动自动提交 git,可接入 Claude、DeepSeek、OpenAI 等几乎所有模型及本地模型,改完可自动跑 lint 与测试。
Aider-AI/aider49.6k
Qwen Code
CLI阿里通义千问团队开源的终端编码 Agent,支持子代理、自动记忆、技能与 MCP,可接入 Qwen、OpenAI、Anthropic、Gemini 等 API 或本地模型,另有 IDE 插件与无头模式(qwen -p)。
QwenLM/qwen-code28.5k
LLM
CLISimon Willison 开发的大模型命令行与 Python 库:在终端调用 OpenAI、Claude、Gemini 及本地模型,对话自动记入 SQLite,支持嵌入、结构化抽取与工具调用,可用插件扩展。
simonw/llm12.6k