Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

node-llama-cpp

> AI 编程
Open source

Run AI models locally on your machine with node.js bindings for llama.cpp. Enforce a JSON schema on the model output on the generation level

2.1K stars0 likes0 views
WebsiteGitHub

About

Run AI models locally on your machine with node.js bindings for llama.cpp. Enforce a JSON schema on the model output on the generation level

✨ Gemma 4 is here! ✨

Features

  • Run LLMs locally on your machine
  • Metal, CUDA and Vulkan support
  • Pre-built binaries are provided, with a fallback to building from source without node-gyp or Python
  • Adapts to your hardware automatically, no need to configure anything
  • A Complete suite of everything you need to use LLMs in your projects
  • Use the CLI to chat with a model without writing any code
  • Up-to-date with the latest llama.cpp. Download and compile the latest release with a single CLI command
  • Enforce a model to generate output in a parseable format, like JSON, or even force it to follow a specific JSON schema
  • Provide a model with functions it can call on demand to retrieve information or perform actions
  • Embedding and reranking support
  • Safe against special token injection attacks
  • Great developer experience with full TypeScript support, and complete documentation
  • Much more

Documentation

  • Getting started guide
  • API reference
  • CLI help
  • Blog
  • Changelog
  • Roadmap

Try It Without Installing

Chat with a model in your terminal using a single command:

npx -y node-llama-cpp chat

Installation

npm install node-llama-cpp

This package comes with pre-built binaries for macOS, Linux and Windows.

If binaries are not available for your platform, it'll fallback to download a release of llama.cpp and build it from source with cmake. To disable this behavior, set the environment variable NODE_LLAMA_CPP_SKIP_DOWNLOAD to true.

Usage

…

For more examples, see the getting started guide

Contributing

To contribute to node-llama-cpp read the contribution guide.

Acknowledgements

  • llama.cpp: ggml-org/llama.cpp

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptaibindingscataicmake

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.