{"id":25929419,"url":"https://github.com/lmstudio-ai/lmstudio-js","last_synced_at":"2026-01-17T04:34:01.861Z","repository":{"id":279668556,"uuid":"691898483","full_name":"lmstudio-ai/lmstudio-js","owner":"lmstudio-ai","description":"LM Studio TypeScript SDK","archived":false,"fork":false,"pushed_at":"2026-01-14T23:17:37.000Z","size":3225,"stargazers_count":1455,"open_issues_count":74,"forks_count":222,"subscribers_count":28,"default_branch":"main","last_synced_at":"2026-01-14T23:25:25.881Z","etag":null,"topics":["llm","lm-studio","lmstudio","nodejs","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@lmstudio/sdk","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lmstudio-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-15T06:05:04.000Z","updated_at":"2026-01-09T22:42:20.000Z","dependencies_parsed_at":"2026-01-14T21:03:46.096Z","dependency_job_id":null,"html_url":"https://github.com/lmstudio-ai/lmstudio-js","commit_stats":null,"previous_names":["lmstudio-ai/lmstudio-js"],"tags_count":74,"template":false,"template_full_name":null,"purl":"pkg:github/lmstudio-ai/lmstudio-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmstudio-ai%2Flmstudio-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmstudio-ai%2Flmstudio-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmstudio-ai%2Flmstudio-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmstudio-ai%2Flmstudio-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lmstudio-ai","download_url":"https://codeload.github.com/lmstudio-ai/lmstudio-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmstudio-ai%2Flmstudio-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28495182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["llm","lm-studio","lmstudio","nodejs","typescript"],"created_at":"2025-03-03T22:02:02.941Z","updated_at":"2026-01-17T04:34:01.853Z","avatar_url":"https://github.com/lmstudio-ai.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \n  \u003cpicture\u003e \n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/lmstudio-ai/lmstudio.js/assets/3611042/dd0b2298-beec-4dfe-9019-7d4dc5427e40\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/lmstudio-ai/lmstudio.js/assets/3611042/70f24e8f-302b-465d-8607-8c3f36cd4934\"\u003e\n    \u003cimg alt=\"lmstudio javascript library logo\" src=\"https://github.com/lmstudio-ai/lmstudio.js/assets/3611042/70f24e8f-302b-465d-8607-8c3f36cd4934\" width=\"290\" height=\"86\" style=\"max-width: 100%;\"\u003e\n  \u003c/picture\u003e\n  \n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003ccode\u003eUse local LLMs in TypeScript\u003c/code\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003ci\u003eLM Studio Client SDK\u003c/i\u003e\u003c/p\u003e\n\n`lmstudio-js` is LM Studio's official JavaScript client SDK, written in TypeScript. It allows you to\n\n- Use LLMs to [respond in chats](https://lmstudio.ai/docs/typescript/llm-prediction/chat-completion) or predict [text completions](https://lmstudio.ai/docs/typescript/llm-prediction/completion)\n- Define functions as tools, and turn LLMs into [autonomous agents](https://lmstudio.ai/docs/typescript/agent/act) that run completely locally\n- [Load](https://lmstudio.ai/docs/typescript/manage-models/loading), [configure](https://lmstudio.ai/docs/typescript/llm-prediction/parameters), and [unload](https://lmstudio.ai/docs/typescript/manage-models/loading) models from memory\n- Supports both browser and any Node-compatible environments\n- Generate embeddings for text, and more!\n\n\u003e Using python? See [lmstudio-python](https://github.com/lmstudio-ai/lmstudio-python)\n\n## Installation\n\n```bash\nnpm install @lmstudio/sdk --save\n```\n\n## Quick Example\n\n```ts\nimport { LMStudioClient } from \"@lmstudio/sdk\";\nconst client = new LMStudioClient();\n\nconst model = await client.llm.model(\"llama-3.2-1b-instruct\");\nconst result = await model.respond(\"What is the meaning of life?\");\n\nconsole.info(result.content);\n```\n\nFor more examples and documentation, visit [lmstudio-js docs](https://lmstudio.ai/docs/typescript).\n\n## Why use `lmstudio-js` over `openai` sdk?\n\nOpen 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:\n\n- Managing loading and unloading models from memory\n- Configuring load parameters (context length, gpu offload settings, etc.)\n- Speculative decoding\n- Getting information (such as context length, model size, etc.) about a model\n- ... and more\n\nIn 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.\n\n## Contributing\n\nYou can build the project locally by following these steps:\n\n```bash\ngit clone https://github.com/lmstudio-ai/lmstudio-js.git --recursive\ncd lmstudio-js\nnpm install\nnpm run build\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for more information.\n\n## Community\n\n\u003cp\u003eDiscuss all things lmstudio-js in \u003ca href=\"https://discord.gg/aPQfnNkxGC\"\u003e#dev-chat\u003c/a\u003e in LM Studio's Community Discord server.\u003c/p\u003e\n\u003ca href=\"https://discord.gg/aPQfnNkxGC\"\u003e\u003cimg alt=\"Discord\" src=\"https://img.shields.io/discord/1110598183144399058?logo=discord\u0026style=flat\u0026logoColor=white\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmstudio-ai%2Flmstudio-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flmstudio-ai%2Flmstudio-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmstudio-ai%2Flmstudio-js/lists"}