lms is LM Studio’s command line utility tool. It is an open-source project under the MIT license. We welcome community contributions. There are many ways to help, from writing tutorials or blog posts, improving the documentation, submitting bug reports and feature requests or contributing code which can be incorporated into lms itself.
If you are planning to add a feature or fix a bug, please open an issue first to discuss it. This is mainly to avoid duplicate work and to make sure that your contribution is in line with the project's goals. The LM Studio team is available to chat in the #dev-chat channel within the LM Studio Discord server.
Developing lms requires Node.js 18.6.0
- Fork this repository
- Clone your fork:
git clone git@github.com:lmstudio-ai/lmstudio-cli.gitonto your local development machine - Run
npm installto install the dependencies - Run
npm run watchto start the development server - Go to
distfolder and runnode ./index.js <subcommand>to test your changes
-
How does
lmscommunicate with LM StudioFor the most part,
lmscommunicates with LM Studio through thelmstudio.jsSDK. You can find the source code for the SDK here.lmstudio.jsis in pre-release public alpha and it does not yet have a stable API.There are some commands (such as
lms server startorlms server stop) that need to interact with LM Studio separately from the API server state. In such cases,lmsuses an internal file system based “communication” scheme. You can find the related code here. Note, if you are developing your own software, please do not rely on this API as it is subject to change. Relying on this API is guaranteed to cause sadness. -
How are the lms binaries built
As you may have noticed, the
lmscommand line tool shipped with LM Studio is a single binary file.The binary is built in our lmstudio.js mono-repo. This is done so that we can manage the versions of the
lmscommand line tool and thelmstudio.jslibrary together.
If you have any other questions, feel free to join the LM Studio Discord server and ask in the #dev-chat channel.
Yes, yes we are. Please see our careers page: https://lmstudio.ai/careers.