lms
- Command Line Tool for LM Studio
lms
is shipped with LM Studio. To set it up:
- Zsh
echo 'export PATH="$HOME/.cache/lmstudio/bin:$PATH"' >> ~/.zshrc
- Bash
echo 'export PATH="$HOME/.cache/lmstudio/bin:$PATH"' >> ~/.bashrc
Not sure which shell you're using? Pop open your terminal and run
echo $SHELL
to find out./bin/zsh
means you're using Zsh,/bin/bash
means you're using Bash.
lms.exe
should already be in your PATH after installation. Test it by runninglms version
in powershell or cmd.
You can use lms --help
to see a list of all available subcommands. For specific details about each subcommand, use lms <subcommand> --help
.
Here are some frequently used commands:
lms status
- To check the status of the current project.lms server start
- To start the local API server.lms server stop
- To stop the local API server.lms server ls
- To list all downloaded models.lms server ps
- To list all loaded models available for inferencing.
Please note that most commands, except those controlling the server, internally use lmstudio.js. Therefore, ensure the server is running before utilizing these commands. You can start the server using lms server start
.