@invinite-org/invinite-data-cli 3.0.0 → 4.1.0

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.
Files changed (129) hide show
  1. package/README.md +341 -374
  2. package/claude-plugin/.claude-plugin/plugin.json +1 -1
  3. package/claude-plugin/agents/invinite-data.md +59 -28
  4. package/claude-plugin/commands/analyze-earnings-call.md +15 -14
  5. package/claude-plugin/commands/analyze-filing.md +8 -7
  6. package/claude-plugin/commands/compare-companies.md +5 -5
  7. package/claude-plugin/commands/financial-research.md +9 -9
  8. package/claude-plugin/commands/ownership-review.md +6 -6
  9. package/claude-plugin/skills/invinite-data-cli/SKILL.md +466 -570
  10. package/dist/bin/invd.js +11 -2
  11. package/dist/bin/invd.js.map +1 -1
  12. package/dist/src/cli.d.ts +2 -0
  13. package/dist/src/cli.js +48 -29
  14. package/dist/src/cli.js.map +1 -1
  15. package/dist/src/client/api-client.d.ts +24 -24
  16. package/dist/src/client/api-client.js +52 -70
  17. package/dist/src/client/api-client.js.map +1 -1
  18. package/dist/src/client/pagination.d.ts +12 -11
  19. package/dist/src/client/pagination.js +47 -56
  20. package/dist/src/client/pagination.js.map +1 -1
  21. package/dist/src/commands/agent-setup.d.ts +21 -0
  22. package/dist/src/commands/agent-setup.js +112 -0
  23. package/dist/src/commands/agent-setup.js.map +1 -0
  24. package/dist/src/commands/api.d.ts +27 -0
  25. package/dist/src/commands/api.js +180 -0
  26. package/dist/src/commands/api.js.map +1 -0
  27. package/dist/src/commands/auth.d.ts +37 -0
  28. package/dist/src/commands/auth.js +336 -0
  29. package/dist/src/commands/auth.js.map +1 -0
  30. package/dist/src/commands/completion.d.ts +7 -0
  31. package/dist/src/commands/completion.js +115 -0
  32. package/dist/src/commands/completion.js.map +1 -0
  33. package/dist/src/commands/config.d.ts +4 -0
  34. package/dist/src/commands/config.js +85 -48
  35. package/dist/src/commands/config.js.map +1 -1
  36. package/dist/src/commands/plugin.d.ts +8 -0
  37. package/dist/src/commands/plugin.js +8 -10
  38. package/dist/src/commands/plugin.js.map +1 -1
  39. package/dist/src/config/auth.d.ts +17 -1
  40. package/dist/src/config/auth.js +50 -36
  41. package/dist/src/config/auth.js.map +1 -1
  42. package/dist/src/config/config-manager.d.ts +56 -4
  43. package/dist/src/config/config-manager.js +173 -29
  44. package/dist/src/config/config-manager.js.map +1 -1
  45. package/dist/src/config/toml.d.ts +7 -0
  46. package/dist/src/config/toml.js +79 -0
  47. package/dist/src/config/toml.js.map +1 -0
  48. package/dist/src/examples.d.ts +22 -0
  49. package/dist/src/examples.js +56 -0
  50. package/dist/src/examples.js.map +1 -0
  51. package/dist/src/generated/cli-manifest.json +5573 -5140
  52. package/dist/src/hand-written-commands.d.ts +11 -41
  53. package/dist/src/hand-written-commands.js +7 -17
  54. package/dist/src/hand-written-commands.js.map +1 -1
  55. package/dist/src/output/jq.d.ts +15 -0
  56. package/dist/src/output/jq.js +234 -0
  57. package/dist/src/output/jq.js.map +1 -0
  58. package/dist/src/output/options.d.ts +29 -0
  59. package/dist/src/output/options.js +72 -0
  60. package/dist/src/output/options.js.map +1 -0
  61. package/dist/src/output/render.d.ts +54 -0
  62. package/dist/src/output/render.js +160 -0
  63. package/dist/src/output/render.js.map +1 -0
  64. package/dist/src/shared/errors.d.ts +59 -15
  65. package/dist/src/shared/errors.js +126 -38
  66. package/dist/src/shared/errors.js.map +1 -1
  67. package/dist/src/shared/prompt.d.ts +10 -0
  68. package/dist/src/shared/prompt.js +24 -0
  69. package/dist/src/shared/prompt.js.map +1 -0
  70. package/dist/src/shared/spinner.js +2 -1
  71. package/dist/src/shared/spinner.js.map +1 -1
  72. package/dist/src/spec-commands.d.ts +14 -6
  73. package/dist/src/spec-commands.js +454 -174
  74. package/dist/src/spec-commands.js.map +1 -1
  75. package/dist/src/spec-flags.d.ts +11 -6
  76. package/dist/src/spec-flags.js +14 -7
  77. package/dist/src/spec-flags.js.map +1 -1
  78. package/dist/src/spec-manifest.d.ts +416 -116
  79. package/dist/src/spec-manifest.js +44 -13
  80. package/dist/src/spec-manifest.js.map +1 -1
  81. package/dist/src/update-notifier.d.ts +9 -0
  82. package/dist/src/update-notifier.js +63 -0
  83. package/dist/src/update-notifier.js.map +1 -0
  84. package/package.json +2 -3
  85. package/dist/src/client/earnings-live.d.ts +0 -194
  86. package/dist/src/client/earnings-live.js +0 -300
  87. package/dist/src/client/earnings-live.js.map +0 -1
  88. package/dist/src/client/news-live.d.ts +0 -72
  89. package/dist/src/client/news-live.js +0 -120
  90. package/dist/src/client/news-live.js.map +0 -1
  91. package/dist/src/client/pdf.d.ts +0 -15
  92. package/dist/src/client/pdf.js +0 -15
  93. package/dist/src/client/pdf.js.map +0 -1
  94. package/dist/src/client/websocket-client.d.ts +0 -19
  95. package/dist/src/client/websocket-client.js +0 -174
  96. package/dist/src/client/websocket-client.js.map +0 -1
  97. package/dist/src/commands/earnings.d.ts +0 -16
  98. package/dist/src/commands/earnings.js +0 -464
  99. package/dist/src/commands/earnings.js.map +0 -1
  100. package/dist/src/commands/login.d.ts +0 -15
  101. package/dist/src/commands/login.js +0 -249
  102. package/dist/src/commands/login.js.map +0 -1
  103. package/dist/src/commands/news.d.ts +0 -2
  104. package/dist/src/commands/news.js +0 -69
  105. package/dist/src/commands/news.js.map +0 -1
  106. package/dist/src/commands/sec.d.ts +0 -47
  107. package/dist/src/commands/sec.js +0 -191
  108. package/dist/src/commands/sec.js.map +0 -1
  109. package/dist/src/commands/ws.d.ts +0 -33
  110. package/dist/src/commands/ws.js +0 -116
  111. package/dist/src/commands/ws.js.map +0 -1
  112. package/dist/src/formatters/json-formatter.d.ts +0 -1
  113. package/dist/src/formatters/json-formatter.js +0 -4
  114. package/dist/src/formatters/json-formatter.js.map +0 -1
  115. package/dist/src/formatters/table-formatter.d.ts +0 -4
  116. package/dist/src/formatters/table-formatter.js +0 -73
  117. package/dist/src/formatters/table-formatter.js.map +0 -1
  118. package/dist/src/formatters/time.d.ts +0 -2
  119. package/dist/src/formatters/time.js +0 -14
  120. package/dist/src/formatters/time.js.map +0 -1
  121. package/dist/src/shared/output.d.ts +0 -3
  122. package/dist/src/shared/output.js +0 -13
  123. package/dist/src/shared/output.js.map +0 -1
  124. package/dist/src/shared/readiness.d.ts +0 -4
  125. package/dist/src/shared/readiness.js +0 -60
  126. package/dist/src/shared/readiness.js.map +0 -1
  127. package/dist/src/shared/types.d.ts +0 -11
  128. package/dist/src/shared/types.js +0 -2
  129. package/dist/src/shared/types.js.map +0 -1
package/README.md CHANGED
@@ -1,516 +1,483 @@
1
1
  # @invinite-org/invinite-data-cli
2
2
 
3
- Command-line interface for the [Invinite Data API](https://invinite.com/docs/data-api/overview) — access company data, financial statements, SEC filings, institutional ownership, and more from your terminal.
4
-
5
- ## Installation
6
-
7
- ### From npm
3
+ `invd` is the command-line interface for the [Invinite Data API](https://invinite.com/docs/data-api/overview) (v2):
4
+ listed companies and every SEC filer, standardized and as-reported financial statements, ratios, growth and CAGR,
5
+ segments, SEC filings and immutable document versions, earnings calls (transcripts, Q&A, guidance, slides, audio),
6
+ 13F holdings, insider trades, IPOs, news and full-text search — from your terminal, a script or an AI agent.
8
7
 
9
8
  ```bash
10
- npm install -g @invinite-org/invinite-data-cli
9
+ invd financials AAPL --period quarterly --limit 4
10
+ invd filings AAPL --form 10-K
11
+ invd events transcript AAPL 2026Q3
12
+ invd holdings AAPL
13
+ invd search filings "supply chain risk" --company AAPL
11
14
  ```
12
15
 
13
- To update to the latest version:
16
+ Version 4.0 is a new command surface over the v2 API. Coming from 3.x, read [Upgrading from 3.x](#upgrading-from-3x).
17
+
18
+ ## Installation
14
19
 
15
20
  ```bash
16
- npm update -g @invinite-org/invinite-data-cli
21
+ npm install -g @invinite-org/invinite-data-cli
17
22
  ```
18
23
 
19
- ### From source
24
+ Update with `npm update -g @invinite-org/invinite-data-cli`. Requires Node.js >= 20. invd prints a short notice at
25
+ most once a day when a newer version exists (never in CI; `INVD_NO_UPDATE_NOTIFIER=1` turns it off).
26
+
27
+ From source:
20
28
 
21
29
  ```bash
22
30
  git clone https://github.com/outraday-org/invinite-data-cli.git
23
31
  cd invinite-data-cli
24
- npm install
25
- npm run build
32
+ pnpm install
33
+ pnpm build
26
34
  npm link
27
35
  ```
28
36
 
29
- Requires Node.js >= 20.
30
-
31
37
  ## Authentication
32
38
 
33
- The recommended way to authenticate is browser login:
34
-
35
39
  ```bash
36
- invd login
40
+ invd auth login # browser sign-in; stores a revocable key
41
+ invd auth login --no-browser # SSH session: print the URL, paste the redirect address back
42
+ cat key.txt | invd auth login --with-token # an existing key from stdin
43
+ invd auth status # which key is active, where it comes from, whose account (free)
44
+ invd auth status --offline --json # the same without calling the API
45
+ invd auth token # print the active key (for curl and scripts)
46
+ invd auth logout # revoke the login and clear the stored key
37
47
  ```
38
48
 
39
- The browser flow creates a revocable, 90-day Data API key and stores it in the
40
- OS keychain when available (with local CLI config as a fallback). The sign-in
41
- also appears on the Invinite Data app's keys page (https://data.invinite.com/keys). The key belongs to the
42
- Invinite Data account you sign in with — one account per person, billed for every call made with it.
49
+ The key belongs to the Invinite Data account you sign in with, and every call made with it is billed to that account.
50
+ Create or revoke keys at https://data.invinite.com/keys.
43
51
 
44
- To revoke the browser sign-in and remove the locally stored credential:
52
+ The active key is resolved in this order:
53
+
54
+ 1. `INVD_API_KEY`
55
+ 2. `INVINITE_DATA_API_KEY` (the 3.x name, still read)
56
+ 3. `./.env` in the current directory (either name)
57
+ 4. the OS keychain (via the optional `keytar` package)
58
+ 5. `api_key` in the global `config.toml`
45
59
 
46
60
  ```bash
47
- invd logout
61
+ curl -H "Authorization: Bearer $(invd auth token)" https://api.data.invinite.com/v2/me
48
62
  ```
49
63
 
50
- Manual API keys remain supported. The active key is resolved in the following order:
64
+ ## The command grammar
51
65
 
52
- 1. **Environment variable** — `INVINITE_DATA_API_KEY`
53
- 2. **Current directory `.env` file** — `INVINITE_DATA_API_KEY=...`
54
- 3. **OS keychain** — via the optional `keytar` package
55
- 4. **Stored config** — set with the CLI
66
+ Commands are noun-verb over the API's groups:
56
67
 
57
- ### Set your API key
68
+ | Group | What it reads |
69
+ |---|---|
70
+ | `companies` | listed companies: list, profile, fiscal periods, dividends, splits |
71
+ | `filers` | every SEC filer (13F managers, pre-IPO issuers, former registrants), listed or not |
72
+ | `financials` | statements: standardized or as-reported, summary / detailed / presentation, point in time |
73
+ | `metrics` | ratios, growth, CAGR, and the explanation of one standardized fact |
74
+ | `segments` | segment values (revenue by product, geography …) |
75
+ | `filings` | SEC filings, their numeric and text facts, review chains, dataset releases |
76
+ | `documents` | immutable document versions: blocks, pages, sections, figures, fact places |
77
+ | `events` | earnings calls and other corporate events: transcripts, Q&A, slides, audio, call analytics |
78
+ | `guidance` | guidance items and KPI mentions |
79
+ | `people` | executives and analysts, and who took part in which event |
80
+ | `holdings` | 13F holdings and quarter-over-quarter changes |
81
+ | `insider-trades` | Form 4 transactions |
82
+ | `investor-documents` | company-published documents (annual reports, decks, letters) |
83
+ | `news` | news from SEC filings and the companies' own newsrooms, with attribution |
84
+ | `search` | full-text search over filings, transcripts, investor documents and news |
85
+ | `ipos`, `market` | offerings; US market holidays |
86
+ | `catalog` | static catalogs: metrics, sections, forms, event types, document kinds, mapping rules |
87
+ | `me` | your account and usage (free) |
88
+ | `webhooks` | outbound event deliveries |
89
+
90
+ Plus the hand-written `api`, `auth`, `config`, `plugin`, `agent-setup` and `completion`.
91
+
92
+ **The first positional is the natural key.** On company lists it is a ticker or CIK, and several are allowed:
58
93
 
59
94
  ```bash
60
- invd config set-key
95
+ invd financials AAPL MSFT GOOGL --fiscal-year 2025
96
+ invd filings 0000320193 --form 8-K --items 2.02
97
+ invd insider-trades AAPL --side buy
61
98
  ```
62
99
 
63
- You'll be prompted to enter your key (input is masked). Alternatively, export it as an environment variable:
100
+ On a member command it is the member's id:
64
101
 
65
102
  ```bash
66
- export INVINITE_DATA_API_KEY=your-api-key
103
+ invd companies get AAPL
104
+ invd filings get 0000320193-26-000026
105
+ invd filers get 0000102909
106
+ invd events transcript <event_id>
67
107
  ```
68
108
 
69
- Because environment and `.env` values take precedence over stored credentials,
70
- `invd logout` will tell you to remove them manually when either is active.
71
-
72
- ## AI Plugin
73
-
74
- This repo includes plugins for AI coding tools that enable AI-powered financial data retrieval and analysis. Supports **Claude Code**, **OpenCode**, **Codex**, and **Copilot**.
75
-
76
- ### Choose an integration
109
+ **`list` is a group's default subcommand**, so `invd filings AAPL --form 10-K` is `invd filings list AAPL --form 10-K`,
110
+ and `invd events AAPL` lists Apple's calls.
77
111
 
78
- - **Standalone skill:** installs the Invinite workflow and CLI reference. It prefers MCP when connected and falls back to the local `invd` CLI.
79
- - **Standalone MCP connector:** add `https://api.data.invinite.com/mcp` in Claude's connector settings, leave OAuth client ID/secret empty, and complete browser OAuth. This supplies tools but not the packaged research workflows.
80
- - **Claude plugin:** bundles the skill, remote MCP connector, data agent, and research commands; no setup value is needed. OAuth uses Dynamic Client Registration and PKCE.
81
-
82
- MCP calls and CLI calls are billed to the Invinite Data account their credential belongs to: the connector's OAuth sign-in, or the key `invd login` stored.
83
-
84
- ### Quick install
112
+ **Events by fiscal period.** Every command that takes an `event_id` also takes a company and a fiscal period in its
113
+ place; invd resolves the event through `GET /v2/events` and says so on stderr:
85
114
 
86
115
  ```bash
87
- # Interactive — prompts for runtime and scope
88
- npx @invinite-org/invinite-data-cli@latest plugin install
89
-
90
- # Non-interactive examples
91
- npx @invinite-org/invinite-data-cli@latest plugin install --claude --global
92
- npx @invinite-org/invinite-data-cli@latest plugin install --claude --local
93
- npx @invinite-org/invinite-data-cli@latest plugin install --opencode --global
94
- npx @invinite-org/invinite-data-cli@latest plugin install --codex --global
95
- npx @invinite-org/invinite-data-cli@latest plugin install --copilot --local
96
- npx @invinite-org/invinite-data-cli@latest plugin install --all --global
116
+ invd events transcript NVDA 2026Q3
117
+ invd events qa AAPL 2026Q4
118
+ invd events press-release MSFT 2026Q1
97
119
  ```
98
120
 
99
- ### Update
100
-
101
- To update the plugin to the latest version, re-run the install command:
121
+ `invd <group> --help` lists a group's actions; `invd <group> <action> --help` lists every flag with the API's own
122
+ description, the credit cost and plan, and the fields of each row.
102
123
 
103
- ```bash
104
- npx @invinite-org/invinite-data-cli@latest plugin install --claude --global
105
- npx @invinite-org/invinite-data-cli@latest plugin install --all --global
106
- ```
124
+ ## Examples
107
125
 
108
- ### Uninstall
126
+ ### Companies and filers
109
127
 
110
128
  ```bash
111
- npx @invinite-org/invinite-data-cli@latest plugin uninstall --claude --global
112
- npx @invinite-org/invinite-data-cli@latest plugin uninstall --all --global
129
+ invd companies list -q apple
130
+ invd companies get AAPL --expand coverage
131
+ invd companies fiscal-periods AAPL
132
+ invd companies dividends AAPL --ex-date-gte 2024-01-01
133
+ invd companies splits AAPL
134
+ invd filers list -q berkshire
135
+ invd filers get 0000102909
113
136
  ```
114
137
 
115
- ### What gets installed
138
+ ### Financial statements
116
139
 
117
- | Runtime | Skill | Agent | Command |
118
- |---------|-------|-------|---------|
119
- | **Claude Code** | `skills/invinite-data-cli/SKILL.md` | `agents/invinite-data.md` | `commands/financial-research.md`, `commands/analyze-earnings-call.md` |
120
- | **OpenCode** | `command/invinite-data-cli.md` | `agents/invinite-data.md` | `command/analyze-earnings-call.md` |
121
- | **Codex** | `skills/invinite-data-cli/SKILL.md` | — | `skills/invinite-financial-research/SKILL.md`, `skills/invinite-analyze-earnings-call/SKILL.md` |
122
- | **Copilot** | `skills/invinite-data-cli/SKILL.md` | — | `skills/invinite-financial-research/SKILL.md`, `skills/invinite-analyze-earnings-call/SKILL.md` |
140
+ `invd financials` is one command over the six statement operations:
123
141
 
124
- `claude-plugin/` is the single source of these files. The repo-local copies under `.claude/` (the skill, the two commands and the agent) are symlinks into it, and `.codex/`, `.cursor/` and `.agent/` resolve through them — edit the plugin file, never a mirror.
125
-
126
- ### Alternative: Claude Code plugin directory
142
+ | Flag | Values |
143
+ |---|---|
144
+ | `--basis` | `standardized` (default) or `as-reported` |
145
+ | `--view` | `summary` (default), `detailed` (formula and source lineage) or `presentation` (the statement tree) |
146
+ | `-s, --statement` | any of `income-statement`, `balance-sheet`, `cash-flow` (default all three) |
147
+ | `-p, --period` | `annual`, `quarterly`, `ytd`, `ttm`; absent: `quarterly` with `--fiscal-quarter` 1–3, else `annual` |
148
+ | `-y, --fiscal-year`, `-q, --fiscal-quarter` | one fiscal period |
149
+ | `--fiscal-year-gte` / `-gt` / `-lte` / `-lt` | a range of fiscal years |
150
+ | `--as-of` | point in time: the newest rendering of each period filed on or before that day |
151
+ | `--filing` | pin the rendering of one filing (accession) |
152
+ | `--reported-only`, `--display-sign` | as-reported only |
127
153
 
128
154
  ```bash
129
- claude --plugin-dir /path/to/invinite-data-cli/claude-plugin
155
+ invd financials AAPL # annual, all three statements
156
+ invd financials AAPL --period quarterly --limit 4
157
+ invd financials AAPL -s income-statement --view detailed --json
158
+ invd financials AAPL --basis as-reported --view presentation -s balance-sheet
159
+ invd financials AAPL --as-of 2025-01-31 --fiscal-year-gte 2020
160
+ invd financials AAPL --filing 0000320193-25-000079
161
+ invd financials AAPL MSFT GOOGL --fiscal-year 2025 # several companies, one period: a snapshot
162
+ invd financials AAPL --basis as-reported --reported-only --display-sign cash_flow_direction -s cash-flow
130
163
  ```
131
164
 
132
- The Claude plugin also includes `compare-companies`, `analyze-filing`, and `ownership-review`. Its `.mcp.json` connects the remote server (`https://api.data.invinite.com/mcp`) automatically; use `/mcp` to complete OAuth or inspect connection status in Claude Code. In Claude web/Desktop, install the plugin through your organization's plugin marketplace and connect the bundled connector.
133
-
134
- ### Usage examples
165
+ Standardized values are keyed by `metric_id`; `invd catalog metrics` lists them.
135
166
 
136
- Use `/financial-research` for multi-step analysis:
167
+ ### Metrics and segments
137
168
 
138
- ```
139
- /financial-research Compare Apple, Microsoft, and Google's profitability and growth over the last 3 years
140
- /financial-research Who are the largest institutional holders of TSLA and what are recent ownership changes?
141
- /financial-research Analyze risk factors from NVDA's latest 10-K filing
169
+ ```bash
170
+ invd catalog metrics --statement income-statement
171
+ invd metrics ratios AAPL -p annual --category profitability,valuation
172
+ invd metrics growth MSFT -p quarterly --basis yoy
173
+ invd metrics cagr AAPL MSFT -p annual --horizon 5
174
+ invd metrics explain "0000320193|is_total_revenue|annual|2026|4"
175
+ invd segments list AAPL -p annual --metric is_total_revenue
176
+ invd segments list-detailed AAPL -p annual
142
177
  ```
143
178
 
144
- Use `/analyze-earnings-call` for one call — results vs guidance, raised / lowered guidance, analyst focus and tone change vs the prior call, cited with `[m:ss]` timestamps:
179
+ ### SEC filings and documents
145
180
 
181
+ ```bash
182
+ invd filings AAPL --form 10-K --limit 1
183
+ invd filings get 0000320193-26-000026 --expand documents
184
+ invd filings facts 0000320193-26-000026 --tag us-gaap:Revenues
185
+ invd filings notes 0000320193-26-000026
186
+ invd filings review-chain 0000320193-26-000026
187
+ invd catalog sections --form 10-K
188
+ invd documents sections <version_id>
189
+ invd documents get <version_id> --blocks b12-b40 --footnotes
190
+ invd documents get <version_id> --pages 1-3
191
+ invd documents figure <version_id> --block-id b57
192
+ invd search filings "supply chain risk" --company AAPL --form 10-K --item 1A
146
193
  ```
147
- /analyze-earnings-call NVDA
148
- /analyze-earnings-call AAPL 2026 Q4
149
- ```
150
-
151
- Or ask questions directly — the AI will auto-trigger the skill and delegate to the data agent as needed.
152
194
 
153
- > **Note:** The CLI must be installed and authenticated (see [Authentication](#authentication)) for the plugin to work.
195
+ A filing's `documents` carry the `version_id` of each immutable document version; cite a passage by `version_id` and
196
+ `block_id` (and the printed page label when present). `search filings` costs 100 credits a page.
154
197
 
155
- ## Global Options
156
-
157
- These options are available on all data commands:
158
-
159
- | Flag | Description |
160
- |------|-------------|
161
- | `--json` | Output raw JSON (pipe-friendly) |
162
- | `--all` | Auto-paginate through all results |
163
- | `--show-cost` | Print what the command cost to stderr (see [Usage and credits](#usage-and-credits)) |
164
-
165
- ## Usage and credits
166
-
167
- `invd usage` prints your account's plan allowance, prepaid balance and usage by day, endpoint family and key — the
168
- same answer as the [Invinite Data app](https://data.invinite.com/usage). It costs no credits.
198
+ ### Earnings calls and events
169
199
 
170
200
  ```bash
171
- invd usage # last 30 days (default)
172
- invd usage --days 7 # 7, 30 or 90
173
- invd usage --json # the API's JSON, unchanged
174
- ```
175
-
176
- ```
177
- Plan Lite · 250,000 credits included · resets 1 Nov 2026, 00:00 UTC
178
- Used 141,220 credits (56 %) · prepaid balance $12.50
179
- Daily ▁▂▂▃▅▃▂▁▁▂▃▅▆▇▅▃▂▂▃▃▄▅▆▅▃▂▂▃▄▅ (credits per day, 2026-10-02 → 2026-10-31 UTC)
180
- By family Financials 98,100 · SEC Filings 30,400 · Earnings Calls 12,720
181
- By key Backtest box (invd_a1b...c2d3) 120,000 · Signed-in user 21,220
182
- Errors 403 ×12 · 429 ×3
183
- Details https://data.invinite.com/usage
184
- ```
185
-
186
- To see what a single command cost, add `--show-cost` (or set `INVD_SHOW_COST=1`). The line goes to **stderr**, so
187
- piped stdout stays clean:
201
+ invd events AAPL # calendar and history (earnings calls by default)
202
+ invd events AAPL --status upcoming
203
+ invd events list AAPL --type all --sort -scheduled_at --limit 10
204
+ invd events get AAPL 2026Q3
205
+ invd events transcript AAPL 2026Q3 # turns with speaker and start_ms
206
+ invd events transcript-text AAPL 2026Q3 --split sections
207
+ invd events qa AAPL 2026Q3
208
+ invd events comparison AAPL 2026Q3 # vs the previous call: tone, hedging, new and dropped topics
209
+ invd events stats AAPL 2026Q3
210
+ invd events press-release AAPL 2026Q3
211
+ invd events slides AAPL 2026Q3 --pages 1-5
212
+ invd events price-attribution AAPL 2026Q3
213
+ invd events transcript-versions <event_id>
214
+ invd events transcript-diff <event_id> --from 1 --to 2
215
+ invd guidance AAPL --event <event_id>
216
+ invd guidance kpis AAPL --metric subscribers
217
+ invd people list AAPL --role analyst
218
+ invd search transcripts "gross margin" --company AAPL --type qa
219
+ ```
220
+
221
+ Every `*_ms` field is milliseconds from the call's start; cite it as `[m:ss]`.
222
+
223
+ ### Ownership and insiders
188
224
 
189
225
  ```bash
190
- invd --show-cost --json company details -i AAPL > aapl.json
191
- # credits: 1 · included left: 249999
226
+ invd holdings AAPL # 13F holders of a company
227
+ invd holdings --filer 0000102909 # one manager's portfolio
228
+ invd holdings AAPL --period-end 2026-06-30 --instruments all
229
+ invd holdings changes AAPL --type new,sold_out
230
+ invd insider-trades AAPL --filed-at-gte 2026-01-01
231
+ invd insider-trades get 0001127602-26-012345:1
192
232
  ```
193
233
 
194
- `included left` is the plan's included credits left after the command: the API's `X-Credits-Included-Remaining`
195
- (the allowance before the request) minus what the request was charged (absent → `—`, e.g. for the free usage route). Keys, plan and prepaid credits are managed at [data.invinite.com](https://data.invinite.com);
196
- credit costs per endpoint and plan limits are documented at
197
- [/docs/data-api/credits-and-limits](https://invinite.com/docs/data-api/credits-and-limits).
198
-
199
- ## Commands
200
-
201
- Every data command is generated from the Data API's OpenAPI document: one command per operation, named by the
202
- route's `x-cli` (`invd <group> <action>`), its flags the operation's parameters spelled with dashes
203
- (`fiscal_period_type` → `-p, --fiscal-period-type`, `event_id` → `--event-id`; path parameters are flags too), its help
204
- text the spec's summary and parameter descriptions. List them with `invd --help` and `invd <group> --help`; the
205
- [plugin skill](claude-plugin/skills/invinite-data-cli/SKILL.md#commands-reference) carries one generated example per
206
- command. A handful of commands are hand-written because they do more than one call — `login`, `logout`, `config`,
207
- `plugin`, `ws`, the earnings downloads / text renders below and the `sec` downloads (`src/hand-written-commands.ts`).
208
-
209
- | Group | What it covers |
210
- |-------|----------------|
211
- | `company` | Search, details, list, dividends, fiscal periods, splits |
212
- | `financials` | Standardized and as-reported statements and snapshots — one command per variant: `income-statement`, `income-statement-detailed`, `income-statement-presentation`, `as-reported-income-statement…`; the same for `balance-sheet`, `cash-flow`, `snapshot` |
213
- | `metrics` | Ratios, growth, CAGR |
214
- | `segments` | `list`, `list-detailed` |
215
- | `sec` | Invinite's SEC document store: `filers`, `filer`, `lifecycle`, `issuers`, `filings` (cursor-paged, `form_facet`), `filing` (its document manifest), `document` / `version` (immutable cited blocks, pages, footnotes), `sections`, `figure`, `fact-places`, `search` (`--mode lexical\|literal`, 100 credits), 13F `holders` / `portfolio` / `holding-deltas` / `form-filers`, `financials-catalog` / `statement` / `financial-fact`, `metric-export` / `export`, `datasets`; downloads `save` (originals), `save-figure`, `export-file` |
216
- | `earnings` | Calendar, events, live calls, transcripts, Q&A, participants, analysts, guidance and KPI extractions, diff, metrics, prosody, price moves during the call, media, documents, search, company IR documents |
217
- | `news` | News of US companies from SEC filings and their own newsrooms: `list` (cursor-paged), `get` (Invinite's summary + attribution), `text` (the summary in citable blocks), `developments`, `search` (passages; off until the API enables it) |
218
- | `ownership` | 13F holdings by company / investor, institutions, transactions |
219
- | `insider-trades`, `ipos`, `market`, `metadata` | Insider transactions, IPOs, market holidays, available metric and filing-section ids |
220
- | `webhooks` | Earnings-call and `news.published` webhook subscriptions |
221
- | `usage`, `health`, `status` | Your account's usage (free), API liveness and status (no key) |
234
+ ### News, investor documents, IPOs, market
222
235
 
223
236
  ```bash
224
- invd company search -q Apple --json
225
- invd company details -i AAPL --json
226
- invd financials income-statement -i AAPL -p annual --json
227
- invd financials balance-sheet-detailed -i MSFT -p quarterly --limit 4 --with-formula true --json
228
- invd financials as-reported-cash-flow -i GOOGL -p annual --json
229
- invd financials snapshot -i AAPL,MSFT,GOOGL -p annual --json
230
- invd metrics ratios -i AAPL -p annual --category profitability --json
231
- invd segments list-detailed -i AAPL -p annual --json
232
- invd sec filings -i AAPL -f 10-K -l 5 --json
233
- invd sec filing --accession 0000320193-26-000024 --json
234
- invd sec document --accession 0000320193-26-000024 --filename aapl-20261102.htm -l 20 --json
235
- invd sec search -q "supply chain concentration" -m lexical -c 320193 --json
236
- invd ownership holdings-by-company -i AAPL --min-value 1000000 --json
237
- invd insider-trades list -i TSLA --acquired-disposed D --limit 20 --json
238
- invd earnings events -i AAPL -s desc -l 4 --json
239
- invd earnings event --event-id <event_id> --include observations --json
240
- invd earnings participants --event-id <event_id> --include evidence --json
241
- invd earnings person --person-id <person_id> --json
242
- invd earnings price-attribution --event-id <event_id> --json
237
+ invd news AAPL --published-at-gte 2026-11-01
238
+ invd news get <id>
239
+ invd news text <id>
240
+ invd news announcements AAPL --topic product_launch
241
+ invd search news buyback --company AAPL
242
+ invd investor-documents AAPL --kind investor_presentation
243
+ invd search investor-documents "capital allocation" --company AAPL
244
+ invd ipos list --stage priced
245
+ invd market holidays --date-gte 2026-01-01
243
246
  ```
244
247
 
245
- ---
248
+ Every news item carries `attribution` (publisher, `source_url`, `published_at`, and the form and accession of a
249
+ filing): name the publisher and link the source whenever you show a headline or summary.
246
250
 
247
- ### config
248
-
249
- Manage CLI configuration.
251
+ ### Account and webhooks
250
252
 
251
253
  ```bash
252
- # Set API key (interactive, masked input)
253
- invd config set-key
254
-
255
- # Set custom API base URL
256
- invd config set-url https://custom-api.example.com
257
-
258
- # Show current configuration
259
- invd config show
260
-
261
- # Reset all configuration to defaults
262
- invd config reset
254
+ invd me show
255
+ invd me usage --days 7
256
+ invd webhooks list
257
+ invd webhooks create --body '{"url":"https://hooks.example.com/invinite","events":["event.transcript_ready"],"filters":{"ciks":["0000320193"]}}'
258
+ invd webhooks deliveries <id>
259
+ invd webhooks delete <id>
263
260
  ```
264
261
 
265
- ---
266
-
267
- ### earnings
262
+ ## Output
268
263
 
269
- Earnings calls and the companies' IR libraries, including non-earnings events (investor days, conferences, AGMs:
270
- `--event-type`). The live transcript (`ws listen --earnings`), audio, slides, the live stream and webhooks need the
271
- **PRO** plan (calendar, events and `live` need LITE, the other reads STANDARD); a `403` names the plan a route needs.
264
+ Data goes to stdout; progress, cost lines and coverage notes go to stderr, so a pipe only ever sees data.
272
265
 
273
- **Selecting a call.** Commands about one call take either `--event-id <event_id>` (a UUID from `earnings events` /
274
- `earnings calendar`; wins over the rest), or `-i, --identifier <ticker|cik>` with `--year <n>` + `--quarter <n>` (the
275
- company's fiscal quarter) or `--date <YYYY-MM-DD>` (the call day: a calendar day in New York time (America/New_York); a
276
- call without a confirmed time is listed on its announced date). An incomplete selector is refused by the API (`400`).
277
-
278
- The seven hand-written earnings commands download or render what one call returns:
279
-
280
- | Command | What it adds |
281
- |---------|--------------|
282
- | `earnings transcript` | `--format speakers\|text\|words\|sections\|cleaned`; `--transcript-version <n>` (not `--version`, which prints the CLI version) / `--as-of <iso>`; `-o, --output <file>` saves it as text. The header shows where the Q&A begins; `--json` carries it as `qa_start_ms` |
283
- | `earnings press-release` | `--body` includes the release text; `-o` saves it |
284
- | `earnings audio` | The recording's permanent URL (one forensic watermark per call), or `-o` to save it |
285
- | `earnings slides` | `--markdown` (each page's text), `--pages <range>`, `-o` saves the deck PDF |
286
- | `earnings documents` | `--kind <list>`, `--category <list>`, `--group <path>` (document-tree folder, a prefix matches its subfolders), `--body`; `-o <dir>` saves every document as `<kind>-<document_id>.<ext>`. The table shows each document's tree folder (`group`) |
287
- | `earnings company-documents` | `-i` (required), `--section`, `--kind`, `--year`, `--period`, `--event-id`, `--category <list>` (earnings, events, reports, presentations, governance, esg, shareholder, other), `--group <path>` (e.g. `earnings/fy2027/q2`; `earnings` = every quarter), `--fiscal-year` / `--fiscal-quarter`, `--include calls` (every earnings call's documents in the same list, `source: call`); `-o <dir>` saves every stored file as `<year>-<kind>-<document_id>.<ext>`. The table shows each document's source and tree folder (`group`), and a call's SEC filing link its EDGAR `filing_date` (also in `earnings documents`) |
288
- | `earnings document` | `--document-id` (from `company-documents` / `document-search`): metadata and permanent URLs, `--pages` the per-page text, `-o` the file |
289
-
290
- **Saving files.** An existing `--output` file is only replaced with `--force`; without `--output` the media commands
291
- print **permanent public URLs** (immutable; a new version is a new URL). With `documents` / `company-documents --output`, a row without a
292
- download URL (a link-only `sec_filing` or `webcast`, or a file the API could not fetch — use its `source_url`) is never
293
- skipped silently: each gets a warning on stderr, followed by a count (`2 of 3 documents saved; 1 skipped`). The exit
294
- code is 0 when at least one document was saved (or the list was empty) and 1 when documents were listed but none could
295
- be saved. An interrupted download (Ctrl-C) never leaves a partial file behind.
266
+ | Flag | Effect |
267
+ |---|---|
268
+ | (none) | a table on a terminal, tab-separated rows when piped |
269
+ | `--plain` | tab-separated rows without colour or decoration |
270
+ | `--json` | the whole response body |
271
+ | `--json a,b` | only those fields of each row (the fields are listed at the bottom of each command's `--help`) |
272
+ | `--output table\|plain\|json\|jsonl\|csv` | pick the format explicitly |
273
+ | `--jq <expr>` | filter the JSON (a built-in subset; falls back to a `jq` binary on the PATH) |
274
+ | `--fields a,b` | ask the server to prune the response (where the operation supports `fields=`) |
296
275
 
297
276
  ```bash
298
- invd earnings transcript -i AAPL --year 2026 --quarter 4 --output aapl-q4.txt
299
- invd earnings press-release -i AAPL --year 2026 --quarter 4 --body
300
- invd earnings audio --event-id <event_id> --output call.mp3
301
- invd earnings slides -i AAPL --year 2026 --quarter 4 --output deck.pdf
302
- invd earnings documents --event-id <event_id> --output ./docs
303
- invd earnings company-documents -i AAPL --kind investor_day_deck --output ./ir-docs
304
- invd earnings company-documents -i AAPL --group earnings/fy2026/q4
305
- invd earnings company-documents -i AAPL --include calls --all --json
306
- invd earnings document --document-id <document_id> --pages
277
+ invd filings AAPL --form 10-K --json accession,filing_date
278
+ invd financials AAPL --jq '.data[0].period_end'
279
+ invd companies list -q bank --output csv > banks.csv
280
+ invd events AAPL --plain | cut -f1
307
281
  ```
308
282
 
309
- Company documents and document-search hits are company-published material, shown as published: quote them as passages
310
- from company-published documents, not verified facts. Price attribution (`earnings price-attribution`) is temporal
311
- coincidence, not attribution of cause.
283
+ `NO_COLOR` / `FORCE_COLOR` control colour; `INVD_PAGER` (then `PAGER`) pages long output on a terminal. When a response's
284
+ `meta.coverage` is `pending` or `partial`, invd prints a note on stderr: few or no rows are then not proof of absence.
312
285
 
313
- ---
286
+ ### Pagination
314
287
 
315
- ### news
288
+ Lists are cursor-paged. `--limit` sets the page size; `--cursor` takes the previous page's `next_cursor` (reuse it with
289
+ the same filters, or the API answers `cursor_mismatch`). `--all` walks every page and streams the rows as JSONL (CSV with
290
+ `--output csv`):
316
291
 
317
- News of US companies from SEC EDGAR filings (`rights: public_record`) and the companies' own newsrooms
318
- (`rights: issuer`); wire services are never a source. `--ticker` / `--cik` = items that mention a company,
319
- `--publisher <cik>` = items the company published itself (`--publication-type`, `--issuer-category`, `--issuer-tag`
320
- narrow its own publications). The list is cursor-paged: `--all` follows `next_url`, or pass `next_cursor` as
321
- `--cursor` with the same filters; without `--from` / `--to`, `--all` and `next_cursor` page back through the whole history; with either, the window is at most 92 days.
292
+ ```bash
293
+ invd filings AAPL --all > aapl-filings.jsonl
294
+ invd holdings AAPL --all --output csv > aapl-holders.csv
295
+ invd filings AAPL --cursor eyJ2IjoyfQ
296
+ ```
322
297
 
323
- Every item carries `attribution` (publisher, `source_url`, `published_at`, EDGAR form + accession, `statement`):
324
- wherever you show a headline or text, show its publisher, link and date with it. `news get` (STANDARD) has Invinite's
325
- summary of the publication, `summary_text` / `summary_html` (`content_status: no_text` = headline and link only), never
326
- the publisher's own text; `news text` serves the summary in blocks (a `409 revision_changed` = the item was corrected;
327
- start again without `--cursor`). `news search --field title|lede|summary|any` picks the searched text.
298
+ An interrupted `--all` exits 3 and prints the `--cursor` to resume from.
328
299
 
329
- `earnings transcript` and `news get` also carry the branded PDF of the version (`pdf`, a permanent public URL, or null while
330
- none exists): `--pdf` prints the URL, `--pdf-out <file>` saves the file (an error without a PDF). `earnings versions` lists
331
- each version's `pdf.url`.
300
+ ### Credits
332
301
 
333
302
  ```bash
334
- invd news list --ticker NVDA --json
335
- invd news list --publisher 1045810 --publication-type press_release --from 2026-10-01 --all --json
336
- invd news get --id <id> --json
337
- invd news get --id <id> --pdf-out item.pdf
338
- invd earnings transcript --event-id <event_id> --pdf-out call.pdf
339
- invd news text --id <id> --all --json
340
- invd news developments --publisher 1045810 --topic product_launch --json
341
- invd news search -q "data center revenue" -t NVDA --json
342
- invd ws listen --news --tickers NVDA
303
+ invd filings AAPL --all --dry-run # the request plan and credit estimate; sends nothing
304
+ invd search filings "going concern" --show-cost
305
+ invd me usage # plan, included credits left, spend by family and key (free)
343
306
  ```
344
307
 
345
- ---
346
-
347
- ### sec
308
+ `--dry-run` prints the request(s) and the estimate from the spec's `x-credits` without sending anything.
309
+ `--show-cost` (or `INVD_SHOW_COST=1`) prints the credits a command cost to stderr. An `--all` walk whose page costs at
310
+ least `confirm_credits` (default 10) and every delete ask before running; `--yes` skips the question and `--no-input`
311
+ fails instead of asking.
348
312
 
349
- Invinite's SEC document store (`/v1/sec/*`, STANDARD; 1 credit a call, `sec search` 100). Every answer carries
350
- `readiness` (`ready`, `partial`, `pending` = 202 not billed, retry later; `excluded` 403, `unknown` 404, `failed` 424,
351
- `not_ready` 503 = the capability is not switched on yet) and the human output prints a yellow stderr line whenever the
352
- answer is not ready or a search's `coverage.completeness` is not `complete` — zero rows there is **not** "nothing
353
- exists". `--json` keeps every source field (version, block, page, `next_cursor`); an error prints its code
354
- (`Error 503: not_ready (search_provider_not_registered)`) and, with `--json`, the whole structured body as one JSON
355
- line on stderr. Pages use an opaque cursor: `--all` follows `next_url`, by hand pass `next_cursor` as `--cursor`
356
- with the same filters (a `409 restart_required` = start again).
313
+ ### Files
357
314
 
358
- A citation is the immutable `version_id` + `block_id` (plus the printed page label when the document states one,
359
- else the page ordinal) — never a URL. Search is `--mode lexical` (keywords, ranked) or `--mode literal` (exact text,
360
- `--case-sensitive false` folds case); there is no semantic mode and no prose answer.
315
+ Commands whose response points to a file take `--save <file>` (`--force` replaces an existing file). The download's
316
+ size and SHA-256 are verified before it lands; a mismatch exits 5.
361
317
 
362
- | Download | What it does |
363
- |---|---|
364
- | `sec save --accession <a> [--filename <f>] -o <dir>` | Saves a filing's originals from their permanent public copies, no API key on the download, size + SHA-256 from the manifest verified. A document without a public copy (or quarantined / too large) is listed with its reason and the command exits **3**; nothing is skipped silently |
365
- | `sec save-figure --version-id <v> --block-id <b> -o <path>` | Saves a figure's image from its permanent public URL |
366
- | `sec export-file --export-id <id> -o <path> [--sha256 <hex>]` | Streams a metric export's `.csv.gz` through the key-authorized route, verified against `X-Content-SHA256` (and `--sha256`); with `--sha256`, an identical existing file is complete without a request |
318
+ ```bash
319
+ invd events transcript AAPL 2026Q3 --save aapl-q3.pdf
320
+ invd events audio AAPL 2026Q3 --save aapl-q3.m4a
321
+ invd news get <id> --save item.pdf
322
+ invd investor-documents get <document_id> --save report.pdf
323
+ ```
367
324
 
368
- Downloads write `<file>.part` and rename it only after every check: exit **4** = partial download, **5** = size / hash /
369
- media-type mismatch — nothing is saved either way; an existing file needs `--force`. No command ever fetches sec.gov.
325
+ ## `invd api`: any API path
370
326
 
371
- The legacy `filings list|search|sections|form-types` (`/v1/sec-filings/*`) were removed in 1.0.0. Use `sec filings`
372
- for `filings list` (its `form_facet` replaces `filings form-types`), `sec document` (pins the version) + `sec sections`
373
- + `sec version --blocks` for `filings sections`, and `sec search -m lexical|literal` for `filings search` (cited
374
- passages, no prose answer, 100 credits).
327
+ The escape hatch for anything the command tree lacks:
375
328
 
376
- ### webhooks
329
+ ```bash
330
+ invd api /v2/companies/AAPL
331
+ invd api GET /v2/filings?company=AAPL --paginate --jq '.data[].accession'
332
+ invd api GET /v2/holdings -F company=AAPL -F limit=100
333
+ invd api POST /v2/webhooks --input webhook.json
334
+ invd api DELETE /v2/webhooks/<id> --yes
335
+ invd api GET /v2/me -H 'Accept: application/json' --dry-run
336
+ ```
377
337
 
378
- Earnings-call webhook subscriptions (PRO): signed, retried `POST`s of the call lifecycle to your HTTPS endpoint. Events: `earnings_call.scheduled`, `.rescheduled`, `.started`, `.ended`, `.transcript_provisional`, `.transcript_ready`, `.transcript_corrected`, `.assets_ready`, `.keyword_hit` (one delivery per mention of one of the subscription's keywords on a live call, with the speaker, `start_ms` and the sentence), `.guidance_flash` (a guidance number spoken live, before the final transcript), `news.published` (STANDARD and above: one delivery per new news item, `data.item` = a `news list` row, filtered by the CIKs it mentions), and `ping`. Deliveries carry `X-Invinite-Signature: t=…,v1=…` (HMAC-SHA256 of `<t>.<raw body>` with the secret) and are retried after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h and 24 h.
338
+ `-F key=value` is typed (numbers, `true` / `false`, `null`, `@file`), `-f key=value` always a string; both are query
339
+ parameters on GET / DELETE and JSON body fields otherwise. `--paginate` follows `next_cursor`.
379
340
 
380
- `webhooks create` and `webhooks update` take the request body as `--body '<json>'` or `--body-file <path>` (`-` reads
381
- stdin); the other commands take the subscription as `--id`. `create` **prints the signing secret once**; `rotate-secret`
382
- prints a new one (the old one stays valid for 5 minutes); `test` queues a signed `ping`; `deliveries` lists the last
383
- 100 attempts.
341
+ ## Configuration
384
342
 
385
343
  ```bash
386
- invd webhooks create --body '{"url":"https://hooks.example.com/invinite","events":["earnings_call.transcript_ready","earnings_call.started"],"filters":{"ciks":["320193"]}}'
387
- invd webhooks create --body '{"url":"https://hooks.example.com/alerts","events":["earnings_call.keyword_hit"],"filters":{"keywords":["tariffs","buyback"]}}' # every company
388
- invd webhooks create --body '{"url":"https://hooks.example.com/news","events":["news.published"],"filters":{"ciks":["1045810"]}}'
389
- invd webhooks update --id <id> --body '{"keywords":["tariffs","china","buyback"]}'
390
- invd webhooks update --id <id> --body '{"active":false}'
391
- invd webhooks test --id <id>
392
- invd webhooks deliveries --id <id>
344
+ invd config list # every setting, its value and where it comes from
345
+ invd config get output
346
+ invd config set output json
347
+ invd config set base_url http://localhost:4000 --local
348
+ invd config set confirm_credits 50
349
+ invd config unset pager
350
+ invd config path
393
351
  ```
394
352
 
395
- ---
396
-
397
- ### ws
398
-
399
- Real-time WebSocket streaming.
353
+ | Setting | Env | Meaning |
354
+ |---|---|---|
355
+ | `base_url` | `INVD_BASE_URL` | API base URL |
356
+ | `output` | `INVD_OUTPUT` | default output format |
357
+ | `confirm_credits` | `INVD_CONFIRM_CREDITS` | page cost at which an `--all` walk asks first (default 10) |
358
+ | `pager` | `INVD_PAGER` | pager for long terminal output |
359
+ | `api_key` | `INVD_API_KEY` | the key (global file only; prefer `invd auth login`) |
400
360
 
401
- #### `ws listen`
361
+ The global file is `$XDG_CONFIG_HOME/invd/config.toml` (`INVD_CONFIG_DIR` replaces the directory); `--local` writes
362
+ `./.invd.toml` for this project. Precedence: flags > environment > `./.invd.toml` > `config.toml`. A project file
363
+ never holds `api_key`, and its `base_url` may only name a loopback host (`localhost`, `127.0.0.1`, `[::1]`): a cloned
364
+ repository cannot send your key elsewhere. `invd api` likewise refuses an absolute URL on another host. 3.x settings
365
+ are imported once on first run.
402
366
 
403
- Listen to real-time SEC filing notifications, or with `--earnings` follow one earnings call's live transcript (PRO), or with `--all-live --keywords` get keyword alerts across every live call, or with `--news` get new news items as they are published (STANDARD). Automatically reconnects on disconnection with exponential backoff.
367
+ ## AI agents
404
368
 
405
- | Option | Description |
406
- |--------|-------------|
407
- | `--earnings <event_id\|cik>` | Follow a live call: event ID (UUID) or CIK |
408
- | `--all-live` | Keyword alerts across every live call at once (needs `--keywords`; no transcript, replay or partials) |
409
- | `--since-seq <n>` | Replay the finals after this seq (default `-1` = the whole call so far) |
410
- | `--partials` | Show interim segments, overwritten in place (terminal only; `--json` emits them) |
411
- | `--names` | Print each speaker-name snapshot |
412
- | `--prices` | Price ticks of the call's stock (≤ 1/s), shown as one line updated in place (terminal only; `--json` emits them); per-call only |
413
- | `--keywords <list>` | Comma-separated keywords (max 20, 2–64 chars each): one highlighted `keyword_hit` line per mention |
414
- | `--keyword-match exact\|stem` | `exact` (default) matches the word; `stem` also its inflections (`tariff` hits "tariffs") |
415
- | `--speaker-roles <list>` | Only hits by these speakers: `executive`, `ir_host`, `analyst`, `operator` |
416
- | `--min-rank <n>` | With `--all-live`: only companies ranked ≤ n by market cap |
417
- | `--news` | New news items (channel `news.live`); excludes `--earnings`, `--all-live` and the live-call flags |
418
- | `--tickers <list>` | With `--news`: items mentioning these tickers (≤ 50; `BRK.B` = `BRK-B`; with `--ciks` either matches). Default: every company |
419
- | `--ciks <list>` | With `--news`: items mentioning these CIKs (≤ 50, padded or not) |
420
- | `--news-kinds <list>` | With `--news`: only these kinds (`earnings_results`, `results_date`, `call_announcement`, `event_announcement`, `guidance`, `m_and_a`, `material_agreement`, `management_change`, `dividend`, `capital_markets`, `legal_spam`, `promo`, `other`) |
421
- | `--news-sources <list>` | With `--news`: `edgar` (SEC filings) and / or `ir` (company newsrooms) |
422
- | `--earnings-news` | With `--news`: earnings news only |
369
+ ### One step: MCP connector plus skill
423
370
 
424
371
  ```bash
425
- invd ws listen
372
+ invd agent-setup --claude --local # ./.mcp.json + .claude/skills
373
+ invd agent-setup --codex --global # ~/.codex/config.toml [mcp_servers] + skill
374
+ invd agent-setup --all --global --dry-run # show what would be written
426
375
  ```
427
376
 
428
- Press `Ctrl+C` to disconnect.
377
+ `agent-setup` adds the Invinite MCP connector (`https://api.data.invinite.com/mcp`) to Claude Code (`.mcp.json` or
378
+ `~/.claude.json`) or Codex (`config.toml [mcp_servers.<name>]`) and installs the `invd` skill. The connector signs in
379
+ with OAuth on first use (Dynamic Client Registration and PKCE; no key is written). MCP calls are billed to the account
380
+ of the OAuth sign-in, CLI calls to the account of the key.
429
381
 
430
- **Live transcripts.** Find a call in progress, then follow it:
382
+ ### The plugin
431
383
 
432
384
  ```bash
433
- invd earnings live
434
- invd ws listen --earnings 0b9d6f43-6b1e-4c39-9d3a-2f6a3c1e8b11 --partials
435
- # AAPL 2026-10-30T21:00:00.000Z · capturing · from seq 0 (latest 41)
436
- # [0:12] Operator: Good afternoon and welcome to the Apple Q4 fiscal year 2026 earnings call.
437
- # [1:05] Tim Cook: Thank you, everyone, for joining us.
385
+ invd plugin install # interactive: runtime and scope
386
+ invd plugin install --claude --global
387
+ invd plugin install --codex --global
388
+ invd plugin install --opencode --local
389
+ invd plugin install --copilot --local
390
+ invd plugin install --all --global
391
+ invd plugin uninstall --all --global
438
392
  ```
439
393
 
440
- **Keyword and guidance alerts.** With `--keywords` the same subscription also delivers a `keyword_hit` frame for every mention (one highlighted line: `[m:ss] keyword "tariffs" · Tim Cook (executive): …`, the speaker from the API's live naming) and a `guidance_flash` frame for every guidance number spoken live (`[m:ss] guidance flash · Revenue Q1 FY2027: USD 4.1–4.3 billion — "…"`), both before the final transcript. `--all-live --keywords <list>` subscribes to every live call at once (`scope: "all_live"`; each line starts with the symbol; the API refuses it without keywords, and so does the CLI); a `warning` frame (`global_scope_degraded`: some calls may be missing from the alerts) is printed and never fatal. With `--json` both frames are emitted as they arrive.
394
+ Re-run the install to update. The plugin bundles the skill, the data agent and the research commands:
441
395
 
442
- ```bash
443
- invd ws listen --earnings 320193 --keywords tariffs,china --keyword-match stem --speaker-roles executive
444
- invd ws listen --all-live --keywords tariffs --min-rank 500
445
- invd ws listen --all-live --keywords tariffs --json | jq -r 'select(.type=="keyword_hit") | "\(.symbol) \(.speaker_name): \(.text)"'
446
- ```
396
+ | Runtime | Skill | Agent | Commands |
397
+ |---|---|---|---|
398
+ | Claude Code | `skills/invinite-data-cli/SKILL.md` | `agents/invinite-data.md` | `commands/financial-research.md`, `commands/analyze-earnings-call.md` |
399
+ | OpenCode | `command/invinite-data-cli.md` | `agents/invinite-data.md` | `command/analyze-earnings-call.md` |
400
+ | Codex | `skills/invinite-data-cli/SKILL.md` | — | `skills/invinite-financial-research/SKILL.md`, `skills/invinite-analyze-earnings-call/SKILL.md` |
401
+ | Copilot | `skills/invinite-data-cli/SKILL.md` | — | `skills/invinite-financial-research/SKILL.md`, `skills/invinite-analyze-earnings-call/SKILL.md` |
447
402
 
448
- **Live prices.** With `--prices` the same per-call subscription also delivers a `price_tick` frame (PRO, at most one per second, only for seconds with a trade — pre-market and after-hours seconds are sparse). On a terminal it is one line rewritten in place — `[16:32:05 ET · 12:34] AAPL 336.08 +42.5 bp since call −127.5 bp on day (vol 1,240)`: New York time, the call clock of the transcript (`m:ss`, the same clock as the segments' `[m:ss]`), the price, the return since the last trade before the call and the day's return vs the previous close; green / red by the since-call return, dim from the snapshot fallback. The line shows temporal coincidence with what is being said, not attribution of cause. Price ticks follow one call: `--all-live --prices` is refused (as by the API). With `--json` the frames are emitted as they arrive: `invd ws listen --earnings <event_id> --prices --json | jq 'select(.type=="price_tick")'`. The minute rows so far are `invd earnings price-attribution --event-id <event_id>`.
403
+ `claude-plugin/` is the single source of these files; the copies under `.claude/` and `.codex/` are symlinks into it.
404
+ The Claude plugin directory (`claude --plugin-dir /path/to/invinite-data-cli/claude-plugin`) also carries
405
+ `compare-companies`, `analyze-filing` and `ownership-review`, and its `.mcp.json` connects the MCP server.
449
406
 
450
- ```bash
451
- invd ws listen --earnings <event_id> --prices
407
+ ```
408
+ /financial-research Compare Apple, Microsoft and Google's profitability and growth over the last 3 years
409
+ /analyze-earnings-call NVDA
410
+ /analyze-earnings-call AAPL 2026 Q4
452
411
  ```
453
412
 
454
- **Live news.** `--news` subscribes to `news.live` and prints one line per new item — publication time (UTC), source (`SEC EDGAR` or the newsroom's host), tickers, headline, link — and ignores the filing broadcasts; `--json` emits every news frame as one JSON line (`news_item.item` = a `news list` row with its `attribution`). Items published while disconnected are not replayed: `invd news list` has them. A plan without the channel ends the run (`news.live needs the STANDARD plan`).
413
+ ### Shell completion
455
414
 
456
415
  ```bash
457
- invd ws listen --news --tickers NVDA
458
- # 2026-10-29 13:03:22Z nvidianews.nvidia.com NVDA NVIDIA Announces Rubin Platform https://nvidianews.nvidia.com/news/…
459
- invd ws listen --news --ciks 1045810 --news-sources ir --json | jq -r 'select(.type=="news_item") | .item.title'
416
+ eval "$(invd completion zsh)"
417
+ invd completion bash > ~/.local/share/bash-completion/completions/invd
418
+ invd completion fish > ~/.config/fish/completions/invd.fish
460
419
  ```
461
420
 
462
- Finals are named from the newest speaker-name snapshot (`Speaker A` until a name is known). A `gap` line marks a seq range with no final yet (a late final may still follow on the same subscription, so finals can print slightly out of order); `resume_unavailable` means missed finals cannot be replayed right now — live delivery continues and the API back-fills them once it can. Neither needs a re-subscribe. After a reconnect the listener resumes after the last final it printed; it exits once the final transcript is ready (`invd earnings transcript --event-id <id>`). With `--json` every frame is one JSON line (NDJSON), e.g. `invd ws listen --earnings 320193 --json | jq -r 'select(.type=="transcript_segment") | .text'`.
463
-
464
- ---
465
-
466
- ## Output Formats
421
+ Completion covers commands, flags, and the `/v2` paths after `invd api`.
467
422
 
468
- Each data command prints a table, a key/value list or JSON according to its operation; `--json` prints the API's raw
469
- response.
470
-
471
- ```bash
472
- # Default table output
473
- invd company search -q Apple
423
+ ## Exit codes
474
424
 
475
- # Raw JSON output (useful for piping to jq or other tools)
476
- invd company search -q Apple --json
425
+ | Code | Meaning |
426
+ |---|---|
427
+ | 0 | ok |
428
+ | 1 | failure |
429
+ | 2 | usage: a bad flag or argument, and the API's `invalid_parameter` / `unknown_parameter` / `cursor_mismatch` |
430
+ | 3 | partial: an interrupted `--all` (resume with the printed `--cursor`) or a short download |
431
+ | 4 | auth required: no key, 401, forbidden |
432
+ | 5 | integrity: a download's checksum or size does not match |
433
+ | 6 | credits exhausted or plan required: 402, `plan_required`, `insufficient_credits` |
477
434
 
478
- # Pipe to jq
479
- invd financials income-statement -i AAPL -p annual --json | jq '.companies[0]'
480
- ```
435
+ ## Upgrading from 3.x
481
436
 
482
- ## Pagination
437
+ 4.0 replaces the v1 command tree with the v2 noun-verb grammar. No 3.x spelling is kept as an alias.
483
438
 
484
- Paginated commands take `-l, --limit` and `--offset`, or `--all` to follow every page (`next_url`; per-company commands
485
- merge each company's pages). A command whose operation does not paginate refuses `--all` by name. Without `--limit`
486
- the API's own page size applies. A page the API refuses with 429 (its admission limit) or 503 is retried up to five
487
- times after the answer's `Retry-After` (else 1 s, 2 s, 4 s, …, at most 30 s), so a long walk slows down instead of
488
- losing the pages it already fetched.
439
+ | 3.x | 4.0 |
440
+ |---|---|
441
+ | `login` / `logout` | `invd auth login` / `invd auth logout` |
442
+ | `config set-key` | `invd auth login --with-token` |
443
+ | `config set-url <url>` | `invd config set base_url <url>` |
444
+ | `company search\|details\|dividends\|…` | `invd companies list\|get\|dividends\|fiscal-periods\|splits` |
445
+ | the 24 `financials <statement>[-detailed\|-presentation]`, `as-reported-*`, `snapshot` subcommands | `invd financials <company…> --basis … --view … --statement …` (several companies + one fiscal period = the old snapshot) |
446
+ | `metadata metrics` / `metadata section-ids` | `invd catalog metrics` / `invd catalog sections` |
447
+ | `earnings events\|transcript\|qa\|press-release\|…` | `invd events list\|transcript\|transcript-text\|qa\|press-release\|slides\|audio\|…` |
448
+ | `earnings extractions --kind guidance\|kpi` | `invd guidance list` / `invd guidance kpis` |
449
+ | `earnings` downloads (`--output <file>`) | `--save <file>` |
450
+ | `news get --pdf-out <file>` | `invd news get <id> --save <file>` |
451
+ | `sec filings\|filing\|document\|sections\|search` | `invd filings list\|get`, `invd documents get\|sections`, `invd search filings` |
452
+ | `ownership …` | `invd holdings list\|changes` |
453
+ | `usage` | `invd me usage` |
454
+ | `ws listen` (WebSocket stream) | no CLI command in 4.0; use the API's `/v2/stream` |
455
+ | `-i, --identifier AAPL` | the positional company: `invd filings AAPL` |
456
+ | `--offset <n>` | `--cursor <next_cursor>` |
457
+ | `INVINITE_DATA_API_KEY` | still read; `INVD_API_KEY` takes precedence |
458
+
459
+ ### invd 3.x maintenance
460
+
461
+ invd 3.x is the CLI of the v1 API and stays installable:
489
462
 
490
463
  ```bash
491
- # Results 20-30
492
- invd company dividends -i AAPL --limit 10 --offset 20
493
-
494
- # Fetch all results automatically
495
- invd company dividends -i AAPL --all
464
+ npm install -g @invinite-org/invinite-data-cli@3
496
465
  ```
497
466
 
467
+ The v1 API keeps working until it is deleted. 3.x fixes are cut from the `cli-3.x` maintenance branch, started at the
468
+ 3.0.0 commit `9bbdb29`, never from `main`.
469
+
498
470
  ## Development
499
471
 
500
472
  ```bash
501
- # Run in development mode (no build step)
502
- npm run dev -- company search -q Apple
503
-
504
- # Build
505
- npm run build
506
-
507
- # Run tests
508
- npm test
509
-
510
- # Lint
511
- npm run lint
473
+ pnpm dev -- companies get AAPL --dry-run # run from source
474
+ pnpm build
475
+ pnpm test
476
+ pnpm lint
512
477
  ```
513
478
 
479
+ Plain commands are generated from the API's OpenAPI spec; see `CLAUDE.md` for the chain.
480
+
514
481
  ## License
515
482
 
516
483
  ISC