# 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.18.1 via npm; verified 2026-03-17.

## 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.18.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.18.1.tgz>
- **Issue tracker:** <https://github.com/withcatai/node-llama-cpp/issues>
- **Published:** 2026-03-17T08:38:18.502Z
- **Last updated:** 2026-03-17T08:38:18.502Z
- **Generated:** 2026-07-08T07:18:31+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-07-08
- Package-manager version: 3.18.1
- Package-manager updated: 2026-03-17
- 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. Nucleus 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.18.1
- **Version Count:** 135
- **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-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-w0zfuy/IKS2fhrbed5SylZDXJHTVz4HnkwZ4UrFPgSNwJab3QIPwIl4lyCKHHy9flLrtxsAuV5kXfH3HZ6bb8w==
- **Shasum:** 29f5edfaea8dfac56439f957378248af3bf37e5a
- **Unpacked Size:** 32,332,515
- **File Count:** 0
- **Created At:** 2023-08-10T19:28:17.078Z
- **Latest Published At:** 2026-03-17T08:38:18.502Z
- **Modified At:** 2026-03-17T08:38:18.839Z


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Matched curated package taxonomy and local package facts.
- [ipull](https://www.automicvault.com/pkg/npm/ipull/) - Local package facts share a topical domain. Shared terms: ansi, async, async-retry, bytes, chalk.
- [cmake-js](https://www.automicvault.com/pkg/npm/cmake-js/) - Both packages touch the same language runtime or ecosystem. Shared terms: addon, api, bindings, cmake, cmake-js.
- [node-gyp](https://www.automicvault.com/pkg/npm/node-gyp/) - Both packages touch the same language runtime or ecosystem. Shared terms: addon, bindings, env, log, node.

## Sources

- Nucleus package database
- package-page enrichment
- package version freshness
- package relationship graph
- cross-ecosystem install command graph
