TypeScript code for building on OpenVireo: sign in to an account, open and edit vaults, share them, run
service accounts in CI, or sync with a self-hosted sync server. It is the same code the OpenVireo web app,
the ov CLI, ov connect and the GitHub Action run, and it interoperates with the desktop app: the same
crypto, the same OPAQUE suite, the same merge.
Everything is end-to-end encrypted on the client. The servers only ever receive OPAQUE messages,
encrypted .kdbx files, wrapped keysets and sealed keys; see Concepts.
Packages
| Package | What it is |
|---|---|
@openvireo/sdk | The library: accounts, vaults, sharing, sync, merge, service accounts |
@openvireo/cli | ov: read, inject and rotate secrets from scripts and CI. See CLI |
@openvireo/connect | ov connect: a REST server for one service account, with Kubernetes manifests. See Connect |
| GitHub Action | Loads secrets into a workflow and masks them. See GitHub Action |
The SDK runs in browsers, Node ≥ 20 and Bun (also compiled into a single binary). It’s ESM only.
Install
Releases are published to GitHub Packages. Installing from there needs a GitHub token with read:packages,
even though the packages are public:
echo "@openvireo:registry=https://npm.pkg.github.com" >> .npmrc
echo "//npm.pkg.github.com/:_authToken=\${GITHUB_TOKEN}" >> .npmrc
npm install @openvireo/sdk
The ov CLI is also available as a single binary; see CLI.
A first program
import { Account, MemoryStorage } from "@openvireo/sdk";
const account = await Account.connect({
issuer: "https://accounts.openvireo.com",
device: { name: "My script", platform: "cli" },
storage: new MemoryStorage(),
});
await account.login({ email, password, secretKey });
for (const info of await account.listVaults()) {
console.log(info.name, info.role);
}
const vault = await account.openVault((await account.listVaults())[0]!.id);
console.log(vault.read("ov://Personal/GitHub/username"));
await account.logout();
For automation, prefer a service account: it needs no password and can be limited to a few vaults.
Guides
- Hosted accounts: sign up, sign in, unlock, lock, devices, storage
- Vaults and sharing: open, read, write, create, share, revoke, organisations
- Live updates: react to changes from other devices and to access changes
- Offline: keep working without the network
- Moving a database to an account
- Account recovery: resets and restoring the old vaults
- Service accounts: CI, servers and long-running processes
- Self-hosted sync servers: no account, just a sync server
- Testing your app: the in-memory servers
Reference
- Concepts: keys, vaults, roles, references, what the servers see
- Errors: every error code and what to do about it
- Merge behaviour: how concurrent edits are combined
- Lower-level APIs: the sync loop, HTTP clients, KDBX helpers, Argon2, OPAQUE
- API reference: every export, generated from the source
(
npm run docs:apibuilds it locally)
Subpath imports
Everything is exported from @openvireo/sdk. Smaller entry points keep bundles small:
| Subpath | What it contains |
|---|---|
@openvireo/sdk/crypto | Secret Key, AUK (Argon2id), wrap/seal, keysets, fingerprints, vault names, SA and refresh tokens, JWT verification |
@openvireo/sdk/opaque | The OPAQUE client (opaque-ke compiled to WASM, lazy-loaded) |
@openvireo/sdk/auth | AuthClient (every account server route), discovery, TokenManager, storage adapters |
@openvireo/sdk/storage/node | FileStorage (a 0600 JSON file) |
@openvireo/sdk/sync | SyncClient, the syncKdbx merge and retry loop, subscribeEvents |
@openvireo/sdk/vault | kdbxweb open and save, vault-key credentials, entry helpers, ov:// references |
@openvireo/sdk/merge | The sync merge, matching the desktop app |
@openvireo/sdk/testing | In-memory auth and sync servers for tests (not for production) |
License
MIT OR Apache-2.0, at your option.
The SDK docs cover OpenVireo SDK, develop (86e6cd2), last updated 26 October 2026. Found a mistake? Edit this page on GitHub.