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

@arbidocs/sdk

v0.3.19

Published

Shared operations layer for ARBI — auth, config, SSE, WebSocket, and API operations

Readme

@arbidocs/sdk

TypeScript SDK for the ARBI platform. Handles authentication, workspace encryption, and streaming AI queries.

Quickstart

npm install @arbidocs/sdk
import { Arbi } from '@arbidocs/sdk/browser'

const arbi = new Arbi({ url: 'https://www.arbidocs.com' })

// Login and select a workspace
await arbi.login('[email protected]', 'password')
const workspaces = await arbi.workspaces.list()
await arbi.selectWorkspace(workspaces[0].external_id)

// Ask a streaming question about your documents
const docs = await arbi.documents.list()
await arbi.assistant.query('Summarize this document', {
  docIds: [docs[0].external_id],
  onToken: (token) => process.stdout.write(token),
})

For Node.js, install fake-indexeddb and import it first:

import 'fake-indexeddb/auto'
import { Arbi } from '@arbidocs/sdk'

Lifecycle

const arbi = new Arbi({ url: 'https://www.arbidocs.com' })

await arbi.login(email, password)            // or arbi.loginWithKey(email, keyBase64)
await arbi.selectWorkspace(workspaceId)
// ... use the SDK ...
await arbi.logout()

| Property | Description | |----------|-------------| | arbi.isLoggedIn | Whether the user is authenticated | | arbi.hasWorkspace | Whether a workspace is selected |

Operations

| Namespace | Key methods | |-----------|-------------| | arbi.workspaces | list(), create(), update(), delete(), listUsers(), addUsers(), removeUsers() | | arbi.documents | list(), get(), uploadFile(), uploadUrl(), update(), delete(), download() | | arbi.conversations | list(), getThreads(), updateTitle(), share(), delete() | | arbi.assistant | query(question, options), retrieve(query, docIds), respond(messageId, answer) | | arbi.tags | list(), create(), update(), delete() | | arbi.doctags | assign(), remove(), generate() | | arbi.contacts | list(), add(), remove() | | arbi.health | check(), models(), mcpTools() |

Streaming AI queries

const result = await arbi.assistant.query('What does section 3 say?', {
  docIds: [docId],
  previousResponseId: lastMessageId,   // for multi-turn conversations
  onToken: (token) => { /* append to UI */ },
  onStreamStart: ({ assistant_message_ext_id }) => { /* save for follow-ups */ },
  onAgentStep: (step) => { /* agent tool usage */ },
  onError: (message) => { /* handle error */ },
  onComplete: () => { /* done */ },
})

// result.text — full accumulated response
// result.assistantMessageExtId — use as previousResponseId for follow-ups

Session recovery

The SDK persists the signing key (encrypted) in IndexedDB. Recover a session without a password:

await arbi.loginWithKey('[email protected]', signingKeyBase64)

The SDK also auto-recovers on 401 responses using the stored key.

Security

  • Zero-knowledge auth — passwords never leave the client
  • E2E workspace encryption — symmetric keys wrapped with your public key
  • Encrypted key storage — private keys in IndexedDB encrypted with non-extractable AES-GCM
  • Key zeroing on logout — signing and session keys scrubbed from memory

React

For React apps, use @arbidocs/react instead — it wraps this SDK with hooks and a context provider. See the @arbidocs/react README.

Requirements

  • Browser: Any modern browser with Web Crypto API
  • Node.js: v18+ (install fake-indexeddb)
  • TypeScript: 5.0+ (optional)