Skip to main content

Package manager

npm install kweri

Requirements

RequirementVersion
TypeScript^5.0
Node.js>=18 (for crypto.subtle in query key hashing)
TypeBoxbundled — @sinclair/typebox ^0.34
Kweri ships TypeBox as a dependency and re-exports Type and Static from its main entry point, so you don’t need to install TypeBox separately.

Package exports

{
  ".":           "dist/index.js",      // main entry — Kweri class, adapters, utilities
  "./generated": ".generated/client.js" // generated OpenAPI client (after running kweri-gen)
}

TypeScript configuration

Kweri is written in TypeScript and ships with declarations. No additional @types packages are needed. Make sure your tsconfig.json has "moduleResolution": "bundler" or "node16" / "nodenext" to resolve the package exports correctly:
tsconfig.json
{
  "compilerOptions": {
    "moduleResolution": "bundler",
    "strict": true
  }
}

CLI (optional)

The kweri-gen CLI is included in the package and available as a local binary:
# Run directly via npx
npx kweri-gen https://api.example.com/openapi.json

# Or add a script to package.json
{
  "scripts": {
    "generate-api": "kweri-gen https://api.example.com/openapi.json"
  }
}
See the kweri-gen CLI reference for full options.