# Install node-llama-cpp with npm

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. Version 3.19.1 via npm; verified 2026-07-20.

## Install

```sh
sudo av install npm:node-llama-cpp
```

Additional install commands:

### Portable and language managers

- npm (100%):

```sh
npm install -g node-llama-cpp
```

  Evidence: local npm package metadata

## Package facts

- **Package key:** npm:node-llama-cpp
- **Package manager:** npm
- **Package manager page:** <https://www.npmjs.com/package/node-llama-cpp>
- **Version:** 3.19.1
- **Source summary:** 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
- **Homepage:** <https://node-llama-cpp.withcat.ai>
- **Repository:** <https://github.com/withcatai/node-llama-cpp>
- **Upstream docs:** <https://node-llama-cpp.withcat.ai>
- **License:** MIT
- **Source archive:** <https://registry.npmjs.org/node-llama-cpp/-/node-llama-cpp-3.19.1.tgz>
- **Issue tracker:** <https://github.com/withcatai/node-llama-cpp/issues>
- **Published:** 2026-07-20T22:04:20.821Z
- **Last updated:** 2026-07-20T22:04:20.821Z
- **Generated:** 2026-08-04T22:13:35+00:00

## Executables

- nlc (cli)
- node-llama-cpp (cli)
- node-llama-cpp (alias)

## Dependencies

- @huggingface/jinja
- async-retry
- bytes
- chalk
- chmodrp
- cmake-js
- cross-spawn
- env-var
- filenamify
- fs-extra
- ignore
- ipull
- is-unicode-supported
- lifecycle-utils
- log-symbols
- nanoid
- node-addon-api
- ora
- pretty-ms
- proper-lockfile
- semver
- simple-git
- slice-ansi
- stdout-update
- strip-ansi
- validate-npm-package-name
- which
- yargs

## Build dependencies

- @commitlint/cli
- @commitlint/config-conventional
- @eslint/compat
- @fontsource/inter
- @nolebase/vitepress-plugin-git-changelog
- @nolebase/vitepress-plugin-og-image
- @resvg/resvg-js
- @semantic-release/exec
- @semantic-release/github
- @semantic-release/npm
- @shikijs/vitepress-twoslash
- @stylistic/eslint-plugin
- @types/async-retry
- @types/bytes
- @types/cross-spawn
- @types/fs-extra
- @types/node
- @types/proper-lockfile
- @types/semver
- @types/validate-npm-package-name
- @types/which
- @types/yargs
- @vitest/coverage-v8
- @vitest/ui
- electron
- eslint
- eslint-import-resolver-typescript
- eslint-plugin-import
- eslint-plugin-jsdoc
- eslint-plugin-n
- feed
- husky
- rehype
- rimraf
- semantic-release
- sharp
- tslib
- typedoc
- typedoc-plugin-markdown
- typedoc-plugin-mdn-links
- typedoc-vitepress-theme
- typescript
- typescript-eslint
- vite-node
- vitepress
- vitepress-plugin-llms
- vitest
- zx

## Install behavior

- Post-install hook: defined
- Lifecycle scripts: postinstall, prepare
- Bottle: not available

## Freshness

- Page generated: 2026-08-04
- Package-manager version: 3.19.1
- Package-manager updated: 2026-07-20
- Local data: ok
- Upstream repository: https://github.com/withcatai/node-llama-cpp
- info: No cached GitHub release or tag data was available.

## Security Notes

No matching local secret-handling manifest was found for node-llama-cpp. Package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

- **Source Database:** npm registry
- **Dist Tags:** Beta: 3.0.0-beta.47, Latest: 3.19.1
- **Version Count:** 137
- **Maintainers:** giladgd
- **Author:** Gilad S.
- **Publisher:** GitHub Actions
- **Engines:** Node: >=20.0.0
- **Peer Dependencies:** typescript
- **Optional Dependencies:** @node-llama-cpp/linux-arm64, @node-llama-cpp/linux-armv7l, @node-llama-cpp/linux-riscv64, @node-llama-cpp/linux-x64, @node-llama-cpp/linux-x64-cuda, @node-llama-cpp/linux-x64-cuda-ext, @node-llama-cpp/linux-x64-vulkan, @node-llama-cpp/mac-arm64-metal, @node-llama-cpp/mac-x64, @node-llama-cpp/win-arm64, @node-llama-cpp/win-x64, @node-llama-cpp/win-x64-cuda, @node-llama-cpp/win-x64-cuda-ext, @node-llama-cpp/win-x64-vulkan
- **Funding:** <https://github.com/sponsors/giladgd>
- **Integrity:** sha512-i3yq1IHSg+ugdl78/noPeYvtMFIMBaW10nWl0KIXoES9P7HCnrKT3yhpO4p08bib7YJ1boFdnibg8znOILzpCA==
- **Shasum:** 8a04fa57ee4917bab9a8b5251749b49792dcf14b
- **Unpacked Size:** 37,487,356
- **File Count:** 0
- **Created At:** 2023-08-10T19:28:17.078Z
- **Latest Published At:** 2026-07-20T22:04:20.821Z
- **Modified At:** 2026-07-20T22:04:21.153Z


## Related links

- [AI and agent packages](https://pkg.so/ai-agent-tools/) - Matched curated package taxonomy and local package facts.
- [ipull](https://pkg.so/npm/ipull/) - Local package facts share a topical domain. Shared terms: ansi, async, async-retry, bytes, chalk.
- [llama.cpp](https://pkg.so/brew/llama-cpp/) - Local package facts share a topical domain. Shared terms: ai, cli, cpp, embedding, gguf.
- [ollama](https://pkg.so/brew/ollama/) - Local package facts share a topical domain. Shared terms: ai, api, cli, llm, local.

## Sources

- pkg.so package database
- package-page enrichment
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- cross-ecosystem install command graph
