LM StudioLM Studio

Using npm Dependencies

How to use npm packages in LM Studio plugins

Ask Bionic to read this page

Copy this prompt, open Bionic, and paste it into a new chat.

Read https://lmstudio.ai/docs/typescript/plugins/dependencies, I want to ask questions about it.

Add dependencies to your plugin with npm

LM Studio plugins supports npm packages. You can just install them using npm install.

When the plugin is installed, LM Studio will automatically download all the required dependencies that are declared in package.json and package-lock.json. (The user does not need to have Node.js/npm installed.)

postinstall scripts

For safety reasons, we do not run postinstall scripts. Thus please make sure you are not using any npm packages that require postinstall scripts to work.

Using Other Package Managers

Since we rely on package-lock.json, lock files produced by other package managers will not work. Thus we recommend only using npm when developing LM Studio plugins.