Sovereign 8s.is mirror of standardgalactic/lmstudio-js
  • TypeScript 98.2%
  • JavaScript 0.9%
  • Shell 0.6%
  • PowerShell 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-04-15 15:09:54 -04:00
.github/workflows Add CLA bot (#235) 2025-02-26 16:09:58 -05:00
.vscode Artifact dependencies (#283) 2025-04-01 15:23:16 -04:00
packages Fix test type error (#584) 2026-04-15 15:09:54 -04:00
patches Patch ink (#502) 2025-12-24 14:23:17 -05:00
publish Download Planner unification (#572) 2026-04-01 10:50:34 -04:00
scaffolds @Release-55 2025-08-14 12:10:36 -04:00
scripts Add support for turborepo (#349) 2025-06-26 16:31:24 -04:00
.eslintrc.json Adds esm support. (#128) 2024-11-26 11:50:54 -05:00
.gitignore lms w/ ink using bun (#475) 2025-11-26 18:29:55 -05:00
.gitmodules Update URL for lms cli git submodule (#345) 2025-06-23 13:37:35 -04:00
.npmrc initial commit 2024-04-13 15:04:12 -04:00
.nvmrc update lms-cli to node 25.5.0; use deno for linux aarch64 (#556) 2026-03-17 13:08:31 -04:00
.prettierrc.json First wave of automated tests with an actual LLM (#234) 2025-02-26 15:00:25 -05:00
CONTRIBUTING.md Create CONTRIBUTING.md 2025-02-26 13:22:33 -05:00
jest.config.js First wave of automated tests with an actual LLM (#234) 2025-02-26 15:00:25 -05:00
jestSnapshotResolver.js First wave of automated tests with an actual LLM (#234) 2025-02-26 15:00:25 -05:00
lerna.json lms create 2024-04-25 10:27:00 -04:00
LICENSE Switch LICENSE to MIT (from Apache 2.0) 2025-02-26 13:29:26 -05:00
package-lock.json update lms-cli to node 25.5.0; use deno for linux aarch64 (#556) 2026-03-17 13:08:31 -04:00
package.json update lms-cli to node 25.5.0; use deno for linux aarch64 (#556) 2026-03-17 13:08:31 -04:00
README.md Quick cleanup in README 2025-11-23 23:15:55 -05:00
release.sh @Release-44 2025-01-24 16:57:06 -05:00
tsconfig.build.json Adds esm support. (#128) 2024-11-26 11:50:54 -05:00
tsconfig.cjs.json Adds esm support. (#128) 2024-11-26 11:50:54 -05:00
tsconfig.esm.json Adds esm support. (#128) 2024-11-26 11:50:54 -05:00
tsconfig.json lms w/ ink using bun (#475) 2025-11-26 18:29:55 -05:00
tsconfig.types.json Adds esm support. (#128) 2024-11-26 11:50:54 -05:00
turbo.json Add support for turborepo (#349) 2025-06-26 16:31:24 -04:00

lmstudio javascript library logo

Use local LLMs in TypeScript

LM Studio Client SDK

lmstudio-js is LM Studio's official JavaScript client SDK, written in TypeScript. It allows you to

Using python? See lmstudio-python

Installation

npm install @lmstudio/sdk --save

Quick Example

import { LMStudioClient } from "@lmstudio/sdk";
const client = new LMStudioClient();

const model = await client.llm.model("llama-3.2-1b-instruct");
const result = await model.respond("What is the meaning of life?");

console.info(result.content);

For more examples and documentation, visit lmstudio-js docs.

Why use lmstudio-js over openai sdk?

Open AI's SDK is designed to use with Open AI's proprietary models. As such, it is missing many features that are essential for using LLMs in a local environment, such as:

  • Managing loading and unloading models from memory
  • Configuring load parameters (context length, gpu offload settings, etc.)
  • Speculative decoding
  • Getting information (such as context length, model size, etc.) about a model
  • ... and more

In addition, while openai sdk is automatically generated, lmstudio-js is designed from ground-up to be clean and easy to use for TypeScript/JavaScript developers.

Contributing

You can build the project locally by following these steps:

git clone https://github.com/lmstudio-ai/lmstudio-js.git --recursive
cd lmstudio-js
npm install
npm run build

See CONTRIBUTING.md for more information.

Community

Discuss all things lmstudio-js in #dev-chat in LM Studio's Community Discord server.

Discord