npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@qvac/cli

v0.22.0

Published

Command-line interface for the QVAC ecosystem

Downloads

9,190

Readme

QVAC CLI

A command-line interface for the QVAC ecosystem. QVAC CLI provides tooling for building, bundling, and managing QVAC-powered applications.

This package is published to npm as @qvac/cli and lives in the QVAC monorepo at packages/cli. Older instructions may refer to the deprecated qvac-cli package name—use @qvac/cli instead.

Table of Contents

Installation

Install globally:

npm i -g @qvac/cli

Once installed, use the qvac command:

qvac <command>

Or run directly via npx:

npx @qvac/cli <command>

Command Reference

doctor

Validate that the current host can run @qvac/sdk + @qvac/cli before you hit runtime errors. The command prints a human-readable report by default and exits 1 when any required check fails.

qvac doctor [options]

Options:

| Flag | Description | | --------------- | ----------------------------------------------------------------- | | --deep | Start the installed SDK worker and verify its heartbeat. | | --json | Output the report as JSON. | | -q, --quiet | Suppress stdout — only set the exit code. | | -v, --verbose | Include bounded worker stdout/stderr when a deep check fails. | | --offline | Skip GitHub and npm registry lookups in the engines.bare check. |

What it checks:

  • Runtime — Node.js version (^22.21.0 || >=24.9.0; bundling needs Node 22.21+ on the 22 line or 24.9+) and supported CLI host (desktop platforms only; Android/iOS are SDK deploy targets reported separately below).
  • Hardware — total RAM, available RAM (via os.availableMemory() on Node 22+), GPU acceleration (Metal on macOS, vulkaninfo on Linux/Windows), and free disk space in the current working directory.
  • Deploy targets (SDK) — desktop target matrix, Android (adb), and iOS (xcodebuild on macOS). Missing mobile toolchains produce warnings, not failures.
  • Optional tools — ffmpeg (microphone/transcription) and the Bare runtime.
  • Project — whether @qvac/sdk is resolvable from the current working directory (works for hoisted monorepo installs too), and, for a project with react-native-bare-kit, whether every package's engines.bare accepts the Bare that Bare Kit runs on Android and on iOS, as pinned by the SDK's bare-stow. Other projects are checked against the Bare of the project's bare-sidecar. Reads the bundle in qvac/worker/ when present (exactly what ships), otherwise node_modules. On a mismatch it fails and prints, per package, an override that pins a release that runs on that Bare. See Bare runtime detection for where the version comes from.
  • SDK runtime (--deep) — starts the installed SDK in an isolated Node.js process, performs a worker heartbeat, and closes it. The probe is bounded to 75 seconds and classifies common Bare, native library, CPU instruction, Vulkan, and worker-handshake failures. When --deep is requested, a missing SDK, failed heartbeat, or failed cleanup causes exit code 1.

See system-requirements.md for the full list of thresholds and rationale.

Examples:

# Human-readable report
qvac doctor

# Exercise SDK worker startup without loading a model
qvac doctor --deep

# JSON for CI / scripts
qvac doctor --json

# Fail-fast in a script (exit 1 on any required check)
qvac doctor --quiet || exit 1

fit

Check whether one model, or several loaded together, fit this machine's memory before anything is downloaded. Each model's engine fitter runs against the registry's weightless description of the model, tens of KB, or against the model's own files when it is already downloaded. The answer is the one POST /qvac/v1/models/fit gives for the same input.

qvac fit [options] [models...]

Each model is an SDK model constant name, such as QWEN3_8B_INST_Q4_K_M, or a serve.models alias from the config file.

Options:

| Flag | Description | | ---------------------------- | --------------------------------------------------------------------------------------------------- | | --set <[target:]key=value> | Config to judge with, for one model or model type, or for every model without a target. Repeatable. | | --catalog | Judge every SDK model on its own, and list the models with no verdict apart, each with its reason. | | --json | Output the answer as JSON, in the shape the models/fit route returns. | | -c, --config <path> | Config file with serve.models aliases (default: auto-detect qvac.config.*). |

A --set target is a model, or a model type such as llamacpp-completion for every model of that type. A model's own setting wins over its type's, and its type's over one for every model. A dotted key nests (contextParams.n_ctx=4096). A value is read as JSON when it parses (8192, true, ["a"]) and as a string otherwise. A companion source, such as projectionModelSrc, names an SDK model constant.

Output: each model's verdict alone, the context and GPU layers a language model was judged at, and the memory it takes on each device against what is free. An unknown model shows why it has no verdict, and a model whose devices each fit but overflow the pool they share names that pool. Then the verdict, with what the models take from each memory pool: for one model its own, for several all of them loaded together. A Metal GPU and the CPU share one pool, the host's memory.

Exit status: 0 fits, 2 does not fit, 3 unknown, 1 error. Catalog mode exits 0 once every model is judged.

What to pass:

  • A language model is judged at the SDK's default context of 1024 tokens unless ctxSize is set. --set ctxSize=0 reports the longest context that fits.
  • A model made of several parts needs its companion files and engine in its config: a TTS model needs ttsEngine, a translation model its engine and a language pair (from, to). A translation model is judged once downloaded.
  • A companion file on its own, such as a projector, VAE or codec, cannot be judged. It fails with MODEL_FIT_REJECTED; judge the model that loads it. The error is followed by a hint, and catalog mode lists these models under their own heading.

Examples:

# One model at 8K context
qvac fit QWEN3_8B_INST_Q4_K_M --set ctxSize=8192

# Two models loaded together, the larger at the longest context that fits
qvac fit QWEN3_8B_INST_Q4_K_M QWEN3_600M_INST_Q4 --set QWEN3_8B_INST_Q4_K_M:ctxSize=0

# A translation model with its language pair
qvac fit BERGAMOT_DE_EN --set engine=Bergamot --set from=de --set to=en

# Every SDK model, language models at the longest context that fits, as JSON
qvac fit --catalog --set llamacpp-completion:ctxSize=0 --json

storage

List the apps that keep QVAC storage on this machine, and remove what is no longer used. Model files are shared by every app. Each app links the models it uses, and a model leaves the disk only once no app links it. The CLI itself runs as the app @qvac/cli.

qvac storage                          # every app with its models, then models no app links
qvac storage remove-app my-old-app    # its links, KV caches and registry stores
qvac storage remove-model <model>     # a model for every app, named as the listing shows it
qvac storage remove-partials          # partial downloads nobody is writing

| Flag | Description | | -------------------- | ----------------------------------------------------------------------------------- | | --force | remove-app, remove-model: also act on running apps. Loaded models stay | | --models-dir <dir> | remove-model: the model's custom models folder, which the listing shows beside it | | --json | Output the result as JSON |

Nothing is removed while any app is downloading a model; run the command again once the download ends.

Apps on SDK 0.24 and earlier kept their KV caches and registry stores directly under ~/.qvac, in kv-cache/, kv-cache-dir-ids/, registry-corestore/ and corestore/. qvac storage does not list them. Once no app on those versions is left, delete those four folders by hand.

configure

Interactively build a qvac.config.json with a starter serve.models, so you can go straight to qvac serve --openai. It searches the models the SDK provides — by name or by capability (role, addon, quantization) — and on a wide terminal previews, for the highlighted result, the exact serve.models entry it would produce. Pick a model, rename its alias, set config parameters (guided by the SDK's config schema — each field shows its type and description and is validated on entry, for model types the SDK exposes a schema for; currently llama.cpp chat + embedding + decision), and (with $EDITOR) tweak the entry and review the result before adding it. Press Esc (or choose Back) to step back one menu; Ctrl+C aborts without writing. Existing entries are preserved; re-running is idempotent per model.

qvac configure                 # interactive
qvac configure --yes           # non-interactive: write a chat + transcription starter
qvac configure --modality chat --modality image
qvac configure --modality decision

| Flag | Description | | --------------------- | ------------------------------------------------------------------------------------------------------------------------ | | -c, --config <path> | Config file to write (default: ./qvac.config.json). JSON only. | | -y, --yes | Non-interactive: write a sensible default starter (chat + transcription). | | --modality <name> | Non-interactive: add a modality (repeatable) — chat / embedding / transcription / speech / image / decision. | | --force | Re-add a model that is already configured (overwrites its existing entry in place). | | -q, --quiet | Suppress output. |

Single-artifact modalities (chat, embedding, transcription, image, decision) are runnable as written. Text-to-speech is emitted as a best-effort example with a referenceAudioSrc placeholder — set it to a real .wav and see the linked TTS docs to finish. Runs in a terminal; for non-TTY use --yes / --modality.

bundle sdk

Generate a tree-shaken Bare worker bundle containing the plugins you select (defaults to all built-in plugins).

qvac bundle sdk [options]

What it does:

  1. Reads qvac.config.* from your project root (if present)
  2. Resolves enabled plugins from the plugins array (defaults to all built-in plugins if omitted)
  3. Writes the worker entry qvac/worker.entry.mjs with static imports only
  4. Finds the platform packages that the split addons the bundle reaches need for each host (for example @qvac/fabric-android-arm64 or @qvac/tts-ggml-android-arm64). A split addon's binding.js is require('#host-addon'), so it cannot be bundled for a host whose platform package is missing. For phone hosts (android-arm64, ios-*), it adds the missing ones to package.json with your project's package manager (npm 7+, pnpm, bun, or Yarn Berry), pinned to the addon's exact version; skip that with --no-install. A missing package it cannot install, including another desktop host's, fails the bundle with HOST_PREBUILDS_MISSING, naming the dependencies to add.
  5. Bundles the entry with bare-stow for the --target, replacing qvac/worker/ with bare-stow's harness package. The bundle imports bare-stow-runtime, so the bundle fails with BUNDLE_FAILED when the project cannot resolve it. The module that starts the bundle imports bare-stow-host, plus bare-sidecar for bare-sidecar or react-native-bare-kit for react-native
  6. Verifies the bundle and fails with BUNDLE_VERIFICATION_FAILED on its errors. For the react-native target, an engines.bare mismatch against the Bare that Bare Kit runs on Android or iOS only prints a warning with fixes (see verify bundle)
  7. For the react-native target, writes Bare Kit and the native addons the worker loads into android/qvac-bare-kit and ios/QvacBareKit (iOS on macOS only). The Expo plugin adds them to the app's native projects; a React Native app without Expo adds them itself (see the SDK docs)

Options:

| Flag | Description | | --------------------- | ------------------------------------------------------------------------------------------------------------------ | | --config, -c <path> | Config file path (default: auto-detect qvac.config.*) | | --target <target> | Where the worker runs: bare-sidecar (Node.js, Electron; default), react-native (Expo) or pear-runtime (Pear) | | --language <lang> | Language of the app that starts the worker: javascript (default) or python | | --host <host> | Host to bundle for (repeatable). Defaults to this machine, or every phone host for react-native | | --defer <module> | Defer a module (repeatable) | | --ios-engine <name> | Engine for the iOS worker with react-native: javascriptcore (default) or v8 (needs an entitlement) | | --no-install | Do not install missing addon platform packages for phone hosts | | --quiet, -q | Minimal output | | --verbose, -v | Detailed output | | --offline | Skip GitHub and npm registry lookups in the engines.bare check |

Examples:

# Bundle for this machine
qvac bundle sdk

# Bundle for React Native and write Bare Kit and the addons into android/ and ios/
qvac bundle sdk --target react-native

# Run the iOS worker on V8 instead of JavaScriptCore. The app must carry the
# com.apple.developer.kernel.extended-virtual-addressing entitlement, which free
# Apple developer accounts cannot sign with.
qvac bundle sdk --target react-native --ios-engine v8

# Bundle for a Python app, which starts it with Client(worker_path="qvac/worker")
qvac bundle sdk --language python

# Use a custom config file
qvac bundle sdk --config ./my-config.json

# Verbose output for debugging
qvac bundle sdk --verbose

Output:

| File | Description | | ----------------------------- | --------------------------------------------------------------------- | | qvac/worker.entry.mjs | Worker entry that registers the selected plugins | | qvac/worker/index.js | Starts the bundled worker, with index.d.ts and package.json | | qvac/worker/index.bundle | The worker bundle (index.bundle.mjs for react-native) | | qvac/worker/index.bundle.d/ | Native addons the bundle loads, for bare-sidecar and pear-runtime |

With --language python, qvac/worker/ holds bare-stow's Python package instead: worker/__init__.py starts the bundle, which sits beside it with the addons it loads, and pyproject.toml names its dependencies.

Note: Your project must have @qvac/sdk installed.

verify deps

Detect native Bare addon package changes between two git refs by comparing npm package-lock.json contents.

qvac verify deps --base <ref> --head <ref> [options]

Both --base and --head are required.

Options:

| Flag | Description | | ------------------- | --------------------------------------------------------------- | | --base <ref> | Base git ref or SHA. | | --head <ref> | Head git ref or SHA. | | --lockfile <path> | Path to npm package-lock.json (default: package-lock.json). | | --quiet, -q | Suppress output when there are no native changes. |

Examples:

# Local fork checkout
qvac verify deps --base upstream/main --head HEAD

# Direct clone where origin points at the canonical repo
qvac verify deps --base origin/main --head HEAD

# Package with a nested npm lockfile
qvac verify deps --base upstream/main --head HEAD --lockfile packages/sdk/package-lock.json

Exit codes:

| Exit | Meaning | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 0 | No native addon changes, or no npm lockfile exists at either ref. | | 1 | Native addon additions or removals were detected, or a removed package's native status could not be determined. Reviewers should confirm the change is intentional. | | 2 | Tool error (missing required args, unsupported lockfile, git ref could not be resolved, lockfile read or parse failure, etc.). The check did not complete and no judgment about native dependency changes can be made. |

CI guardrails should treat 1 and 2 differently: 1 means "real native change to confirm", 2 means "infrastructure/usage problem to fix".

Detection Capabilities:

  • Supports npm package-lock.json only.
  • Yarn, Bun, and pnpm lockfiles are not parsed yet.
  • Native packages are identified by reading installed node_modules/<pkg>/package.json and checking for top-level "addon": true, so run from a checkout with dependencies installed for the head under review.
  • Removed lockfile packages whose package.json is unavailable are reported with unknown native status so reviewers can inspect them.
  • Packages with unreadable metadata are reported as warnings only when native addon changes are also reported.

verify bundle

Verify that every native Bare addon reachable from a generated worker bundle or an installed node_modules tree has prebuilds for the requested host(s). For Android and iOS hosts, it also checks every declared engines.bare range against the Bare that Bare Kit runs on that platform, as pinned by the SDK's bare-stow. Desktop hosts are checked against the Bare of the project's bare-sidecar. For a bundle that qvac bundle sdk wrote for the pear-runtime target, they are checked against the bare-sidecar that pear-runtime resolves, and for the bare-kit target, against bare-kit-kotlin as bare-stow pins it. The target is read from the package.json next to the bundle.

qvac verify bundle --addons-source <path> --host <target> [--host <target>...] [options]

--addons-source may be either the bundle qvac bundle sdk writes to qvac/worker/ (index.bundle, or index.bundle.mjs for react-native) or a node_modules directory. The source kind is detected automatically: files are parsed as bare-pack bundles, directories are walked as node_modules trees.

Options:

| Flag | Description | | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | --addons-source <path> | Required. Path to a worker bundle in qvac/worker/ or a node_modules directory. | | --host <target> | Repeatable. At least one host required. Examples: android-arm64, ios-arm64, ios-arm64-simulator, ios-x64-simulator, darwin-arm64, linux-x64, win32-x64. | | --offline | Optional. Make no network requests: no GitHub lookup for a Bare Kit release missing from the built-in tables, and no npm registry lookup for override suggestions. | | --project-root <path> | Optional. Project root used to resolve bundle resolutions and detect the package manager for override suggestions (default: cwd). | | --json | Optional. Output the verification result as JSON instead of the human-readable summary. Useful for CI scripts and downstream tooling. | | --quiet, -q | Suppress the success summary; failures and warnings are always printed. Ignored when --json is set. |

Examples:

# Mobile bundle, after `qvac bundle sdk --target react-native`
qvac verify bundle --addons-source qvac/worker/index.bundle.mjs \
  --host android-arm64 \
  --host ios-arm64 \
  --host ios-arm64-simulator \
  --host ios-x64-simulator

# Desktop / Electron dev tree
qvac verify bundle --addons-source ./node_modules \
  --host darwin-arm64 --host linux-x64 --host win32-x64

# Packaged Electron app's bundle (checks the addons it loads against the project's installed packages)
qvac verify bundle \
  --addons-source out/MyApp-darwin-arm64/MyApp.app/Contents/Resources/app/qvac/worker/index.bundle \
  --host darwin-arm64

# Structured output for CI consumers
qvac verify bundle --addons-source qvac/worker/index.bundle \
  --host darwin-arm64 --json | jq '.issues[] | select(.level == "error")'

Exit codes:

| Exit | Meaning | | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 0 | No error-level issues. All required prebuilds are present, and every ABI check that ran passed. Warnings may indicate skipped checks or surfaced metadata problems: engines-mismatch, unknown-runtime-version, malformed-engines-bare, invalid-package-json, or empty-bundle-resolutions. | | 1 | At least one error-level issue: missing-prebuild, abi-mismatch, or invalid-source. |

Issue codes:

| Code | Level | Meaning | | -------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | missing-prebuild | error | No .bare for the host. For an ordinary addon, <packageRoot>/prebuilds/<host>/ is missing or empty; for a split addon (one with a #host-addon map), its per-platform package <addon>-<host> (iOS hosts grouped under <addon>-ios) is not installed or has no prebuilds/<host>/*.bare. | | abi-mismatch | error | The addon's declared engines.bare range does not include the Bare that a requested host runs: Bare Kit's on Android and iOS, and on desktop the bare-sidecar's described above. The issue lists those hosts. | | engines-mismatch | warning | A package that is not an addon declares an engines.bare range that does not include the Bare that a requested Android, iOS or desktop host runs. | | unknown-runtime-version | warning | A package declares engines.bare, but the Bare version of a requested host could not be determined, for example because the Bare Kit binding is missing from the built-in tables and --offline is set, or because no bare-sidecar is installed for a desktop host. | | malformed-engines-bare | warning | An addon's package.json declares an engines.bare value that is not a valid semver range. ABI check is skipped for that addon and warning is surfaced for escalation to the addon maintainer. | | invalid-package-json | warning | An addon package.json could not be parsed (malformed JSON, non-object root, missing name on an addon: true package). The package is treated as a non-addon and its prebuilds/ABI cannot be verified. | | empty-bundle-resolutions | warning | The --addons-source bundle has an empty bare-pack resolutions table. The verifier cannot inspect any addons; a "passed" summary would be vacuous. Regenerate the bundle or check for corruption. | | invalid-source | error | --addons-source does not point to a readable bundle or directory, or --host was empty. |

Bare runtime detection:

Phone apps get Bare from Bare Kit, which the SDK's bare-stow links into the app: bare-kit-kotlin on Android, at the exact version bare-stow pins, and bare-kit-swift on iOS, from the version bare-stow pins or newer. Each platform's ABI checks run against the Bare version compiled into the bare-kit release its binding is built from; for iOS, that is the pinned minimum. If a platform's Bare version cannot be determined, its ABI checks emit a single unknown-runtime-version warning and the exit code stays 0. Prebuild checks always run.

The SDK reads the two pins from lib/target/bare-kit.js in the bare-stow of the project's own @qvac/sdk, then finds the Bare version in this order, and says so before any step that uses the network:

  1. Built-in tables of binding → bare-kit versions and bare-kit → Bare versions, read from each release's CMakeLists.txt. The tables also list the releases whose CMakeLists.txt names no version; those are reported as unknown without a lookup.
  2. For a release missing from the tables: the binding's CMakeLists.txt and the matching bare-kit CMakeLists.txt on raw.githubusercontent.com (up to two requests, 5 s timeout each). Skipped with --offline.

The tables are regenerated with npm run bare-kit-runtimes:generate in packages/sdk, which reads every tag of each repository and probes the releases the tables do not list yet. A failed request stops the run without writing the tables. npm run bare-kit-runtimes:generate -- --full rebuilds them from every release.

Fix suggestions: on an abi-mismatch or engines-mismatch, the summary prints one fix per affected platform. For each failing package it fetches the abbreviated package metadata from registry.npmjs.org (one request per package, 5 s timeout, skipped with --offline) to find the newest release that runs on that platform's Bare and that its dependents accept. Otherwise the fix is an @qvac/sdk release whose bare-stow pins a Bare Kit with a new enough Bare. The override is printed in the syntax of the project's package manager, detected the same way as for the addon platform-package install in bundle sdk: npm overrides, pnpm pnpm.overrides, yarn resolutions, or bun overrides. It is scoped to the accepting dependents when another dependent still requires the current version.

serve

Run an HTTP server backed by locally configured QVAC models (serve.models in qvac.config.*), with an optional OpenAI-compatible extension.

qvac serve --openai [options]

The OpenAI extension includes POST /v1/decisions for local typed decisions. See Decisions API for setup and request examples.

--no-default leaves the QVAC surface out. qvac serve openai is a deprecated alias for qvac serve --openai --no-default.

| Flag | Description | | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | -c, --config <path> | Config file path (default: auto-detect qvac.config.*). | | -p, --port <number> | Port to listen on (default: 11435). | | -H, --host <address> | Host to bind to (default: 127.0.0.1). | | --model <alias> | Force a model alias to preload at startup (repeatable; must be in config). Models not preloaded still load lazily on first request. | | --api-key <key> | Require Bearer authentication. Recommended for every non-loopback bind. | | --api-key-file <path> | Read the Bearer token from a file. Keeps it out of argv, which /proc exposes locally. | | --allow-unauthenticated | Start a non-loopback bind without a key anyway. Warns instead of refusing. | | --cors | Validate that --cors-origin or serve.cors.origins supplies an explicit trusted origin. | | --cors-origin <origin> | Trust an exact HTTP(S) CORS origin (repeatable; wildcard is not allowed). | | --allowed-host <host> | Accept this Host header besides loopback names, IP addresses and the bind host; .example.com covers subdomains (repeatable). | | --allow-any-host | Accept any Host header, turning off DNS-rebinding protection. | | --enable-admin | Allow the admin-only routes (runtime suspend/resume, plugin invoke, fine-tuning jobs). Needs --api-key on a non-loopback bind, even with --allow-unauthenticated. | | --public-base-url <url> | Externally reachable origin required for image response_format=url. | | --docs | Mount Swagger UI at /docs and add same-port loopback CORS origins. | | --no-lazy-load | Disable lazy loading; a request for an unloaded model returns 503 model_not_loaded. | | --load-concurrency <n> | Max simultaneous model loads (default: 1). | | --load-timeout <ms> | Per-load timeout in milliseconds (default: unbounded). | | --no-cancel-load-on-disconnect | Keep loading a model even if the client that triggered the load disconnects. | | -v, --verbose | Detailed output. |

With lazy loading on (the default), the server starts even when some preload models fail; a failed model still loads lazily on the next request. With --no-lazy-load, preloaded models are the only ones that can serve, so if every preload model fails the server exits non-zero instead of listening — under a supervisor (systemd, Docker) that surfaces the failure rather than a running-but-empty server. The worker stderr behind the failure (for example a missing addon) is logged either way.

serve.cors.origins in qvac.config.* and repeatable --cors-origin flags are combined. Origins must be exact HTTP(S) origins without credentials, paths, queries, or fragments. --cors is only a compatibility validation switch and does not enable CORS itself. It fails without an explicit CLI/config origin, including with --docs. Existing --cors scripts must add every trusted origin explicitly:

qvac serve --openai --cors --cors-origin https://app.example.com

Independently, --docs enables CORS for same-port localhost, 127.0.0.1, and [::1], plus the bound host when that host is itself loopback. /openapi.json, /docs, and /docs/* are exempt from bearer authentication. Do not expose docs on a non-loopback bind unless public introspection is acceptable.

A non-loopback --host refuses to start without --api-key or --api-key-file. --allow-unauthenticated downgrades that refusal to a warning, but not for --enable-admin, which always needs a key off loopback.

Every request, /openapi.json included, must carry a Host header naming a loopback host, an IP address, the bind host, the --public-base-url host or an --allowed-host entry; anything else gets 403 host_not_allowed. This stops a web page that rebinds its own domain to 127.0.0.1 from calling the server. Behind a reverse proxy or under a LAN hostname, list that name with --allowed-host or serve.allowedHosts (a leading dot covers the domain and its subdomains); --allow-any-host or "allowedHosts": true turns the check off.

--api-key places the token in the process's command line, which /proc/<pid>/cmdline exposes to every local account on Linux. --api-key-file reads it from an owner-only file instead; the CLI refuses a path that is not a regular file and warns when the file is readable beyond its owner.

The QVAC surface serves POST /qvac/v1/translate: text translation through an NMT alias whose config carries the engine and the from / to languages. text takes one string or an array, and stream: true emits Server-Sent Events. POST /qvac/v1/ocr reads the text in a PNG, JPEG or BMP image through an OCR alias. POST /qvac/v1/classifications ranks the labels for a PNG or JPEG image through a classification alias. /qvac/v1/audio/generations and /qvac/v1/audio/edits generate and edit music as async jobs through an audiogen alias, and POST /qvac/v1/audio/understandings describes a recording. It also serves GET /qvac/v1/system for the host's CPU, memory and GPU capacity, and POST /qvac/v1/models/fit to ask whether serve.models aliases or SDK model constants fit together before they are loaded. And it serves POST /qvac/v1/chat/batch: up to 64 chat prompts decoded together on one LLM alias, returned in prompt order. POST /qvac/v1/images/upscale upscales a PNG or JPEG through an ESRGAN alias loaded with config.mode: "upscale" and returns it in the /v1/images b64_json shape. GET /qvac/v1/registry/models browses and searches the live model registry, read-only. GET /qvac/v1/runtime/state and GET /qvac/v1/runtime/models report the runtime's lifecycle state and loaded models; POST /qvac/v1/runtime/suspend and /resume are admin-only and need --enable-admin. /qvac/v1/vla/* (experimental) predicts robot action chunks from a SmolVLA, π₀.₅ or GR00T alias, reports its hyperparameters, and switches GR00T embodiments. POST /qvac/v1/bci/transcriptions (experimental, admin-only) transcribes a neural-signal recording through a BCI alias, in the /v1/audio/transcriptions shape, with an SSE stream option. POST /qvac/v1/plugins/:name/invoke calls a handler of a custom plugin registered in the worker, admin-only too.

See docs/serve/ for the server reference: shared configuration and model loading, the QVAC surface, and the OpenAI-compatible surface — supported /v1/... routes, multipart request shapes, and how to register models — including whispercpp-audio-translation for POST /v1/audio/translations (Whisper translate-to-English), the volatile POST /v1/responses Responses API with previous_response_id chaining, the diffusion-backed POST /v1/images/generations / POST /v1/images/edits routes (use --public-base-url <origin> to enable response_format=url responses backed by GET /v1/files/{id}/content), and POST /v1/audio/speech (Chatterbox / Supertonic TTS — wav + pcm natively, plus mp3 / opus / aac / flac when ffmpeg is on the server's PATH — with a serve.openai.audio.speech.voices map from OpenAI voice → model alias, and the GET /v1/audio/voices / GET /v1/audio/models discovery endpoints).

Configuration

The CLI reads configuration from qvac.config.{json,js,mjs,ts} in your project root.

If no config file is found, the CLI bundles all built-in plugins.

Note: qvac.config.ts is supported via tsx internally (no user setup required).

This file is primarily the SDK runtime config, but qvac bundle sdk also reads this bundler-only key (ignored by the SDK at runtime):

| Key | Type | Required | Description | | --------- | ---------- | -------- | -------------------------------------------------------------------------------- | | plugins | string[] | No | Module specifiers, each ending with /plugin (defaults to all built-in plugins) |

Custom plugin contract: custom */plugin modules must default-export the plugin object.

Built-in plugins:

@qvac/sdk/llamacpp-completion/plugin
@qvac/sdk/llamacpp-embedding/plugin
@qvac/sdk/whispercpp-transcription/plugin
@qvac/sdk/parakeet-transcription/plugin
@qvac/sdk/nmtcpp-translation/plugin
@qvac/sdk/onnx-tts/plugin
@qvac/sdk/ggml-ocr/plugin
@qvac/sdk/sdcpp-generation/plugin

Example configurations:

// qvac.config.json - LLM only
{
  "plugins": ["@qvac/sdk/llamacpp-completion/plugin"]
}
// qvac.config.json - Multiple plugins
{
  "plugins": [
    "@qvac/sdk/llamacpp-completion/plugin",
    "@qvac/sdk/whispercpp-transcription/plugin",
    "@qvac/sdk/nmtcpp-translation/plugin"
  ]
}

System Requirements

See system-requirements.md for the full list of required and recommended host dependencies. You can validate your environment at any time with:

qvac doctor

Development

Prerequisites:

  • Node.js ^22.21.0 || >=24.9.0
  • npm

Agent-stack test ownership

For tests that touch qvac serve --openai, @qvac/ai-sdk-provider, or agent-tool plugins, see test/AGENT_STACK_E2E.md. It defines which layer owns SDK e2e, CLI contract tests, CLI in-process HTTP e2e, CLI spawned-binary e2e, provider integration, and plugin integration.

The CLI depends on the published @qvac/sdk (^0.24.0), which provides the ./commands subpath that bundle/verify re-export and the server runtime the serve commands use. A normal npm install pulls it from the registry — no local SDK build is required.

Iterating against an in-repo @qvac/sdk build (e.g. when changing the SDK and the CLI together in the monorepo, or against an SDK checked out in a separate worktree):

# Build the SDK first (from its packages/sdk directory)
cd /path/to/qvac/packages/sdk && npm run build

# Point the CLI at the sibling SDK (../sdk) instead of the registry copy
cd packages/cli
npm run dev:link

# Sanity check: path should be inside .../qvac/packages/sdk/dist/commands/
node -e "console.log(require.resolve('@qvac/sdk/commands'))"

Before committing, restore the committed package.json:

npm run dev:unlink

This runs git checkout HEAD -- package.json and re-installs, so the committed @qvac/sdk dependency (^0.24.0) is restored regardless of what you swapped in locally. package-lock.json is gitignored and is regenerated by the trailing npm install.

How CI tests the CLI/SDK pair:

  • PRs into main (and feature-* / tmp-*) build and test the CLI against the in-repo SDK — the source that will ship. CI runs the sdk-source:workspace script (builds packages/sdk and links it via npm install ../sdk), so a CLI change can rely on unreleased SDK code without a published version or any type cast.
  • PRs into release-cli-* test against both the in-repo SDK and the package.json-pinned published SDK. Both must pass: the published leg proves the CLI works against the exact SDK version it will ship against. If it fails, widen the committed @qvac/sdk range to a published version that carries the API the CLI now needs.
  • Push CI (General CI/CD (cli)) uses the same split: in-repo SDK on main / feature-* / tmp-*, published SDK on release-*.
  • The CLI compiles against the in-repo SDK's types, so a PR that changes packages/sdk or packages/inference runs the CLI checks too, even when it touches no CLI file (depends_on on the cli entry of .github/sdk-pod-checks.json). An SDK type change that breaks a CLI source or test file fails on the PR that makes it.

The committed @qvac/sdk range is never changed for testing — the in-repo link is a CI-time/local-only override (sdk-source:workspace / dev:link), never committed.

Run locally:

# From packages/cli after a build
npm run build
node ./dist/index.js bundle sdk

# Or link globally for testing
npm link
qvac bundle sdk

License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details.