arcmira 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/GUIDE.md ADDED
@@ -0,0 +1,277 @@
1
+ # SDK guide
2
+
3
+ The official TypeScript SDK and CLI for searching indexed YouTube transcripts. Find timestamped quotes, speaker appearances, mentions, sponsors and recommendations.
4
+
5
+ [Arcmira](https://arcmira.com) · [API docs](https://arcmira.com/docs) · [OpenAPI schema](https://api.arcmira.com/v1/openapi.json) · [MCP setup](https://arcmira.com/docs/mcp-server)
6
+
7
+ - Zero runtime dependencies. Uses the global `fetch`, so it runs in Node 18 and later, Cloudflare Workers, Deno, Bun and browsers.
8
+ - ESM and CommonJS builds with types.
9
+ - Every list pages itself. Every error is a typed class carrying the parsed API body.
10
+ - The whole documented API: search, transcripts (Premium included), mentions, momentum, sponsors and recommendations, monitors, trackers, Slack integrations and feedback.
11
+ - Reads take ids (`ent_14`, `UC...`). `entities.resolve` turns a name into one.
12
+
13
+ ## Install
14
+
15
+ ```sh
16
+ npm install arcmira
17
+ ```
18
+
19
+ We prefer [pnpm](https://pnpm.io) as our JavaScript package manager (`pnpm add arcmira`). [Bun](https://bun.sh) is also great (`bun add arcmira`).
20
+
21
+ To give your coding agent Arcmira, run setup. It finds Claude Code, Codex, Cursor, VS Code, Gemini CLI and Claude Desktop, adds the [Arcmira MCP server](https://github.com/arcmira/mcp) to each, installs the Arcmira skills, and turns updates on. Arcmira ships changes weekly, so keep them on:
22
+
23
+ ```sh
24
+ npx arcmira setup --dry-run # print what would change
25
+ npx arcmira setup # apply, then sign in once per agent
26
+ ```
27
+
28
+ Get a key at [arcmira.com/docs/authentication](https://arcmira.com/docs/authentication) and set `ARCMIRA_API_KEY`, or pass `apiKey` to the client.
29
+
30
+ ## Premium transcripts
31
+
32
+ A Premium read uses credits from your plan, then your on-demand budget. `transcripts.quote({ video_id })` shows how many credits a read of the video will use, free, before you read it.
33
+
34
+ ```ts
35
+ import { ArcmiraClient } from "arcmira";
36
+ const arcmira = new ArcmiraClient();
37
+ const read = await arcmira.transcripts.get({ video_id: "dQw4w9WgXcQ", quality: "premium" });
38
+ if (read.state === "ready") {
39
+ for (const line of read.lines ?? []) console.log(line.speaker, line.text);
40
+ } else if (read.state === "failed") {
41
+ throw new Error(`${read.last_attempt.status}: ${read.last_attempt.error}`);
42
+ } else {
43
+ console.log(`transcribing, read again in ${read.job.next_poll_seconds ?? 30} s`);
44
+ }
45
+ ```
46
+
47
+ A Premium read is one GET. When your account does not own the transcript yet, the read starts transcribing it and uses credits from your plan, then your on-demand budget. You set that budget in the dashboard, and Arcmira enforces it, so no call takes a spending amount. The answer is `state: "ready"` (HTTP 200) with the lines, or `state: "pending"` (HTTP 202) with the `job` while it transcribes. Read again after `Retry-After` or `job.next_poll_seconds`. Repeated and concurrent reads join the same job and never use credits twice. When the last transcription failed or was refunded, the read answers `state: "failed"` (HTTP 200) with `last_attempt` and uses no credits; read with `retry: true` to transcribe it again, which uses credits again. `transcripts.quote({ video_id })` shows the credits first, free.
48
+
49
+ A read your plan and budget cannot cover throws instead. `PaymentRequiredError` carries `quota_exceeded` or `spend_limit_exceeded`, and `ForbiddenError` carries `paid_plan_required` on a free plan. Both carry the price in `err.body.error.details.quote`.
50
+
51
+ ```ts
52
+ import { Arcmira } from "arcmira";
53
+ const sleep = (s: number) => new Promise((done) => setTimeout(done, s * 1000));
54
+ async function premium(video_id: string) {
55
+ for (;;) {
56
+ const { data, rawResponse } = await arcmira.transcripts.get({ video_id, quality: "premium" }).withRawResponse();
57
+ if (data.state === "ready") return data;
58
+ if (data.state === "failed") throw new Error(`${data.last_attempt.status}: ${data.last_attempt.error}`);
59
+ await sleep(Number(rawResponse.headers.get("retry-after")) || data.job.next_poll_seconds || 30);
60
+ }
61
+ }
62
+ try {
63
+ console.log((await premium("dQw4w9WgXcQ")).speakers);
64
+ } catch (err) {
65
+ if (err instanceof Arcmira.PaymentRequiredError || err instanceof Arcmira.ForbiddenError) console.log(err.body.error.code, err.body.error.details?.quote);
66
+ else throw err;
67
+ }
68
+ ```
69
+
70
+ ## Quickstart
71
+
72
+ ```ts
73
+ import { Arcmira, ArcmiraClient } from "arcmira";
74
+
75
+ const client = new ArcmiraClient({ apiKey: process.env.ARCMIRA_API_KEY });
76
+
77
+ // Who is "Ramp"? Reads take ids, so resolve the name first. The answer is best (one row is meant),
78
+ // suggested (one row stands out: use it and say you assumed it), or ask (show the options to the user).
79
+ // context carries the user's own words about the name and settles close calls.
80
+ const resolved = await client.entities.resolve({ q: "Ramp", context: "the corporate card company" });
81
+ const ramp = resolved.best ?? resolved.suggested;
82
+ if (!ramp) throw new Error(resolved.ask ? `${resolved.ask.question} ${resolved.ask.options.map((o) => o.label).join("; ")}` : "no match");
83
+ if (resolved.suggested) console.log(`Assuming ${ramp.name} (${ramp.type}): ${resolved.suggested.evidence}`);
84
+ console.log(ramp.id, ramp.type, ramp.page);
85
+
86
+ // Spoken passages that answer a phrase. about, by, entity_ids and channel_ids take ids only; a name answers 400 id_required.
87
+ // kind is sponsored, organic or mention. after is inclusive and before exclusive, in UTC.
88
+ const hits = await client.transcripts.search({ q: "corporate cards", about: ramp.id, kind: "sponsored", after: "2026-09-01", before: "2026-10-01", limit: 5 });
89
+ for (const chunk of hits.chunks) console.log(chunk.channel_name, chunk.published_at, chunk.watch_url, chunk.text);
90
+ // The window and index state come back with every search: say where the results stop.
91
+ if (hits.window.before) console.log(`results stop before ${hits.window.before}`);
92
+ if (hits.search_index.missing_before) console.log(`transcripts before ${hits.search_index.missing_before} are still being added`);
93
+
94
+ // Catalog rows page themselves: iterate and the client follows next_cursor. Each row uses credits, so stop when you have enough.
95
+ let seen = 0;
96
+ for await (const mention of await client.mentions.list({ entity_id: ramp.id, after: "2026-09-01", limit: 25 })) {
97
+ console.log(mention.media.title, mention.start_seconds);
98
+ if (++seen === 40) break;
99
+ }
100
+
101
+ // Who recommends it on air, and whether they were paid.
102
+ for await (const row of await client.recommendations.list({ entity_id: ramp.id, class: "organic", limit: 10 })) console.log(row.class, row.verbatim_quote);
103
+
104
+ // Gates and failures are typed. The body is the API's error object.
105
+ try {
106
+ const momentum = await client.entities.momentum({ id: ramp.id });
107
+ console.log(momentum.verdict, momentum.volume);
108
+ } catch (err) {
109
+ if (err instanceof Arcmira.PaymentRequiredError) console.log(err.body.error.gate, err.body.error.unlock?.url);
110
+ else throw err;
111
+ }
112
+
113
+ // Every tracker lives in a monitor, which sets how it alerts. An indexed entity joins by id; an exact name
114
+ // joins by name and type, and fires on newly analyzed media even before the name is indexed. A channel is
115
+ // followed by its YouTube channel id. Each id or name gets one result; attached: false comes with a reason.
116
+ const { monitor } = await client.monitors.create({ name: "Fintech", notify_frequency: "daily" });
117
+ await client.monitors.entities.add({ id: monitor.id, entity_ids: [ramp.id], names: [{ name: "Mercury", type: "organization" }] });
118
+ ```
119
+
120
+ Every method is listed with its request and response types in [reference.md](./reference.md). The same operations, with `curl` samples, are in the [API reference](https://arcmira.com/docs/api-reference).
121
+
122
+ ### Pagination
123
+
124
+ A method that returns a `Page` is an async iterable over rows. `page.data` holds the current rows, `page.response` the raw list response (`has_more`, `next_cursor`), and `page.hasNextPage()` / `page.getNextPage()` walk it by hand.
125
+
126
+ ### Errors
127
+
128
+ Every non-2xx answer throws a subclass of `ArcmiraError` named for the status: `BadRequestError`, `UnauthorizedError`, `PaymentRequiredError`, `ForbiddenError`, `NotFoundError`, `ConflictError`, `TooManyRequestsError`, `InternalServerError` and so on, all under the `Arcmira` namespace. `err.statusCode` is the status and `err.body.error` is the API's error object: `type`, `code`, `message`, `doc_url`, `request_id`, on a plan gate `gate` and `unlock.url`, and `details.quote` on a priced refusal. The envelope is `{ error }` alone. Switch on `type` and `gate` first; `code` is a string whose catalog is in the [errors page](https://arcmira.com/docs/errors).
129
+
130
+ ### Options
131
+
132
+ `new ArcmiraClient({ apiKey, baseUrl, timeoutInSeconds, maxRetries, headers, fetch })`. `apiKey` falls back to `ARCMIRA_API_KEY`. On Cloudflare Workers pass `apiKey` from your binding; the environment fallback reads `process.env`, which exists there only with `nodejs_compat`.
133
+
134
+ ## Command line
135
+
136
+ The package ships the `arcmira` binary. Its commands mirror the client of the [Arcmira MCP server](https://github.com/arcmira/mcp), so a workflow you prototype with an agent runs the same from a shell.
137
+
138
+ ```sh
139
+ npx arcmira login you@example.com # emails a six digit code
140
+ npx arcmira login you@example.com --code 482913 # saves the key; later commands need no ARCMIRA_API_KEY
141
+ npx arcmira whoami
142
+ npx arcmira resolve Ramp # ent_14 organization Ramp
143
+ npx arcmira mentions --entity ent_14 --after 2026-09-01 --before 2026-10-01
144
+ npx arcmira search "agent payments" --limit 3
145
+ npx arcmira resolve TBPN --type channel # the UC id: arcmira sponsors UC-DRzaGnL_vtBUpCFH5M0tg
146
+ npx arcmira follow Ramp --type org --monitor <monitor-id>
147
+ npx arcmira api GET /v1/mentions -f entity_id=ent_14 --paginate
148
+ ```
149
+
150
+ ### Setup
151
+
152
+ `arcmira setup` connects `https://mcp.arcmira.com/mcp` and installs the Arcmira skills in each agent it finds: `arcmira` (the client reference) plus one skill per task (`sponsor-research`, `company-watch`, `find-quotes`, `person-research`, `compare-shows`).
153
+
154
+ | Agent | MCP server | Skills | Updates |
155
+ | --- | --- | --- | --- |
156
+ | Claude Code | the `arcmira` plugin: `claude plugin marketplace add arcmira/mcp`, `claude plugin install arcmira@arcmira` | in the plugin | auto-update on: `autoUpdate: true` on `extraKnownMarketplaces.arcmira` in `~/.claude/settings.json` |
157
+ | Codex | `codex mcp add arcmira --url ...` | `~/.agents/skills/<name>/SKILL.md` | refreshed by a newer `arcmira` |
158
+ | Cursor | `~/.cursor/mcp.json` | `~/.cursor/skills/<name>/SKILL.md` | refreshed by a newer `arcmira` |
159
+ | VS Code | the user profile's `mcp.json` | `~/.copilot/skills/<name>/SKILL.md` | refreshed by a newer `arcmira` |
160
+ | Gemini CLI | `~/.gemini/settings.json` | `~/.gemini/skills/<name>/SKILL.md` | refreshed by a newer `arcmira` |
161
+ | Claude Desktop | printed steps (Customize, then Connectors) | printed steps (a skill upload) | the connector is remote |
162
+
163
+ - Idempotent: an agent that already has the server is left alone, and a second run prints `unchanged` for every line.
164
+ - `--auth oauth` (default) leaves sign-in to each agent, in the browser. `--auth key` sends the key in use as a bearer header instead; Codex reads it from `ARCMIRA_API_KEY`. The key is never printed. With `--auth key`, Claude Code gets `claude mcp add --header ...` and skill copies instead of the plugin, because a plugin's server entry cannot carry your key.
165
+ - `--only <agent>` (repeatable) limits the run, `--dry-run` changes nothing, `--yes` skips the confirmation. Without a key and at a terminal, setup offers the `arcmira login` email flow first.
166
+ - A JSON config that is not plain JSON (comments, trailing commas) is not rewritten; setup prints the entry to add by hand.
167
+
168
+ ### Updates
169
+
170
+ Arcmira changes weekly. Three parts keep you current:
171
+
172
+ - **The MCP server** is remote. Every client fetches its tools and instructions on connect, and `describe` returns the reference from the server on every call, so the MCP server alone is always current.
173
+ - **The Claude Code plugin** updates in the background once auto-update is on. `arcmira setup` turns it on. By hand: run `/plugin`, open **Marketplaces**, pick `arcmira`, and choose **Enable auto-update**. Update now: `claude plugin update arcmira@arcmira`.
174
+ - **Skill copies and this CLI.** `arcmira` checks npm for a newer version at most once a day and prints one line when there is one (`ARCMIRA_NO_UPDATE_CHECK=1` or `CI` turns the check off). Update with `npm i -g arcmira@latest`. The first command the new version runs rewrites every skill directory setup used (recorded in `~/.config/arcmira/setup.json`), adding skills that are new in that version.
175
+
176
+ `arcmira examples` prints worked tasks: resolve a name, check the row, then filter by its id.
177
+
178
+ ### Commands
179
+
180
+ ```text
181
+ Data commands (they mirror the MCP client; filters take ids, arcmira resolve finds them)
182
+ arcmira search <query> spoken transcript passages for a topic or phrase; --about, --by, --entity (ent_ ids), --channel (UC ids), --kind
183
+ arcmira resolve <name> a name to one entity id: the best match, an assumed pick, or options; --context settles close calls
184
+ arcmira mentions --entity <ent_id> where an entity was mentioned, newest first
185
+ arcmira momentum <ent_id>... volume in a window against the one before, for one to four entities; --days 7 to 365
186
+ arcmira sponsors <UC id> recurring sponsors of a YouTube channel
187
+ arcmira recommendations <ent_id> who recommends an entity on air: --kind sponsored, organic, mention or all
188
+ arcmira episodes <UC id> newest indexed videos of a channel
189
+ arcmira transcripts get <video> full transcript of one YouTube video; --quality premium uses credits from your plan
190
+ arcmira transcripts quote <video> free whole-video Premium price
191
+ arcmira occurrences --channel ... ranked counts of the entities a set of channels or videos mention
192
+ arcmira status [UC id] your account and plan, or a channel's coverage
193
+
194
+ Follow and alert (these change the account)
195
+ arcmira trackers create <name> --type T --monitor ID follow an exact name in a monitor; --type person, organization (or org), product, topic, or channel with a UC id
196
+ arcmira trackers list every followed name
197
+ arcmira monitors list monitors with tracker and alert counts
198
+ arcmira monitors create <name> --frequency realtime|hourly|daily [--email ...] [--webhook-url URL] [--slack-integration ID --slack-channel ID]
199
+ arcmira monitors update <id> [--name] [--frequency] [--pause|--resume] ...
200
+ arcmira monitors trackers <id> the names one monitor follows
201
+ arcmira monitors add <id> <ent_id>... follow indexed entities by id on a monitor
202
+ arcmira monitors attach <id> <trk_id>... move existing trackers onto a monitor
203
+ arcmira integrations slack connected Slack workspaces and channels
204
+
205
+ Aliases
206
+ arcmira transcript <video> same as arcmira transcripts get (the MCP client's transcript)
207
+ arcmira follow <name> --type T -m ID same as arcmira trackers create
208
+
209
+ Account
210
+ arcmira setup [--only agent] connect the MCP server and skills to your coding agents, updates on
211
+ arcmira login [email] [--code N] [--key arc_sk_...]
212
+ arcmira logout
213
+ arcmira whoami the account the key spends and your role there, key id and label, plan, scopes, rate limit, credits, and where the key came from
214
+ arcmira auth login same as arcmira login
215
+ arcmira auth logout same as arcmira logout
216
+ arcmira auth status same as arcmira whoami
217
+ arcmira auth token [--reveal] the key in use, masked unless --reveal
218
+
219
+ Any endpoint
220
+ arcmira api <method> <path> -f key=value, -F key=value|@file, -H 'Name: value', --body @file|-, --paginate, --verbose
221
+ arcmira schema [command|operationId] method, path, parameters and body fields, offline
222
+ arcmira docs [query] search the docs, or print their address
223
+ arcmira examples worked examples, resolve first then filter by id
224
+
225
+ Not available yet (each prints the arcmira api call that does the same, and exits 2)
226
+ arcmira feedback, arcmira keys
227
+
228
+ Also: arcmira help [command], --help, --version
229
+ ```
230
+
231
+ Reads take ids. `--entity`, `--about`, `--by` and every entity positional take an `ent_` id; `--channel` and every channel positional take a YouTube channel id (`UC` plus 22 characters). A name or `@handle` there exits 2 before any request, with the `arcmira resolve` command that finds the id. Follows are the one place a name belongs: `arcmira follow Ramp --type org --monitor <monitor-id>` watches the exact name in that monitor, matched case-insensitively in newly analyzed media, and works before Arcmira has indexed it. A channel is followed by its UC id.
232
+
233
+ Every dated command takes `--after` (inclusive) and `--before` (exclusive), as a date or an ISO 8601 datetime with an offset, read in UTC. September is `--after 2026-09-01 --before 2026-10-01`.
234
+
235
+ `arcmira transcripts get <video> --quality premium` is one read. When your account does not own the transcript, the read starts transcribing it, using credits from your plan and then your on-demand budget, and exits 4 while it transcribes, naming the minutes left on stderr. Run the same command again later: it reads the same job and never uses credits twice. When the last transcription failed it exits 1 and names the error; add `--retry` to transcribe it again, which uses credits again. A read your plan and budget cannot cover exits 1 and prints the quote. With `--json` the API body is still printed on stdout, so `arcmira transcripts get X --quality premium --json | jq` fails on the exit code under `set -o pipefail`.
236
+
237
+ `arcmira api` follows `gh api`: `-f` adds a string parameter and `-F` a typed one (`true`, `false`, `null`, numbers, `@file`, `key[]=value`). They go to the query string on GET and DELETE, and into a JSON body otherwise. A POST without `-H 'Idempotency-Key: ...'` gets a generated key; `--verbose` shows it. Reuse the same key and input to retry a write. The path may drop the `/v1` prefix.
238
+
239
+ - Key: `--key`, then `ARCMIRA_API_KEY`, then the key `arcmira login` saved in `~/.config/arcmira/config.json` (mode 0600; `XDG_CONFIG_HOME` is honored). `arcmira login --key arc_sk_...` saves a key you already have; `arcmira logout` deletes it.
240
+ - Output: data on stdout, notes and errors on stderr, no colour. `--json` prints the API response unchanged on stdout; on failure it prints `{"error":{"type","code","message","request_id",...}}` on stderr, the API's own error body or a `usage_error` in the same shape.
241
+ - Errors: every API error names its `request_id` (quote it to support). A 401 adds `try: arcmira login`.
242
+ - Paging: `mentions`, `recommendations` and `episodes` take `--cursor`; the next page's command is printed on stderr, and `next_cursor` is in `--json`. `arcmira api --paginate` follows every page.
243
+ - Exit codes: 0 ok, 1 an API or network error (the message names the code, any unlock link, and the quote on a priced refusal), 2 a usage error (bad input, a name where an id belongs, no key, a command or flag not available yet or retired), 4 Premium is still transcribing (run the same command again later). Input is checked before any request. Exit 3 is retired.
244
+ - Writes (`trackers create`, `monitors create|update|add|attach`) send a fresh `Idempotency-Key`, so the CLI's one retry never applies a write twice.
245
+ - Reserved flags: `--dry-run`, `--force`, `-y`/`--yes`, `--profile` and `--jq` exit 2 in this version outside `arcmira setup`; their names are held for write commands to come.
246
+ - Requests carry `User-Agent: arcmira-cli/<version>`. The SDK used on its own sends `arcmira/<version>`.
247
+ - Telemetry: none. The CLI sends only the API requests you ask for, plus a docs search when you run `arcmira docs <query>`.
248
+ - Environment: `ARCMIRA_API_KEY`, `ARCMIRA_BASE_URL` (API origin), `ARCMIRA_DOCS_URL` (docs origin, for tests), `XDG_CONFIG_HOME`, `NO_COLOR`.
249
+
250
+ `arcmira <command> --help` lists each option with examples. `scripts/cli-audit/conformance.mjs` scores every command against a local fake of the API.
251
+
252
+ ## Links
253
+
254
+ - Docs: https://arcmira.com/docs
255
+ - API reference: https://arcmira.com/docs/api-reference
256
+ - Python SDK: https://github.com/arcmira/python (`pip install arcmira`)
257
+ - MCP server for agents: https://github.com/arcmira/mcp, what it does: https://arcmira.com/mcp
258
+ - Developers page: https://arcmira.com/developers
259
+ - Agent index: https://arcmira.com/llms.txt
260
+
261
+ ## Development
262
+
263
+ `src/` is generated from the Arcmira OpenAPI document by [Fern](https://github.com/fern-api/fern); do not edit it by hand, a regeneration overwrites it. `cli/` (except `cli/operations.ts`), `tests/` (except `tests/fixtures/v1.json`) and this file are hand-written. `npm test` builds and runs the tests against a local fake of the API (`tests/fake-v1.mjs`, bodies in `tests/fixtures/v1.json`, written from `fern/openapi.json` by `scripts/build-fixtures.py`).
264
+
265
+ ## License
266
+
267
+ Apache-2.0. See [LICENSE](./LICENSE).
268
+
269
+ ## Regenerate the SDK
270
+
271
+ Run `npm run generate -- <path to arcmira-v1.json>` with Node 22 or newer, Python 3, Docker, and Fern access for the `arcmira` organization. It vendors the spec into `fern/openapi.json` (omit the path to reuse the vendored copy), pins Fern CLI 5.131.1 and TypeScript generator 3.96.0, disables CLI version redirection and telemetry, and regenerates `src/`, `reference.md`, `cli/operations.ts` and the test fixtures.
272
+
273
+ `fern/method-names.json` names the SDK group and method of every operation by its `operationId`; an operation it does not name, or a name for an operation the spec lacks, fails generation. The overlay combines success schemas into a `state` union and discovers cursor collections from their schemas. The installer rewrites the `exports` map in `package.json` from the generated resources. Unknown or ambiguous collections fail generation. An exact checked patch keeps request timer cleanup in `finally` until the pinned generator includes the fix. Generated source is never edited by hand.
274
+
275
+ Run `npm test` for the SDK and CLI tests, and `npm run test:types` for the consumer type contract. Tests use local HTTP fixtures and use no credits.
276
+
277
+ Upgrading from 0.3: see [CHANGELOG.md](./CHANGELOG.md) for every removed method and its replacement.
package/README.md CHANGED
@@ -1,14 +1,8 @@
1
- # Arcmira: YouTube Transcript Search
1
+ # Arcmira for TypeScript and JavaScript
2
2
 
3
- The official TypeScript SDK and CLI for searching indexed YouTube transcripts. Find timestamped quotes, speaker appearances, mentions, sponsors and recommendations.
3
+ Pull YouTube transcripts, search spoken passages, and monitor company mentions with Arcmira. Results include timestamps and source links for research, citations, and agent workflows.
4
4
 
5
- [Arcmira](https://arcmira.com) · [API docs](https://arcmira.com/docs) · [OpenAPI schema](https://api.arcmira.com/v1/openapi.json) · [MCP setup](https://arcmira.com/docs/mcp-server)
6
-
7
- - Zero runtime dependencies. Uses the global `fetch`, so it runs in Node 18 and later, Cloudflare Workers, Deno, Bun and browsers.
8
- - ESM and CommonJS builds with types.
9
- - Every list pages itself. Every error is a typed class carrying the parsed API body.
10
- - The whole documented API: search, transcripts (Premium included), mentions, momentum, sponsors and recommendations, monitors, trackers, Slack integrations and feedback.
11
- - Reads take ids (`ent_14`, `UC...`). `entities.resolve` turns a name into one.
5
+ [Get an API key](https://arcmira.com/docs/authentication) · [API docs](https://arcmira.com/docs) · [Pricing](https://arcmira.com/pricing)
12
6
 
13
7
  ## Install
14
8
 
@@ -16,262 +10,105 @@ The official TypeScript SDK and CLI for searching indexed YouTube transcripts. F
16
10
  npm install arcmira
17
11
  ```
18
12
 
19
- We prefer [pnpm](https://pnpm.io) as our JavaScript package manager (`pnpm add arcmira`). [Bun](https://bun.sh) is also great (`bun add arcmira`).
20
-
21
- To give your coding agent Arcmira, run setup. It finds Claude Code, Codex, Cursor, VS Code, Gemini CLI and Claude Desktop, adds the [Arcmira MCP server](https://github.com/arcmira/mcp) to each, installs the Arcmira skills, and turns updates on. Arcmira ships changes weekly, so keep them on:
22
-
23
- ```sh
24
- npx arcmira setup --dry-run # print what would change
25
- npx arcmira setup # apply, then sign in once per agent
26
- ```
27
-
28
- Get a key at [arcmira.com/docs/authentication](https://arcmira.com/docs/authentication) and set `ARCMIRA_API_KEY`, or pass `apiKey` to the client.
13
+ Set `ARCMIRA_API_KEY` to your API key. The examples below work in TypeScript or JavaScript. Save one as `example.mjs` and run `node example.mjs`.
29
14
 
30
- ## Premium transcripts
15
+ ## Find quotes with source links
31
16
 
32
- A Premium read uses credits from your plan, then your on-demand budget. `transcripts.quote({ video_id })` shows how many credits a read of the video will use, free, before you read it.
17
+ Search YouTube and podcast transcripts by topic. Keep the source link beside each quote so readers can check the original.
33
18
 
34
19
  ```ts
35
20
  import { ArcmiraClient } from "arcmira";
36
- const arcmira = new ArcmiraClient();
37
- const read = await arcmira.transcripts.get({ video_id: "dQw4w9WgXcQ", quality: "premium" });
38
- if (read.state === "ready") {
39
- for (const line of read.lines ?? []) console.log(line.speaker, line.text);
40
- } else if (read.state === "failed") {
41
- throw new Error(`${read.last_attempt.status}: ${read.last_attempt.error}`);
42
- } else {
43
- console.log(`transcribing, read again in ${read.job.next_poll_seconds ?? 30} s`);
21
+
22
+ const client = new ArcmiraClient({ apiKey: process.env.ARCMIRA_API_KEY });
23
+ const hits = await client.transcripts.search({ q: "agent payments", limit: 5 });
24
+ for (const hit of hits.chunks) {
25
+ console.log(hit.text);
26
+ console.log(new URL(hit.watch_url, "https://arcmira.com").href);
44
27
  }
28
+ console.log(hits.note);
45
29
  ```
46
30
 
47
- A Premium read is one GET. When your account does not own the transcript yet, the read starts transcribing it and uses credits from your plan, then your on-demand budget. You set that budget in the dashboard, and Arcmira enforces it, so no call takes a spending amount. The answer is `state: "ready"` (HTTP 200) with the lines, or `state: "pending"` (HTTP 202) with the `job` while it transcribes. Read again after `Retry-After` or `job.next_poll_seconds`. Repeated and concurrent reads join the same job and never use credits twice. When the last transcription failed or was refunded, the read answers `state: "failed"` (HTTP 200) with `last_attempt` and uses no credits; read with `retry: true` to transcribe it again, which uses credits again. `transcripts.quote({ video_id })` shows the credits first, free.
31
+ Search covers indexed transcripts within your plan's date window. Check `window`, `search_index`, and `note` before treating an empty result as evidence that nobody said it.
48
32
 
49
- A read your plan and budget cannot cover throws instead. `PaymentRequiredError` carries `quota_exceeded` or `spend_limit_exceeded`, and `ForbiddenError` carries `paid_plan_required` on a free plan. Both carry the price in `err.body.error.details.quote`.
50
-
51
- ```ts
52
- import { Arcmira } from "arcmira";
53
- const sleep = (s: number) => new Promise((done) => setTimeout(done, s * 1000));
54
- async function premium(video_id: string) {
55
- for (;;) {
56
- const { data, rawResponse } = await arcmira.transcripts.get({ video_id, quality: "premium" }).withRawResponse();
57
- if (data.state === "ready") return data;
58
- if (data.state === "failed") throw new Error(`${data.last_attempt.status}: ${data.last_attempt.error}`);
59
- await sleep(Number(rawResponse.headers.get("retry-after")) || data.job.next_poll_seconds || 30);
60
- }
61
- }
62
- try {
63
- console.log((await premium("dQw4w9WgXcQ")).speakers);
64
- } catch (err) {
65
- if (err instanceof Arcmira.PaymentRequiredError || err instanceof Arcmira.ForbiddenError) console.log(err.body.error.code, err.body.error.details?.quote);
66
- else throw err;
67
- }
68
- ```
33
+ ## Pull a YouTube transcript
69
34
 
70
- ## Quickstart
35
+ Read available captions with timestamps. Replace the video id with the video you need.
71
36
 
72
37
  ```ts
73
- import { Arcmira, ArcmiraClient } from "arcmira";
38
+ import { ArcmiraClient } from "arcmira";
74
39
 
75
40
  const client = new ArcmiraClient({ apiKey: process.env.ARCMIRA_API_KEY });
76
-
77
- // Who is "Ramp"? Reads take ids, so resolve the name first. The answer is best (one row is meant),
78
- // suggested (one row stands out: use it and say you assumed it), or ask (show the options to the user).
79
- // context carries the user's own words about the name and settles close calls.
80
- const resolved = await client.entities.resolve({ q: "Ramp", context: "the corporate card company" });
81
- const ramp = resolved.best ?? resolved.suggested;
82
- if (!ramp) throw new Error(resolved.ask ? `${resolved.ask.question} ${resolved.ask.options.map((o) => o.label).join("; ")}` : "no match");
83
- if (resolved.suggested) console.log(`Assuming ${ramp.name} (${ramp.type}): ${resolved.suggested.evidence}`);
84
- console.log(ramp.id, ramp.type, ramp.page);
85
-
86
- // Spoken passages that answer a phrase. about, by, entity_ids and channel_ids take ids only; a name answers 400 id_required.
87
- // kind is sponsored, organic or mention. after is inclusive and before exclusive, in UTC.
88
- const hits = await client.transcripts.search({ q: "corporate cards", about: ramp.id, kind: "sponsored", after: "2026-09-01", before: "2026-10-01", limit: 5 });
89
- for (const chunk of hits.chunks) console.log(chunk.channel_name, chunk.published_at, chunk.watch_url, chunk.text);
90
- // The window and index state come back with every search: say where the results stop.
91
- if (hits.window.before) console.log(`results stop before ${hits.window.before}`);
92
- if (hits.search_index.missing_before) console.log(`transcripts before ${hits.search_index.missing_before} are still being added`);
93
-
94
- // Catalog rows page themselves: iterate and the client follows next_cursor. Each row uses credits, so stop when you have enough.
95
- let seen = 0;
96
- for await (const mention of await client.mentions.list({ entity_id: ramp.id, after: "2026-09-01", limit: 25 })) {
97
- console.log(mention.media.title, mention.start_seconds);
98
- if (++seen === 40) break;
41
+ const transcript = await client.transcripts.get({ video_id: "dQw4w9WgXcQ" });
42
+ if (transcript.state === "ready") {
43
+ for (const line of transcript.lines ?? []) console.log(line.start, line.text);
99
44
  }
100
-
101
- // Who recommends it on air, and whether they were paid.
102
- for await (const row of await client.recommendations.list({ entity_id: ramp.id, class: "organic", limit: 10 })) console.log(row.class, row.verbatim_quote);
103
-
104
- // Gates and failures are typed. The body is the API's error object.
105
- try {
106
- const momentum = await client.entities.momentum({ id: ramp.id });
107
- console.log(momentum.verdict, momentum.volume);
108
- } catch (err) {
109
- if (err instanceof Arcmira.PaymentRequiredError) console.log(err.body.error.gate, err.body.error.unlock?.url);
110
- else throw err;
111
- }
112
-
113
- // Every tracker lives in a monitor, which sets how it alerts. An indexed entity joins by id; an exact name
114
- // joins by name and type, and fires on newly analyzed media even before the name is indexed. A channel is
115
- // followed by its YouTube channel id. Each id or name gets one result; attached: false comes with a reason.
116
- const { monitor } = await client.monitors.create({ name: "Fintech", notify_frequency: "daily" });
117
- await client.monitors.entities.add({ id: monitor.id, entity_ids: [ramp.id], names: [{ name: "Mercury", type: "organization" }] });
118
45
  ```
119
46
 
120
- Every method is listed with its request and response types in [reference.md](./reference.md). The same operations, with `curl` samples, are in the [API reference](https://arcmira.com/docs/api-reference).
121
-
122
- ### Pagination
47
+ For a Premium transcript with speaker labels, first call `client.transcripts.quote({ video_id })` for a free quote, then read with `quality: "premium"`. A Premium read uses credits from your plan, then your on-demand budget. It may return `pending`; poll after `job.next_poll_seconds`. A `failed` result needs an explicit retry. [Premium states and polling](https://github.com/arcmira/arcmira/blob/master/GUIDE.md#premium-transcripts).
123
48
 
124
- A method that returns a `Page` is an async iterable over rows. `page.data` holds the current rows, `page.response` the raw list response (`has_more`, `next_cursor`), and `page.hasNextPage()` / `page.getNextPage()` walk it by hand.
49
+ ## Monitor company mentions
125
50
 
126
- ### Errors
51
+ Follow an exact name in newly analyzed media, even before it is indexed. Replace `you@example.com` with your alert address. External recipients must confirm before delivery.
127
52
 
128
- Every non-2xx answer throws a subclass of `ArcmiraError` named for the status: `BadRequestError`, `UnauthorizedError`, `PaymentRequiredError`, `ForbiddenError`, `NotFoundError`, `ConflictError`, `TooManyRequestsError`, `InternalServerError` and so on, all under the `Arcmira` namespace. `err.statusCode` is the status and `err.body.error` is the API's error object: `type`, `code`, `message`, `doc_url`, `request_id`, on a plan gate `gate` and `unlock.url`, and `details.quote` on a priced refusal. The envelope is `{ error }` alone. Switch on `type` and `gate` first; `code` is a string whose catalog is in the [errors page](https://arcmira.com/docs/errors).
129
-
130
- ### Options
131
-
132
- `new ArcmiraClient({ apiKey, baseUrl, timeoutInSeconds, maxRetries, headers, fetch })`. `apiKey` falls back to `ARCMIRA_API_KEY`. On Cloudflare Workers pass `apiKey` from your binding; the environment fallback reads `process.env`, which exists there only with `nodejs_compat`.
133
-
134
- ## Command line
135
-
136
- The package ships the `arcmira` binary. Its commands mirror the client of the [Arcmira MCP server](https://github.com/arcmira/mcp), so a workflow you prototype with an agent runs the same from a shell.
137
-
138
- ```sh
139
- npx arcmira login you@example.com # emails a six digit code
140
- npx arcmira login you@example.com --code 482913 # saves the key; later commands need no ARCMIRA_API_KEY
141
- npx arcmira whoami
142
- npx arcmira resolve Ramp # ent_14 organization Ramp
143
- npx arcmira mentions --entity ent_14 --after 2026-09-01 --before 2026-10-01
144
- npx arcmira search "agent payments" --limit 3
145
- npx arcmira resolve TBPN --type channel # the UC id: arcmira sponsors UC-DRzaGnL_vtBUpCFH5M0tg
146
- npx arcmira follow Ramp --type org --monitor <monitor-id>
147
- npx arcmira api GET /v1/mentions -f entity_id=ent_14 --paginate
148
- ```
53
+ ```ts
54
+ import { ArcmiraClient } from "arcmira";
149
55
 
150
- ### Setup
151
-
152
- `arcmira setup` connects `https://mcp.arcmira.com/mcp` and installs the Arcmira skills in each agent it finds: `arcmira` (the client reference) plus one skill per task (`sponsor-research`, `company-watch`, `find-quotes`, `person-research`, `compare-shows`).
153
-
154
- | Agent | MCP server | Skills | Updates |
155
- | --- | --- | --- | --- |
156
- | Claude Code | the `arcmira` plugin: `claude plugin marketplace add arcmira/mcp`, `claude plugin install arcmira@arcmira` | in the plugin | auto-update on: `autoUpdate: true` on `extraKnownMarketplaces.arcmira` in `~/.claude/settings.json` |
157
- | Codex | `codex mcp add arcmira --url ...` | `~/.agents/skills/<name>/SKILL.md` | refreshed by a newer `arcmira` |
158
- | Cursor | `~/.cursor/mcp.json` | `~/.cursor/skills/<name>/SKILL.md` | refreshed by a newer `arcmira` |
159
- | VS Code | the user profile's `mcp.json` | `~/.copilot/skills/<name>/SKILL.md` | refreshed by a newer `arcmira` |
160
- | Gemini CLI | `~/.gemini/settings.json` | `~/.gemini/skills/<name>/SKILL.md` | refreshed by a newer `arcmira` |
161
- | Claude Desktop | printed steps (Customize, then Connectors) | printed steps (a skill upload) | the connector is remote |
162
-
163
- - Idempotent: an agent that already has the server is left alone, and a second run prints `unchanged` for every line.
164
- - `--auth oauth` (default) leaves sign-in to each agent, in the browser. `--auth key` sends the key in use as a bearer header instead; Codex reads it from `ARCMIRA_API_KEY`. The key is never printed. With `--auth key`, Claude Code gets `claude mcp add --header ...` and skill copies instead of the plugin, because a plugin's server entry cannot carry your key.
165
- - `--only <agent>` (repeatable) limits the run, `--dry-run` changes nothing, `--yes` skips the confirmation. Without a key and at a terminal, setup offers the `arcmira login` email flow first.
166
- - A JSON config that is not plain JSON (comments, trailing commas) is not rewritten; setup prints the entry to add by hand.
167
-
168
- ### Updates
169
-
170
- Arcmira changes weekly. Three parts keep you current:
171
-
172
- - **The MCP server** is remote. Every client fetches its tools and instructions on connect, and `describe` returns the reference from the server on every call, so the MCP server alone is always current.
173
- - **The Claude Code plugin** updates in the background once auto-update is on. `arcmira setup` turns it on. By hand: run `/plugin`, open **Marketplaces**, pick `arcmira`, and choose **Enable auto-update**. Update now: `claude plugin update arcmira@arcmira`.
174
- - **Skill copies and this CLI.** `arcmira` checks npm for a newer version at most once a day and prints one line when there is one (`ARCMIRA_NO_UPDATE_CHECK=1` or `CI` turns the check off). Update with `npm i -g arcmira@latest`. The first command the new version runs rewrites every skill directory setup used (recorded in `~/.config/arcmira/setup.json`), adding skills that are new in that version.
175
-
176
- `arcmira examples` prints worked tasks: resolve a name, check the row, then filter by its id.
177
-
178
- ### Commands
179
-
180
- ```text
181
- Data commands (they mirror the MCP client; filters take ids, arcmira resolve finds them)
182
- arcmira search <query> spoken transcript passages for a topic or phrase; --about, --by, --entity (ent_ ids), --channel (UC ids), --kind
183
- arcmira resolve <name> a name to one entity id: the best match, an assumed pick, or options; --context settles close calls
184
- arcmira mentions --entity <ent_id> where an entity was mentioned, newest first
185
- arcmira momentum <ent_id>... volume in a window against the one before, for one to four entities; --days 7 to 365
186
- arcmira sponsors <UC id> recurring sponsors of a YouTube channel
187
- arcmira recommendations <ent_id> who recommends an entity on air: --kind sponsored, organic, mention or all
188
- arcmira episodes <UC id> newest indexed videos of a channel
189
- arcmira transcripts get <video> full transcript of one YouTube video; --quality premium uses credits from your plan
190
- arcmira transcripts quote <video> free whole-video Premium price
191
- arcmira occurrences --channel ... ranked counts of the entities a set of channels or videos mention
192
- arcmira status [UC id] your account and plan, or a channel's coverage
193
-
194
- Follow and alert (these change the account)
195
- arcmira trackers create <name> --type T --monitor ID follow an exact name in a monitor; --type person, organization (or org), product, topic, or channel with a UC id
196
- arcmira trackers list every followed name
197
- arcmira monitors list monitors with tracker and alert counts
198
- arcmira monitors create <name> --frequency realtime|hourly|daily [--email ...] [--webhook-url URL] [--slack-integration ID --slack-channel ID]
199
- arcmira monitors update <id> [--name] [--frequency] [--pause|--resume] ...
200
- arcmira monitors trackers <id> the names one monitor follows
201
- arcmira monitors add <id> <ent_id>... follow indexed entities by id on a monitor
202
- arcmira monitors attach <id> <trk_id>... move existing trackers onto a monitor
203
- arcmira integrations slack connected Slack workspaces and channels
204
-
205
- Aliases
206
- arcmira transcript <video> same as arcmira transcripts get (the MCP client's transcript)
207
- arcmira follow <name> --type T -m ID same as arcmira trackers create
208
-
209
- Account
210
- arcmira setup [--only agent] connect the MCP server and skills to your coding agents, updates on
211
- arcmira login [email] [--code N] [--key arc_sk_...]
212
- arcmira logout
213
- arcmira whoami the account the key spends and your role there, key id and label, plan, scopes, rate limit, credits, and where the key came from
214
- arcmira auth login same as arcmira login
215
- arcmira auth logout same as arcmira logout
216
- arcmira auth status same as arcmira whoami
217
- arcmira auth token [--reveal] the key in use, masked unless --reveal
218
-
219
- Any endpoint
220
- arcmira api <method> <path> -f key=value, -F key=value|@file, -H 'Name: value', --body @file|-, --paginate, --verbose
221
- arcmira schema [command|operationId] method, path, parameters and body fields, offline
222
- arcmira docs [query] search the docs, or print their address
223
- arcmira examples worked examples, resolve first then filter by id
224
-
225
- Not available yet (each prints the arcmira api call that does the same, and exits 2)
226
- arcmira feedback, arcmira keys
227
-
228
- Also: arcmira help [command], --help, --version
56
+ const client = new ArcmiraClient({ apiKey: process.env.ARCMIRA_API_KEY });
57
+ const { monitor } = await client.monitors.create({
58
+ name: "Company watch",
59
+ notify_frequency: "daily",
60
+ notify_emails: ["you@example.com"],
61
+ });
62
+ const { results } = await client.monitors.entities.add({
63
+ id: monitor.id,
64
+ names: [{ name: "Ramp", type: "organization" }],
65
+ });
66
+ for (const result of results) {
67
+ console.log(result.attached ? result.tracker_id : result.reason);
68
+ }
229
69
  ```
230
70
 
231
- Reads take ids. `--entity`, `--about`, `--by` and every entity positional take an `ent_` id; `--channel` and every channel positional take a YouTube channel id (`UC` plus 22 characters). A name or `@handle` there exits 2 before any request, with the `arcmira resolve` command that finds the id. Follows are the one place a name belongs: `arcmira follow Ramp --type org --monitor <monitor-id>` watches the exact name in that monitor, matched case-insensitively in newly analyzed media, and works before Arcmira has indexed it. A channel is followed by its UC id.
232
-
233
- Every dated command takes `--after` (inclusive) and `--before` (exclusive), as a date or an ISO 8601 datetime with an offset, read in UTC. September is `--after 2026-09-01 --before 2026-10-01`.
71
+ This creates a monitor and tracker in your account. Creation is free; delivered alerts use credits from your plan, then your on-demand budget. Check each `attached` result because a name may already belong to another monitor. For retries of writes, reuse the same `Idempotency-Key`.
234
72
 
235
- `arcmira transcripts get <video> --quality premium` is one read. When your account does not own the transcript, the read starts transcribing it, using credits from your plan and then your on-demand budget, and exits 4 while it transcribes, naming the minutes left on stderr. Run the same command again later: it reads the same job and never uses credits twice. When the last transcription failed it exits 1 and names the error; add `--retry` to transcribe it again, which uses credits again. A read your plan and budget cannot cover exits 1 and prints the quote. With `--json` the API body is still printed on stdout, so `arcmira transcripts get X --quality premium --json | jq` fails on the exit code under `set -o pipefail`.
73
+ ## Choose the next task
236
74
 
237
- `arcmira api` follows `gh api`: `-f` adds a string parameter and `-F` a typed one (`true`, `false`, `null`, numbers, `@file`, `key[]=value`). They go to the query string on GET and DELETE, and into a JSON body otherwise. A POST without `-H 'Idempotency-Key: ...'` gets a generated key; `--verbose` shows it. Reuse the same key and input to retry a write. The path may drop the `/v1` prefix.
75
+ | Task | SDK call |
76
+ | --- | --- |
77
+ | Find a company, person, or show | `entities.resolve({ q, context })` |
78
+ | Read mentions of an entity | `mentions.list({ entity_id })` |
79
+ | Find a channel's sponsors | `channels.sponsors.list({ id: channel_id })` |
80
+ | Separate recommendations from paid mentions | `recommendations.list({ entity_id, class: "organic" })` |
81
+ | Read alerts from a monitor | `monitors.alerts.list({ id: monitor_id })` |
238
82
 
239
- - Key: `--key`, then `ARCMIRA_API_KEY`, then the key `arcmira login` saved in `~/.config/arcmira/config.json` (mode 0600; `XDG_CONFIG_HOME` is honored). `arcmira login --key arc_sk_...` saves a key you already have; `arcmira logout` deletes it.
240
- - Output: data on stdout, notes and errors on stderr, no colour. `--json` prints the API response unchanged on stdout; on failure it prints `{"error":{"type","code","message","request_id",...}}` on stderr, the API's own error body or a `usage_error` in the same shape.
241
- - Errors: every API error names its `request_id` (quote it to support). A 401 adds `try: arcmira login`.
242
- - Paging: `mentions`, `recommendations` and `episodes` take `--cursor`; the next page's command is printed on stderr, and `next_cursor` is in `--json`. `arcmira api --paginate` follows every page.
243
- - Exit codes: 0 ok, 1 an API or network error (the message names the code, any unlock link, and the quote on a priced refusal), 2 a usage error (bad input, a name where an id belongs, no key, a command or flag not available yet or retired), 4 Premium is still transcribing (run the same command again later). Input is checked before any request. Exit 3 is retired.
244
- - Writes (`trackers create`, `monitors create|update|add|attach`) send a fresh `Idempotency-Key`, so the CLI's one retry never applies a write twice.
245
- - Reserved flags: `--dry-run`, `--force`, `-y`/`--yes`, `--profile` and `--jq` exit 2 in this version outside `arcmira setup`; their names are held for write commands to come.
246
- - Requests carry `User-Agent: arcmira-cli/<version>`. The SDK used on its own sends `arcmira/<version>`.
247
- - Telemetry: none. The CLI sends only the API requests you ask for, plus a docs search when you run `arcmira docs <query>`.
248
- - Environment: `ARCMIRA_API_KEY`, `ARCMIRA_BASE_URL` (API origin), `ARCMIRA_DOCS_URL` (docs origin, for tests), `XDG_CONFIG_HOME`, `NO_COLOR`.
83
+ Entity filters take ids. Resolve names first; explain a `suggested` match and ask the user when the resolver returns `ask`. Use `after` inclusive and `before` exclusive for date windows. Paginated methods fetch more rows as you iterate, so stop when you have enough.
249
84
 
250
- `arcmira <command> --help` lists each option with examples. `scripts/cli-audit/conformance.mjs` scores every command against a local fake of the API.
85
+ ## Use with an AI agent
251
86
 
252
- ## Links
87
+ For tasks such as "pull YouTube transcripts", "find quotes with timestamps", "research podcast sponsors", or "monitor company mentions", connect the [Arcmira MCP server](https://github.com/arcmira/mcp). It gives your agent the same API and task skills.
253
88
 
254
- - Docs: https://arcmira.com/docs
255
- - API reference: https://arcmira.com/docs/api-reference
256
- - Python SDK: https://github.com/arcmira/python (`pip install arcmira`)
257
- - MCP server for agents: https://github.com/arcmira/mcp, what it does: https://arcmira.com/mcp
258
- - Developers page: https://arcmira.com/developers
259
- - Agent index: https://arcmira.com/llms.txt
260
-
261
- ## Development
89
+ ```sh
90
+ npx arcmira setup
91
+ ```
262
92
 
263
- `src/` is generated from the Arcmira OpenAPI document by [Fern](https://github.com/fern-api/fern); do not edit it by hand, a regeneration overwrites it. `cli/` (except `cli/operations.ts`), `tests/` and this file are hand-written. `npm test` builds and runs the tests against a local fake of the API (`tests/fake-v1.mjs`, bodies in `tests/fixtures/v1.json`).
93
+ Setup supports Claude Code, Codex, Cursor, VS Code, Gemini CLI, and Claude Desktop. The [agent index](https://arcmira.com/llms.txt) links to current API and citation guidance.
264
94
 
265
- ## License
95
+ ## Command line
266
96
 
267
- Apache-2.0. See [LICENSE](./LICENSE).
97
+ ```sh
98
+ npx arcmira search "agent payments" --limit 5
99
+ npx arcmira transcripts get dQw4w9WgXcQ
100
+ npx arcmira help
101
+ ```
268
102
 
269
- ## Regenerate the SDK
103
+ [CLI commands and options](https://github.com/arcmira/arcmira/blob/master/GUIDE.md#command-line). The CLI sends no telemetry. It makes the requests you ask for and checks npm for updates.
270
104
 
271
- Run `npm run generate -- <path to arcmira-v1.json>` with Node 22 or newer, Python 3, Docker, and Fern access for the `arcmira` organization. It vendors the spec into `fern/openapi.json` (omit the path to reuse the vendored copy), pins Fern CLI 5.131.1 and TypeScript generator 3.96.0, disables CLI version redirection and telemetry, and regenerates `src/`, `reference.md` and `cli/operations.ts`.
105
+ ## Reference
272
106
 
273
- `fern/method-names.json` names the SDK group and method of every operation by its `operationId`; an operation it does not name, or a name for an operation the spec lacks, fails generation. The overlay combines success schemas into a `state` union and discovers cursor collections from their schemas. The installer rewrites the `exports` map in `package.json` from the generated resources. Unknown or ambiguous collections fail generation. An exact checked patch keeps request timer cleanup in `finally` until the pinned generator includes the fix. Generated source is never edited by hand.
107
+ - [SDK guide](https://github.com/arcmira/arcmira/blob/master/GUIDE.md): typed errors, pagination, Premium polling, client options, and the CLI.
108
+ - [Method reference](https://github.com/arcmira/arcmira/blob/master/reference.md): request and response types for every method.
109
+ - [Python SDK](https://github.com/arcmira/python).
110
+ - [Release notes](https://github.com/arcmira/arcmira/blob/master/CHANGELOG.md).
274
111
 
275
- Run `npm test` for the SDK and CLI tests, and `npm run test:types` for the consumer type contract. Tests use local HTTP fixtures and use no credits.
112
+ Zero runtime dependencies. Node.js 18+ supports ESM and CommonJS. [Deno installation](https://jsr.io/@arcmira/sdk). For Workers, pass your API key from a server-side binding. Keep API keys on the server in browser applications.
276
113
 
277
- Upgrading from 0.3: see [CHANGELOG.md](./CHANGELOG.md) for every removed method and its replacement.
114
+ Apache-2.0. [Source](https://github.com/arcmira/arcmira) · [License](https://github.com/arcmira/arcmira/blob/master/LICENSE).
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "arcmira",
46
- "X-Fern-SDK-Version": "0.6.0",
47
- "User-Agent": "arcmira/0.6.0",
46
+ "X-Fern-SDK-Version": "0.6.2",
47
+ "User-Agent": "arcmira/0.6.2",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -115,6 +115,8 @@ export declare namespace ChannelSponsorsResponse {
115
115
  interface Details {
116
116
  quote?: Arcmira.RefusedQuote | undefined;
117
117
  limit?: Arcmira.Limit | undefined;
118
+ /** On terms_acceptance_required: the page where the person accepts the updated Terms of Service. On terms_updated: the Terms of Service page. */
119
+ url?: string | undefined;
118
120
  }
119
121
  }
120
122
  }
@@ -159,6 +159,8 @@ export declare namespace EntityMomentumResponse {
159
159
  interface Details {
160
160
  quote?: Arcmira.RefusedQuote | undefined;
161
161
  limit?: Arcmira.Limit | undefined;
162
+ /** On terms_acceptance_required: the page where the person accepts the updated Terms of Service. On terms_updated: the Terms of Service page. */
163
+ url?: string | undefined;
162
164
  }
163
165
  }
164
166
  /**
@@ -89,6 +89,8 @@ export declare namespace Error_ {
89
89
  interface Details {
90
90
  quote?: Arcmira.RefusedQuote | undefined;
91
91
  limit?: Arcmira.Limit | undefined;
92
+ /** On terms_acceptance_required: the page where the person accepts the updated Terms of Service. On terms_updated: the Terms of Service page. */
93
+ url?: string | undefined;
92
94
  }
93
95
  }
94
96
  }
@@ -175,6 +175,8 @@ export declare namespace TranscriptResponse {
175
175
  interface Details {
176
176
  quote?: Arcmira.RefusedQuote | undefined;
177
177
  limit?: Arcmira.Limit | undefined;
178
+ /** On terms_acceptance_required: the page where the person accepts the updated Terms of Service. On terms_updated: the Terms of Service page. */
179
+ url?: string | undefined;
178
180
  }
179
181
  }
180
182
  }
@@ -153,6 +153,8 @@ export declare namespace TranscriptSearchResponse {
153
153
  interface Details {
154
154
  quote?: Arcmira.RefusedQuote | undefined;
155
155
  limit?: Arcmira.Limit | undefined;
156
+ /** On terms_acceptance_required: the page where the person accepts the updated Terms of Service. On terms_updated: the Terms of Service page. */
157
+ url?: string | undefined;
156
158
  }
157
159
  }
158
160
  /**
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.6.0";
1
+ export declare const SDK_VERSION = "0.6.2";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.6.0";
4
+ exports.SDK_VERSION = "0.6.2";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "arcmira",
9
- "X-Fern-SDK-Version": "0.6.0",
10
- "User-Agent": "arcmira/0.6.0",
9
+ "X-Fern-SDK-Version": "0.6.2",
10
+ "User-Agent": "arcmira/0.6.2",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -115,6 +115,8 @@ export declare namespace ChannelSponsorsResponse {
115
115
  interface Details {
116
116
  quote?: Arcmira.RefusedQuote | undefined;
117
117
  limit?: Arcmira.Limit | undefined;
118
+ /** On terms_acceptance_required: the page where the person accepts the updated Terms of Service. On terms_updated: the Terms of Service page. */
119
+ url?: string | undefined;
118
120
  }
119
121
  }
120
122
  }
@@ -159,6 +159,8 @@ export declare namespace EntityMomentumResponse {
159
159
  interface Details {
160
160
  quote?: Arcmira.RefusedQuote | undefined;
161
161
  limit?: Arcmira.Limit | undefined;
162
+ /** On terms_acceptance_required: the page where the person accepts the updated Terms of Service. On terms_updated: the Terms of Service page. */
163
+ url?: string | undefined;
162
164
  }
163
165
  }
164
166
  /**
@@ -89,6 +89,8 @@ export declare namespace Error_ {
89
89
  interface Details {
90
90
  quote?: Arcmira.RefusedQuote | undefined;
91
91
  limit?: Arcmira.Limit | undefined;
92
+ /** On terms_acceptance_required: the page where the person accepts the updated Terms of Service. On terms_updated: the Terms of Service page. */
93
+ url?: string | undefined;
92
94
  }
93
95
  }
94
96
  }
@@ -175,6 +175,8 @@ export declare namespace TranscriptResponse {
175
175
  interface Details {
176
176
  quote?: Arcmira.RefusedQuote | undefined;
177
177
  limit?: Arcmira.Limit | undefined;
178
+ /** On terms_acceptance_required: the page where the person accepts the updated Terms of Service. On terms_updated: the Terms of Service page. */
179
+ url?: string | undefined;
178
180
  }
179
181
  }
180
182
  }
@@ -153,6 +153,8 @@ export declare namespace TranscriptSearchResponse {
153
153
  interface Details {
154
154
  quote?: Arcmira.RefusedQuote | undefined;
155
155
  limit?: Arcmira.Limit | undefined;
156
+ /** On terms_acceptance_required: the page where the person accepts the updated Terms of Service. On terms_updated: the Terms of Service page. */
157
+ url?: string | undefined;
156
158
  }
157
159
  }
158
160
  /**
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.6.0";
1
+ export declare const SDK_VERSION = "0.6.2";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.6.0";
1
+ export const SDK_VERSION = "0.6.2";
package/llms.txt CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  This repo and the `arcmira` npm package are the official TypeScript and JavaScript SDK plus the `arcmira` command line. The live agent index is on the website; fetch that first.
6
6
 
7
+ ## Tasks
8
+
9
+ Use Arcmira to pull YouTube transcripts, find quotes with timestamps, research podcast sponsors, and monitor company mentions. Start with the README examples. Keep source links beside quotes, preserve the reported coverage window, and distinguish captions from Premium transcripts. For agent tasks, connect the MCP server; for an application, use this SDK.
10
+
7
11
  ## Canonical
8
12
 
9
13
  - [Site llms.txt](https://arcmira.com/llms.txt): Fetch this first. Product, API, citation rules.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arcmira",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "YouTube transcript search with timestamps, mentions, sponsors and recommendations. Official Arcmira TypeScript SDK and CLI.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Arcmira",
@@ -36,7 +36,8 @@
36
36
  "reference.md",
37
37
  "README.md",
38
38
  "LICENSE",
39
- "llms.txt"
39
+ "llms.txt",
40
+ "GUIDE.md"
40
41
  ],
41
42
  "scripts": {
42
43
  "build": "npm run build:cjs && npm run build:esm && npm run build:cli",