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

conare

v0.35.0

Published

TypeScript client for Conare: add documents, query them, connect apps.

Readme

conare

TypeScript client for Conare: add documents, query them, connect apps, sync your own. No dependencies. Works on Node 18+, Bun, Deno and edge runtimes.

Quickstart

npm install conare
export CONARE_API_KEY=sk-conare-...   # conare.ai/dashboard/keys
import { Conare } from "conare";

const conare = new Conare();
const docs = conare.namespace("docs");

await docs.add({ id: "refunds", text: "Refunds are available for 30 days.", metadata: { team: "support" } });

const results = await docs.query("how do refunds work?", { topK: 5 });
// [{ id: "refunds", text: "Refunds are available for 30 days.", score: 0.91, reranked: true, metadata: { team: "support" } }]

A namespace is created by its first write. Writing the same id again replaces the document.

For coding agents

An agent writing against Conare (Claude Code, Cursor, Codex) reads the docs as they are today:

  • The Conare skill: npx skills add https://docs.conare.ai
  • Search the docs over MCP: https://docs.conare.ai/mcp
  • Every page, listed: https://docs.conare.ai/llms.txt (in full: /llms-full.txt). Any page as Markdown: add .md to its URL.
  • Every route, field and bound: https://api.conare.ai/openapi.yaml

Reference

Client

new Conare()                                   // CONARE_API_KEY from the environment
new Conare({ apiKey, baseURL, timeout: 60_000, maxRetries: 2 })
await conare.organizations()                   // [{ id, name, role }]: the organizations the key acts for
new Conare({ organization: "org_…" })          // acts for that one (X-Conare-Org)
new Conare({ gzip: false })                    // JSON bodies of 8 KiB or more go gzip by default

Every method also takes { signal, timeout } as its last option. The default timeout is 60 s, and 120 s for a write of documents.

A key acts for its own organization. A multi-organization key (made in the console by an admin of each organization it names) acts for any of them: make one client per organization with organization. Without it, such a key answers 400 on every call but organizations().

Organizations (a customer key)

One organization per company you serve, each with its own namespaces, keys, sources, usage and limits. A customer key (made by an admin in the console, in your customer's default organization) manages them:

const platform = new Conare({ apiKey: CUSTOMER_KEY })
const acme = await platform.createOrganization({ name: "Acme", externalId: "acme" }) // same externalId again: the same one
const { secret } = await new Conare({ apiKey: CUSTOMER_KEY, organization: acme.id }).createKey({ name: "acme" })
// Acme's traffic runs on `secret`, which reaches Acme's organization alone.
await platform.organizations({ externalId: "acme" })  // every organization of your customer, or the one with this id
await platform.spendByOrganization()                  // this month's bill by organization: { total, rows: [{ id, name, externalId, charges, spendCapMicros }] }
await platform.renameOrganization(acme.id, "Acme Capital")
await platform.setOrganizationSpendCap(acme.id, 500)  // its own monthly cap in dollars (null removes it): past it, Acme's billed calls get 402 spend_cap_reached
await platform.deleteOrganization(acme.id)            // 409 until its namespaces and sources are deleted

Namespaces and documents

const docs = conare.namespace("docs");

await docs.add({ id, text, metadata });        // one document
await docs.add([...]);                         // or many; sent 100 at a time. Returns the ids.
await docs.write({ id, text, ifVersion: 7 });  // add, only if the document is at version 7 (0: only if
                                               // it does not exist), else 409 version_conflict.
                                               // Returns [{ id, version, result, chunks, chunksEmbedded }]:
                                               // result "unchanged" when Conare already held it as sent
await docs.add({ id, text, user: "tenant-7:u_42", seq: 1759698843000 }); // a user's document; a lower seq
                                               // than stored is "stale" and writes nothing
await docs.query("refunds", { userPrefix: "tenant-7:" }); // one user's documents (user) or a group's (userPrefix)
await docs.get("refunds");                     // { id, text, metadata, updatedAt, version, user?, seq? } or null
for await (const doc of docs.list()) {}        // every document, page by page ({ limit } per page: 1-100, default 50; { order: "newest" } newest first)
await docs.delete("refunds");                  // 404 document_not_found if it does not exist
await docs.deleteMany(["a", "b"]);             // up to 1000 ids in one call; missing ids are skipped. Returns the count
await docs.deleteWhere({ team: "support" });   // every document matching the filter, whole documents. Returns the count
await docs.uploadFile(bytes, "report.pdf");    // any file up to 512 MiB in one call: a PDF, a .docx, a .pptx, an .xlsx
                                               // (Markdown tables per sheet), CSV, text or images; scans are OCR'd.
                                               // The file is one document, <sourceId>:<fileId>; each hit says its page,
                                               // slide, sheet and rows or part. The same name (or { id }) again replaces it.
                                               // { user, metadata, type, wait } optional. Returns { state, fileId, ids, markdown, parts, ... }
await docs.getFile("report.pdf");              // its state; once ready, its document and parse
await docs.drop();                             // delete the namespace and its documents (succeeds if already emptied; 404 namespace_not_found if never written)

await docs.describe("Product docs, one page each"); // what it holds, in one line: namespaces() and an agent's list_namespaces show it

await conare.namespaces();                     // [{ name, documents, description, ... }]
await conare.namespaces({ prefix: "u7f3a9c-" }); // one user's namespaces

Namespace names: 1-64 characters of a-z 0-9 _ -. Ids: up to 256 characters of A-Z a-z 0-9 . _ : -. Metadata values are strings, numbers, booleans or arrays of strings. A document's text is of any length within a write's 32 MiB; a long one is stored in parts and searched, read, listed and deleted as one document.

Query

await docs.query("how do refunds work?", {
  topK: 10,                                    // 1-500, default 10
  filter: { team: "support" },                 // optional metadata filter
  rerank: true,                                // default true
  retrievers: ["vector", "keyword"],           // default; one of them alone searches with it alone
});

Hybrid search, reranked. One result per document: its best passage. retrievers picks what it fuses: "vector" (the embedding model) and "keyword" (BM25; alone, BM25 alone). score is the reranker's when reranked is true, else the fused rank score of a result past the rerank window (or of a query not reranked); the two scales do not compare.

A search that lost a part still answers: the results carry .degraded, the parts it lost (["rerank"] when the reranker did not answer, ["embed"] when only keywords searched), empty when it lost nothing. Each page of queryPages has the same field.

Filters match metadata values: { key: value } means equals (or, for an array value, contains). Operators: $eq, $in, $ne, $nin (queries only) and the ranges below. Combine with $and and $or:

{ $or: [{ team: "support" }, { year: { $in: [2024, 2025] } }] }
{ $and: [{ lang: { $in: ["en", "de"] } }, { draft: false }] }

Ranges $gt $gte $lt $lte compare a number or string value (not an array item): number bounds compare numbers, string bounds compare strings by their UTF-8 bytes, so ISO dates sort as dates.

{ year: { $gte: 2020, $lt: 2025 } }
{ published_at: { $gte: "2025-06-01" } }

$ne and $nin work in queries; a delete by filter with one answers 400 invalid_filter.

Records

const { record, sources, results, sourcePassages } = await docs.queryRecord("When do applications close, and is there an interview?", {
  type: "object",
  properties: {
    closes: { type: "string", description: "The date applications close, as YYYY-MM-DD" },
    interview: { type: "string", enum: ["live", "recorded", "none"] },
    essays: { type: "integer", description: "How many essays an applicant writes" },
  },
});
record?.interview;     // "live" | "recorded" | "none" | null, typed from the schema
sources.closes;        // { id, url, quote }: the document, its address and the words that state the value
sourcePassages;        // a source's passage that results do not hold (the record reads past topK)

A search answered as a record: every field of the schema, its value or null when no passage the search read states it, never guessed. A field is a string (with or without an enum), a number, an integer, a boolean or a list of strings; 1-32 fields. Say in a field's description what it holds and in what form. record is null when the answer model was unavailable; results are the search's, and every query option applies.

Changes

let cursor = await loadCursor();               // undefined the first time: every document from the start
for (;;) {
  const page = await docs.changes({ cursor, limit: 1000 });
  for (const c of page.changes) {}             // { id, change: "created" | "changed" | "deleted", at, url?, metadata?, diff? }
  cursor = page.nextCursor;
  await saveCursor(cursor);
  if (!page.hasMore) break;
}

What changed in a namespace, oldest first: each page and file its website, Cloud Storage and file sources read (created or changed; one read again unchanged adds nothing) and each of their documents deleted. Documents written with add or write are not listed. Rows are kept 90 days, a live document's latest whatever its age; a cursor whose unread rows were dropped throws 410 cursor_expired: list again without one.

const page = await docs.changes({ source: "src_769140bdee3ce44fc52ddb86", since: lastSyncStart });
for (const c of page.changes) {
  if (c.diff?.cause === "content") for (const h of c.diff.hunks ?? []) console.log(h.removed, "->", h.added);
}

source keeps the rows to one source's documents, since and until to a time window. A web page's changed row says how it changed (diff): content with the lines removed and added (["Application deadline: 14 January 2026"] -> ["Application deadline: 13 January 2027"]), reader when the page reads as it did and only how Conare reads web pages changed, fields when only its fields did. A file's row has none.

Grep

const { matches, nextCursor } = await docs.grep("MAX_FILE_[A-Z]+", { limit: 20 });
await docs.grep({ query: "turbopufer", max_distance: 1, case_sensitive: false });
await docs.query("upload limits", { filter: { $text: { $regex: "(?i)max_file" } } });

The documents whose text matches a regular expression, or nearly matches a spelling, with the lines that match, in id order. docs.create({ regexIndex: true }) before a namespace's first write makes it fast at any size.

Embed and rerank

await conare.embed(["some text"], { type: "query" });            // number[][]; type defaults to "document"
await conare.embed(["some text"], { outputDtype: "int8" });       // { values: Int8Array[], scales }; dequantize() gives floats
await conare.rerank("refund window", ["a", "b"], { topK: 1 });   // [{ index, score, document }], plus .unscored

// Both parts of the model: a vector per text and a vector per token. Blend the two scores with hybridScore().
const query = await conare.embed("refund window", { type: "query", tokenEmbeddings: true });
const documents = await conare.embed(["a", "b"], { tokenEmbeddings: true });  // up to 16 texts a call
hybridScore(query, documents, 0, 1);                             // the query against documents[1]

outputDtype: "int8" returns each vector as int8 values plus one scale (vector ≈ values × scale, scale = max|x| / 127): a quarter of the bytes. Cosine on the values alone equals cosine on the floats, so they can be stored and searched as they are. On our embedder's real vectors this cost no measurable retrieval quality (nDCG@10 -0.00 [-0.10, +0.10] on 1M chunks). There is no binary output: 1-bit vectors lost 4 to 7.5 nDCG@10 points there.

rerank takes 1-100 documents of 1-24,000 characters each (the query at most 8,192 characters, all together at most 256,000); more than 100 is a 400 invalid_request. A document not read before the one-second budget ended, or whose read failed, is listed by index in .unscored and is not in the results; its score from another call would not compare.

Parse

const out = await conare.parse(bytes, { name: "report.pdf", pages: "1-20", layout: true });
// { id, state: "done", markdown: "<!-- page 1 -->\n\n# Report...", parts: [{ locator: { page: 1 }, markdown, ocr, confidence, blocks }], withoutText }
await conare.parse({ url: "https://example.com/deck.pptx" });   // fetched by the API
await conare.parse({ url: "https://example.com/" });            // a page: { title, sourceUrl, markdown, ... }
await conare.parse(locked, { name: "minutes.pdf", password: "..." });
await conare.parse(xlsx, { name: "model.xlsx", sheets: ["Q3"], range: "A1:F40", formulas: true }); // "110 `=B2*1.1`"; .sheets names all
await conare.parse(deck, { name: "deck.pptx", vision: true });   // charts and pictures described; parts carry .vision
if (out.state === "parsing") await conare.getParse(out.id);     // OCR outlived `wait` (default 60 s): the result, kept 24 h

parse reads a file with the same parser as uploadFile and stores nothing; any key can call it, a models-only key too. uploadFile takes the same options and answers the same markdown, parts and withoutText beside ids. A URL is http or https on a public address; the API reads the one page you name and does not consult robots.txt. Its result carries sourceUrl, where the fetch landed after redirects, and a page's title. A URL that does not answer its file throws what its site did (gone, refused, sign_in_required, slow_down, site_error, unreachable, unexpected_status) with err.details.status, the site's HTTP status, and on slow_down err.details.retryAfterSeconds. A page that holds no text until a browser runs its scripts throws 422 needs_javascript; render: true asks for it to be read through a browser (not available yet: the error says so). links: true writes a web page's links as Markdown links, its menus' and footer's too; mainContent: true reads the page's main content alone. A page OCR could not read is in ocrFailed (empty when it read them all), apart from a blank page; an upload's ocrLayerOnly lists the pages that kept their text layer alone because OCR could not read them.

Sources

Connect an app such as HubSpot or Gmail. It keeps syncing into one namespace, and each record becomes a document. sources.types() lists the apps you can connect.

const { source, connectUrl } = await conare.sources.connect({
  type: "hubspot",
  namespace: "crm",
  redirectUrl: "https://yourapp.com/settings",
});
// Send the app owner to connectUrl. They sign in and come back to redirectUrl.

await conare.sources.types();                  // [{ type, name, logoUrl }]
await conare.sources.list();                   // { data: [Source, ...], nextCursor }: a page, the connected apps first
for await (const s of conare.sources.all()) {} // every source, page by page
await conare.sources.summary();                // { sources, failing, syncing, namespaces: [{ namespace, types: [{ type, sources, failing }] }] }
await conare.sources.get(source.id);           // { id, type, name, namespace, status, error, documents, lastSyncedAt, createdAt }
const synced = await conare.sources.sync(source.id); // sync now: the Source, or a bucket's sync Run
if ("state" in synced) await conare.runs.get(synced.id); // a Run has `state`, a Source has `status`
const full = await conare.sources.sync(source.id, { full: true }); // re-read everything (Gmail and apps Conare reads itself); only documents that changed are indexed again
if (!("state" in full)) full.resyncNote;       // what the re-read does
await conare.sources.update(source.id, { syncIntervalSeconds: 3600 }); // every hour; null is automatic
await conare.sources.delete(source.id, { deleteDocuments: true });

status is connecting, syncing, ready or error. A source syncs on an automatic interval picked from what each sync reads, or on one you set from 5 minutes to 30 days. source.cost holds what an estimate of a month at any interval needs: the rows the last sync read, whether syncs read only changes, and the prices.

Pages of public websites are a source too:

const site = await conare.sources.create({
  type: "web",
  namespace: "admissions",
  urls: ["https://www.example.edu/admissions/dates", "https://www.example.edu/admissions/guide.pdf"],
});
const { data } = await conare.sources.failures(site.id); // [{ externalId, code: "refused", message, attempts }]

Or give a website's address and Conare finds its pages itself, new ones included, at every sync:

const rival = await conare.sources.create({ type: "web", namespace: "competitors", site: "https://www.example.com" });
await conare.sources.update<WebSource>(rival.id, { syncIntervalSeconds: 3600 }); // an hour to a week; null is a day
await conare.namespace("competitors").query("enterprise plan price", { filter: { page_type: "pricing" } });

Conare reads each page as the crawler ConareBot (robots.txt and a site's Crawl-delay obeyed, a site asked only as fast as it answers), keeps it in the namespace with its address as source_url and its kind as page_type (pricing, blog, changelog, docs, ...), and reads it again every syncIntervalSeconds (a day by default), parsing it again only when it changed. Each website is its own source with its own interval.

sources.sync() answers a connected app's Source. A Google Cloud Storage or web source answers the sync Run it queued (409 run_active while one is queued or running), and a custom or files source has nothing to sync (409 push_source).

A deleted Google Cloud Storage, web or files source stops syncing at once but keeps its documents, searchable, for an hour: deletesAt says when they go, and sources.restore() brings it back until then.

await conare.sources.delete(site.id);                       // deleting; its documents go in an hour
await conare.sources.delete(site.id, { graceSeconds: 0 });  // now (0 to 86,400), also in its grace
await conare.sources.restore(site.id);                      // active again, with its documents

While a source is in its grace, connecting the same bucket or site, or uploading to a namespace whose files source it is, throws source_deleting with details.sourceId and details.deletesAt: restore it, or delete it now.

Custom sources

A custom source is a set of documents you push from your own system, keyed by your own ids. Conare answers per document what each write did, keeps a deleted one out, and can mirror a whole set: what a snapshot run never saw is deleted.

const src = await conare.sources.create({ type: "custom", namespace: "kb", name: "Help center" });

await conare.sources.documents.put(src.id, [
  { externalId: "article-12", text: "Refunds take 5 days.", seq: 1759698843000, tag: "etag-9" },
]);                                            // [{ externalId, key, result, storedSeq?, code? }], 100 a call:
                                               // created, updated, unchanged, stale (a lower seq), deleted, rejected
await conare.sources.documents.check(src.id, [{ externalId: "article-12", tag: "etag-9" }]); // { need, excluded }
for await (const d of conare.sources.documents.list(src.id)) {}  // { externalId, key, tag, seq, user, version }
await conare.sources.documents.get(src.id, "article-12");        // with text and metadata, or null
await conare.sources.documents.delete(src.id, ["article-12"], { exclude: true }); // kept out until restored
await conare.sources.documents.restore(src.id, ["article-12"]);

// Mirror the whole set: push (or check, when unchanged) every document through a run, then complete it.
const run = await conare.runs.open(src.id, { expected: 2 });
await run.put([{ externalId: "a", text: "..." }]);
await run.check([{ externalId: "b", tag: "etag-1" }]);
const done = await run.complete();             // { state, sweep, counts: { seen, live, planned, deleted } }
// sweep "held": over 10% (and over 1,000) would go at once; a run 24 h later that agrees applies it.

await conare.imports.create(src.id, jsonl, { mode: "snapshot" }); // a JSON-lines file, up to 1 GiB: a Run
await conare.runs.get(runId);                  // follow any run
await conare.users.delete("tenant-7:u_42");    // everything of a user, in every namespace: a purge Run
await conare.users.deletePrefix("tenant-7:");
await conare.events.list({ cursor: "0", types: ["run.*"] }); // { data: [{ seq, type, runId, data }], nextCursor }

sources.list() and sources.get() answer custom sources too, with kind: "custom", and the files source of each namespace you upload to (kind: "files"), Google Cloud Storage buckets (kind: "gcs") and web sources (kind: "web"); a connected app has no kind. A custom source that holds an app keeps type: "custom" and names the app in app ("gmail"; null otherwise). These carry health (ok, degraded, failing), display.state (needs_action with display.action when you must act, such as grant_access on a bucket) and sync.lastError. These calls send an Idempotency-Key when they create or delete something, so their retries are safe.

Errors

Every failure is a ConareError with status, code, message, requestId and details (null unless the error carries facts beside its message, such as a fetched URL's status) (status is 0 when no response arrived: timeout, connection_error). 429, 5xx and network errors are retried twice with backoff, honouring Retry-After. Every write carries an Idempotency-Key, the same on each of its retries: the API answers a retry with the first answer and does nothing again, so a retry never creates anything twice and a conditional write's retry is not a version_conflict. Pass { idempotencyKey } to make a call you repeat later (a restarted job) the same call; within 24 hours its repeat gets the first answer.

import { ConareError } from "conare";

try {
  await docs.add({ text: "" });
} catch (err) {
  if (err instanceof ConareError) console.log(err.status, err.code, err.requestId);
}

One namespace per user

To give each user of your app their own searchable data, use one namespace per user and connect their apps into it:

const user = conare.namespace(`user-${userId}`);
await user.add({ id: "note-1", text: "Prefers email over phone." });

const { connectUrl } = await conare.sources.connect({
  type: "gmail",
  namespace: `user-${userId}`,
  redirectUrl: "https://yourapp.com/settings/connections",
});
// Redirect the user to connectUrl. Their mail syncs into their namespace only.

const context = await user.query("how should we contact them?");

Keep the API key on your server. It can read and write every namespace in your organization.

The conare command: sync sessions and GitHub

The package also ships a command (the library never loads it). It runs under Node and Bun:

npx conare sync --key sk-conare-...     # save the key to ~/.conare/sync.json, then sync
bunx conare sync                        # sync again: only new or changed sessions are sent
npx conare sync --dry-run               # count what would upload
npx conare sync --install               # sync now, then every 10 minutes in the background
npx conare sync status                  # the last background run; exits 1 if no success in 1 h or a transcript was missed
npx conare sync --uninstall             # stop the background sync
npx conare sync github owner/repo       # issues, PRs and markdown docs (GITHUB_TOKEN or gh auth)

Create the key at https://conare.ai/dashboard/keys (access is by invitation: https://conare.ai/request-access). Synced: Claude Code, Codex, Cursor (on Node 22.13 or newer, or Bun: it is read with node:sqlite), Pi. Not synced yet: OpenCode, Grok; a sync that finds one of them on the machine says so, and names Cursor when the runtime cannot read it.

Sessions. Each Claude Code, Codex, Pi session and Cursor chat becomes one document in the namespace sessions: a readable transcript with the prompts, the answers, one line per tool call, and the errors. Tool output that succeeded, images and thinking are left out, and secrets (API keys, tokens, private keys, passwords) are replaced with [REDACTED:<kind>] before anything is sent. Ids are claude:<session>, claude:<session>:agent:<agent> for a subagent, codex:<rollout file name>, pi:<session file name> and cursor:<composer id>; a session over 250 KB is sent as <id>:part:000001, :part:000002, and so on (one layout per session, never both), so a sync sends only the parts that changed. Metadata: source (claude-code, codex, pi or cursor), session_id, agent_id, project, cwd, git_branch, started_at, date (the last activity) and content_hash, and origin when the run names one. A Cursor chat records no directory, so it has no project or cwd.

Where a session ran. --origin <label> puts origin: <label> on every document of the run, so filter: { origin: "cloud" } finds those sessions and { origin: { $ne: "cloud" } } the rest. In a Claude Code cloud container (claude.ai/code, CLAUDE_CODE_REMOTE=true) it is cloud unless you say otherwise. Run npx conare sync --quiet there from the session's Stop hook: each turn sends what changed, and a run that finds another going asks it for one more pass, so the last turn is not left behind when the container is destroyed.

A transcript from elsewhere. --file <path> (repeatable) syncs only the Claude Code transcripts named, wherever they lie and whatever their names: a session's .jsonl copied from another machine (with its subagents, when they lie beside it as Claude Code keeps them: <name>/subagents/), or a cloud session's event stream. Each gets the id its records carry (sessionId, or the stream's session_id), the one a sync on the machine that ran it gives, so syncing it again later replaces the same documents. Such a run keeps the state of everything else and is not recorded as the background sync's; a file with no message it can read exits 1.

const sessions = conare.namespace("sessions");
await sessions.query("why did we drop the Redis cache?", { filter: { project: "shop" } });

It reads ~/.claude/projects (or $CLAUDE_CONFIG_DIR), ~/.codex/sessions (or $CODEX_HOME), ~/.pi/agent/sessions (or $PI_CODING_AGENT_SESSION_DIR, or sessions in $PI_CODING_AGENT_DIR) and Cursor's User/globalStorage/state.vscdb (in ~/Library/Application Support/Cursor on macOS, ~/.config/Cursor on Linux), opened read-only. Cursor keeps every chat in that one database, so each chat is tracked by its own last update; the list of chats is kept in ~/.conare/cursor-composers.json and the database is not opened while it is unchanged. The key comes from --key, else CONARE_API_KEY, else ~/.conare/sync.json; a key of several organizations needs --org org_… (or CONARE_ORG). What the server already has is kept in ~/.conare/sync-state.json and checked against the namespace's listing once a day: a session deleted on the server (in the console, say) is uploaded again within a day, unless its project is in ~/.conare/sync-exclude. Sessions of an excluded project, and transcripts with no message this version can read, are recorded there too and not read again until they change (or, for the latter, another version runs). One run at a time holds ~/.conare/sync.lock; ~/.conare is readable by you alone. --install copies the command to ~/.conare/sync/<version>/, checks the copy file by file, runs it once with the key it saved, and only then adds a launchd agent (ai.conare.sync) on macOS or a systemd user timer on Linux; a key that may not write sessions (exit 3) or an organization out of credits (exit 5) schedules nothing. On Linux without a systemd user manager, and on Windows, it schedules nothing and prints the cron or schtasks line to add yourself; on Linux it says when the timer stops at logout (loginctl enable-linger). The schedule does not update itself: sync and sync status say when it runs an older version than the one you ran. Every run adds a line to ~/.conare/sync.log (uploaded, skipped and failed counts, duration). With --install --via <command> the schedule runs the sync through that command, which supplies CONARE_API_KEY (for example a secrets manager's wrapper such as ops), and no key is saved to disk; the first run goes through it too. Up to four batches upload at once. On a machine that has the old Conare CLI (0.7 and earlier, cmem_ keys, retired on 2026-10-02), --install also removes its background job (ai.conare.ingest, its systemd timer or its cron line) and its program in ~/.conare/bin, and points its conare command at this version; ~/.conare/config.json is left as it is.

GitHub. conare sync github owner/repo writes every issue and PR thread (body, comments and review comments; bots other than greptile-apps[bot] and claude[bot] are left out) into <repo>-github as pr-<n> / issue-<n>, with metadata kind, repo, number, title, state, author, date, updated_at, merged_at, labels and url; and every markdown file on the default branch into <repo>-docs (id: the path with / as :; metadata kind: "doc", path, title, author, date, url). Later runs read only threads updated since the last one and files whose content changed; docs whose file was deleted are deleted. --state <file> sets where that is kept (default ~/.conare/github-state.json). <repo> is the repository's name lowercased, with any character other than letters, digits, _ and - as - (vercel/next.js writes next-js-github). A namespace that already holds another owner's repository of the same name is left alone, and that repository's sync stops with an error. A GitHub source connected in the dashboard keeps a repository in sync without this command.

Changes in 0.35.0

Nothing to change in code that uses the library. The conare command:

  • --origin <label> sets the documents' origin metadata; in a Claude Code cloud container (CLAUDE_CODE_REMOTE=true) it is cloud.
  • --file <path> syncs the Claude Code transcripts named: a session file from another machine, or a cloud session's event stream (its directory and session id from its init record, a subagent's turns by parent_tool_use_id, replayed records skipped).
  • A --quiet run that finds another running asks it for one more pass instead of leaving the change to the next run.

Changes in 0.34.0

Nothing to change in code that uses the library. The conare command:

  • conare sync also uploads Pi sessions and Cursor chats (Cursor on Node 22.13 or newer, or Bun; on an older Node it says Cursor is not synced and why). The schedule passes on PI_CODING_AGENT_DIR and PI_CODING_AGENT_SESSION_DIR.
  • conare --key sk-conare-… without a command syncs, as conare sync --key does. The old CLI's flags and commands (--install-sync, --config-file, doctor, a cmem_ key, …) say how to move to this one instead of "Unknown argument"; sync --install retires the old CLI where it is installed.
  • Exit codes: a key that may not write the namespace (403) or acts for several organizations without --org exits 3, not 4; an organization out of credits or over its cap (402) exits 5, with the billing page. --install schedules nothing after 3 or 5, and checks the platform before copying anything. A held lock in sync github exits 4, a GitHub token or repository GitHub refuses 1.
  • A 400 that names no document (a key of several organizations without --org) stops the run, where every document used to be sent again alone and reported "Not accepted" on every run. --org (or CONARE_ORG) is new, and the schedule keeps it.
  • The namespace is listed once a day rather than on every run (a no-op run took about a minute on 4,400 sessions), and sessions left out on purpose are recorded, so sync status no longer reports them as missed forever.
  • --dry-run without a key counts against the saved state rather than calling everything new.
  • ~/.conare is made readable by you alone, and sync.log 0600.
  • The key page is https://conare.ai/dashboard/keys.

Changes in 0.33.0

0.31.0 and 0.32.0 were never published: coming from 0.30.0, read their notes below too. What breaks code written for 0.30.0:

  • sources.list() answers one page, { data, nextCursor }, not an array of every source: the connected apps on the first page, then up to limit (default 100, at most 200) custom, files, Google Cloud Storage and web sources, newest first. Pass nextCursor as cursor for the next page, or iterate sources.all() for every source. Both take namespace, user and type. Code that read the array reads .data, or iterates all() to keep every source.
  • sources.list(options) became sources.list(params, options): request options (signal, timeout, idempotencyKey) passed first, as 0.30.0 took them, are now read as filters and do nothing. Pass them second: sources.list({}, { timeout: 5000 }).
  • sources.delete(id) of a Google Cloud Storage, web or files source leaves an hour to take it back: the source stops syncing at once and shows deletesAt, its documents stay searchable until then, and sources.restore(id) brings it back. sources.delete(id, { graceSeconds }) sets the wait (0 to 86,400); 0 deletes at once, as before, and also deletes now a source already in its grace.
  • Types that gained required fields, which code building such objects itself (a test double) must now fill: ApiKey.readOnly and ApiKey.rateLimitPercent, and OrganizationSpend.capped and each of its rows' spendCapMicros, and WebSource.config.pages.
  • The list no longer carries a site's page addresses: read the source. A web source from sources.list() has how many pages it has (config.pages) and no config.urls; sources.get(id) answers them (one site can hold 5,000, and a page of 124 sites weighed 214 MB). 0.30.0's sources.list() reads the missing key as config.urls: []: it does not throw, but its sources look empty of pages, so read each with sources.get(id).

New, nothing to change:

  • sources.list() answers total on the first page, how many sources every page holds: list({ limit: 1 }) reads how many there are. sources.list({ health: "failing" }) (and all()) keeps the sources that need you.

  • sources.summary() counts the sources by namespace and type, and how many of them fail or sync now, in one read however many sources there are ({ namespace } for one): which apps feed a namespace, without listing them.

  • A source_deleting error (connecting a bucket or site whose source is in its grace, uploading to a namespace whose files source is) carries details.sourceId and, while it can still be restored, details.deletesAt: sources.restore(details.sourceId), or sources.delete(details.sourceId, { graceSeconds: 0 }) to delete it now.

  • sources.restore() takes what sources.delete() takes: in the console, an organization admin.

  • parse and uploadFile take a workbook's sheets (names), range ("A1:F40") and formulas: true (an .xlsx's formulas beside their values); parse's result names a workbook's sheets, all of them.

  • parse and uploadFile take vision: true: each chart, diagram and picture is described in one line > **Figure description:** ..., every part carries vision (and with layout, a figure block its description), and a picture with no text but a description is a part, not 422 no_text. A description is written by a model: it describes what the chart, diagram or picture shows and is not text from the page; it can be wrong, and two reads of the same file may word it differently; numbers a chart prints are in the page's text as before. A deployment that does not offer it answers 400 invalid_request.

Changes in 0.32.0

  • changes({ source, since, until }) keeps a page of changes to one source and a time window, and a web page's changed row says how it changed (diff: the lines removed and added, or that only the reader or its fields changed).

Changes in 0.31.0

  • queryRecord(query, schema) answers a search as a record of the fields the schema names, each value typed from the schema and with the document, address and words it is from (sources).
  • changes({ cursor, limit }) reads a page of a namespace's changes: the documents its sources created, changed and deleted, from a cursor.

Changes in 0.30.0

  • embed(..., { tokenEmbeddings: true }) returns HybridEmbeddings: each text's vector and a vector per token, with denseWeight; hybridScore(query, documents, q, d) blends the two scores.

Changes in 0.29.0

  • sources.sync() returns Source | Run: a Google Cloud Storage source's sync answers its Run (before, an object with id undefined and an Invalid Date). Code that reads .status or .resyncNote on the result checks first: if (!("state" in result)) result.status.
  • sources.list() and sources.get() decode a source by its kind: FilesSource and GCSSource are new, a custom source carries app, and sync carries lastSuccessAt, lastFailureAt, nextRunAt and lastError. Run.kind adds sync and parse.
  • parse, uploadFile and getFile return ocrFailed; an upload also returns ocrLayerOnly.
  • Namespaces carry their description, set with describe().

Development

bun install
bun run build
bun test                                        # local fake API
CONARE_BENCH_API_KEY=sk-conare-... bun test     # also runs test/live.test.ts against the real API (a test organization's key)

Releases: push a tag sdk-v<version> matching package.json; CI tests and publishes to npm.