@invinite-org/invinite-data-cli 0.3.4 → 0.5.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 (85) hide show
  1. package/README.md +89 -751
  2. package/claude-plugin/.claude-plugin/plugin.json +1 -1
  3. package/claude-plugin/agents/invinite-data.md +1 -1
  4. package/claude-plugin/commands/analyze-earnings-call.md +5 -4
  5. package/claude-plugin/skills/invinite-data-cli/SKILL.md +446 -180
  6. package/dist/src/cli.d.ts +6 -0
  7. package/dist/src/cli.js +21 -31
  8. package/dist/src/cli.js.map +1 -1
  9. package/dist/src/client/api-client.d.ts +2 -4
  10. package/dist/src/client/api-client.js +3 -9
  11. package/dist/src/client/api-client.js.map +1 -1
  12. package/dist/src/client/pagination.d.ts +10 -0
  13. package/dist/src/client/pagination.js +40 -0
  14. package/dist/src/client/pagination.js.map +1 -1
  15. package/dist/src/commands/earnings.d.ts +4 -3
  16. package/dist/src/commands/earnings.js +163 -466
  17. package/dist/src/commands/earnings.js.map +1 -1
  18. package/dist/src/generated/cli-manifest.json +4983 -0
  19. package/dist/src/hand-written-commands.d.ts +43 -0
  20. package/dist/src/hand-written-commands.js +21 -0
  21. package/dist/src/hand-written-commands.js.map +1 -0
  22. package/dist/src/shared/errors.d.ts +5 -0
  23. package/dist/src/shared/errors.js +12 -0
  24. package/dist/src/shared/errors.js.map +1 -1
  25. package/dist/src/shared/options.d.ts +0 -13
  26. package/dist/src/shared/options.js +0 -13
  27. package/dist/src/shared/options.js.map +1 -1
  28. package/dist/src/spec-commands.d.ts +10 -0
  29. package/dist/src/spec-commands.js +207 -0
  30. package/dist/src/spec-commands.js.map +1 -0
  31. package/dist/src/spec-flags.d.ts +6 -0
  32. package/dist/src/spec-flags.js +9 -0
  33. package/dist/src/spec-flags.js.map +1 -0
  34. package/dist/src/spec-manifest.d.ts +382 -0
  35. package/dist/src/spec-manifest.js +65 -0
  36. package/dist/src/spec-manifest.js.map +1 -0
  37. package/package.json +7 -3
  38. package/dist/src/commands/company.d.ts +0 -2
  39. package/dist/src/commands/company.js +0 -220
  40. package/dist/src/commands/company.js.map +0 -1
  41. package/dist/src/commands/earnings-selector.d.ts +0 -15
  42. package/dist/src/commands/earnings-selector.js +0 -29
  43. package/dist/src/commands/earnings-selector.js.map +0 -1
  44. package/dist/src/commands/filings.d.ts +0 -2
  45. package/dist/src/commands/filings.js +0 -139
  46. package/dist/src/commands/filings.js.map +0 -1
  47. package/dist/src/commands/financials.d.ts +0 -2
  48. package/dist/src/commands/financials.js +0 -162
  49. package/dist/src/commands/financials.js.map +0 -1
  50. package/dist/src/commands/health.d.ts +0 -2
  51. package/dist/src/commands/health.js +0 -18
  52. package/dist/src/commands/health.js.map +0 -1
  53. package/dist/src/commands/insider-trades.d.ts +0 -2
  54. package/dist/src/commands/insider-trades.js +0 -56
  55. package/dist/src/commands/insider-trades.js.map +0 -1
  56. package/dist/src/commands/ipos.d.ts +0 -2
  57. package/dist/src/commands/ipos.js +0 -42
  58. package/dist/src/commands/ipos.js.map +0 -1
  59. package/dist/src/commands/market.d.ts +0 -2
  60. package/dist/src/commands/market.js +0 -34
  61. package/dist/src/commands/market.js.map +0 -1
  62. package/dist/src/commands/metadata.d.ts +0 -2
  63. package/dist/src/commands/metadata.js +0 -39
  64. package/dist/src/commands/metadata.js.map +0 -1
  65. package/dist/src/commands/metrics.d.ts +0 -2
  66. package/dist/src/commands/metrics.js +0 -158
  67. package/dist/src/commands/metrics.js.map +0 -1
  68. package/dist/src/commands/ownership.d.ts +0 -2
  69. package/dist/src/commands/ownership.js +0 -152
  70. package/dist/src/commands/ownership.js.map +0 -1
  71. package/dist/src/commands/segments.d.ts +0 -2
  72. package/dist/src/commands/segments.js +0 -64
  73. package/dist/src/commands/segments.js.map +0 -1
  74. package/dist/src/commands/usage.d.ts +0 -38
  75. package/dist/src/commands/usage.js +0 -82
  76. package/dist/src/commands/usage.js.map +0 -1
  77. package/dist/src/commands/webhooks.d.ts +0 -16
  78. package/dist/src/commands/webhooks.js +0 -186
  79. package/dist/src/commands/webhooks.js.map +0 -1
  80. package/dist/src/formatters/sparkline.d.ts +0 -2
  81. package/dist/src/formatters/sparkline.js +0 -11
  82. package/dist/src/formatters/sparkline.js.map +0 -1
  83. package/dist/src/formatters/tree-formatter.d.ts +0 -11
  84. package/dist/src/formatters/tree-formatter.js +0 -30
  85. package/dist/src/formatters/tree-formatter.js.map +0 -1
@@ -18,22 +18,24 @@ Use the connected Invinite Data API MCP tools when available. Fall back to the `
18
18
 
19
19
  | Data need | MCP tool | CLI command family |
20
20
  |---|---|---|
21
- | Search/details/list | `company_search`, `company_details`, `available_companies` | `invd company ...` |
22
- | Dividends/periods/splits | `company_dividends`, `company_fiscal_periods`, `company_splits` | `invd company ...` |
23
- | Standardized statements/snapshots | `standardized_financial_statement`, `standardized_financial_snapshot` | `invd financials ...` |
24
- | As-reported statements/snapshots | `as_reported_financial_statement`, `as_reported_financial_snapshot` | `invd financials ... --as-reported` |
25
- | Ratios/growth/CAGR | `financial_ratios`, `financial_growth`, `financial_cagr` | `invd metrics ...` |
26
- | Segment data | `segmented_financials` | `invd segments ...` |
27
- | SEC filings/search/sections | `sec_filings`, `sec_filings_search`, `sec_filing_sections` | `invd filings ...` |
28
- | Filing and metric discovery | `sec_available_form_types`, `list_available_section_ids`, `list_available_metrics` | `invd filings form-types`, `invd metadata ...` |
29
- | Institutional ownership | `holdings_by_company`, `holdings_by_investor`, `institutional_investors`, `institutional_transactions` | `invd ownership ...` |
30
- | Insider trades/IPOs/holidays | `insider_trades`, `ipos`, `market_holidays` | `invd insider-trades`, `invd ipos`, `invd market ...` |
21
+ | Search/details/list | `company_search`, `company_details`, `available_companies` | `invd company search\|details\|list` |
22
+ | Dividends/periods/splits | `company_dividends`, `company_fiscal_periods`, `company_splits` | `invd company dividends\|fiscal-periods\|splits` |
23
+ | Standardized statements/snapshots | `standardized_financial_statement`, `standardized_financial_snapshot` | `invd financials <statement>[-detailed\|-presentation]`, `invd financials snapshot…` |
24
+ | As-reported statements/snapshots | `as_reported_financial_statement`, `as_reported_financial_snapshot` | `invd financials as-reported-<statement>…`, `invd financials as-reported-snapshot…` |
25
+ | Ratios/growth/CAGR | `financial_ratios`, `financial_growth`, `financial_cagr` | `invd metrics ratios\|growth\|cagr` |
26
+ | Segment data | `segmented_financials` | `invd segments list\|list-detailed` |
27
+ | SEC filings/search/sections | `sec_filings`, `sec_filings_search`, `sec_filing_sections` | `invd filings list\|search\|sections` |
28
+ | Filing and metric discovery | `sec_available_form_types`, `list_available_section_ids`, `list_available_metrics` | `invd filings form-types`, `invd metadata section-ids\|metrics` |
29
+ | Institutional ownership | `holdings_by_company`, `holdings_by_investor`, `institutional_investors`, `institutional_transactions` | `invd ownership …` |
30
+ | Insider trades/IPOs/holidays | `insider_trades`, `ipos`, `market_holidays` | `invd insider-trades list`, `invd ipos list`, `invd market holidays` |
31
31
  | Earnings call calendar/events/live | `earnings_call_calendar`, `earnings_call_events`, `earnings_call_live` | `invd earnings calendar\|events\|live` |
32
32
  | Call transcript/Q&A/participants | `earnings_call_transcript`, `earnings_call_qa`, `earnings_call_participants` | `invd earnings transcript\|qa\|participants` |
33
33
  | Call guidance/KPIs, diff vs prior call | `earnings_call_guidance`, `earnings_call_diff` | `invd earnings extractions\|guidance-history\|diff` |
34
34
  | Call documents/press release | `earnings_call_documents`, `earnings_call_press_release` | `invd earnings documents\|press-release` |
35
35
  | Price moves during a call (coincidence, not cause; live rows during the call) | `earnings_call_price_moves` | `invd earnings price-attribution` |
36
36
  | Search across calls | `earnings_call_search` | `invd earnings search` |
37
+ | Company IR documents (annual reports, proxy, ESG, investor-day decks, letters, webcast pages) | `earnings_company_documents`, `earnings_company_document` | `invd earnings company-documents\|document` |
38
+ | Search company documents (passages with page numbers) | `earnings_document_search` | `invd earnings document-search` |
37
39
  | Keyword / guidance alerts | `earnings_call_alert_create\|list\|update\|delete\|test\|deliveries` | `invd webhooks …` |
38
40
 
39
41
  The discovery rules below apply to both transports: call `list_available_metrics` before ratios, growth, CAGR, or financial-statement analysis, and call `list_available_section_ids` before requesting filing sections.
@@ -59,69 +61,37 @@ If an MCP call fails with an auth error, reconnect the connector and complete OA
59
61
  | Flag | Description |
60
62
  |------|-------------|
61
63
  | `--json` | Output raw JSON (always use this for programmatic access) |
62
- | `--all` | Auto-paginate through all results |
64
+ | `--all` | Auto-paginate through all results (paginated commands only; others refuse it by name) |
63
65
  | `--show-cost` | Print `credits: <charged> · included left: <remaining>` to stderr after the command (or set `INVD_SHOW_COST=1`); stdout stays clean |
64
66
 
67
+ Every data command's flags are the API parameters of its operation, spelled with dashes (`fiscal_period_type` → `--fiscal-period-type`, `event_id` → `--event-id`); `invd <group> <action> --help` lists them with the API's own descriptions. The two write commands (`webhooks create`, `webhooks update`) take the request body as `--body '<json>'` or `--body-file <path>` (`-` reads stdin).
68
+
65
69
  ### Usage and credits
66
70
 
67
71
  Before a large pull (`--all`, many tickers, filing search at 100 credits a call), run `invd usage --json` (free, `--days 7|30|90`): `period` has the plan's `included_credits`, `used_credits`, `resets_at` and `prepaid_balance_usd`; `daily`, `by_family` and `by_key` show where credits went. If the pull would not fit what is left, say so before starting it. For budgeting, add `--show-cost` to a sample call and multiply; the stderr line never mixes into `--json` output. Every operation's credit cost is the `x-credits` field of the OpenAPI spec.
68
72
 
69
- ## Commands Reference
70
-
71
- ### Company Data
72
-
73
- ```bash
74
- # List all companies
75
- invd company list --json
76
-
77
- # Search by ticker or name
78
- invd company search -q "Apple" --json
79
- invd company search -q MSFT --limit 5 --json
80
-
81
- # Company details (ticker or CIK)
82
- invd company details -i AAPL --json
83
-
84
- # Dividends (with optional date range)
85
- invd company dividends -i AAPL --json
86
- invd company dividends -i AAPL --start-date 2023-01-01 --end-date 2024-01-01 --json
73
+ ## Working with the data
87
74
 
88
- # Fiscal periods
89
- invd company fiscal-periods -i MSFT --json
75
+ ### Financial statements
90
76
 
91
- # Stock splits
92
- invd company splits -i AAPL --json
93
- ```
94
-
95
- ### Financial Statements
77
+ `-p, --fiscal-period-type` is required: `quarterly`, `annual`, `ytd`, or `ttm`. Each statement (`income-statement`, `balance-sheet`, `cash-flow`, `snapshot`) is one command per variant:
96
78
 
97
- Period is required: `quarterly`, `annual`, `ytd`, or `ttm`.
79
+ - `<statement>` — standardized values keyed by `metric_id`
80
+ - `<statement>-detailed` — adds formula, accession number, HTML tag info (`--with-formula true` for formulas)
81
+ - `<statement>-presentation` — nested tree structure (hierarchical)
82
+ - `as-reported-<statement>[-detailed|-presentation]` — the as-reported data instead of standardized
98
83
 
99
- Financial statement responses use standardized `metric_id` keys (from `metadata metrics`) as field names. If you need to understand what a specific metric_id means, check `invd metadata metrics --json` first.
84
+ Financial statement responses use standardized `metric_id` keys (from `metadata metrics`) as field names. If you need to understand what a specific metric_id means, check `invd metadata metrics --json` first. The snapshot commands take `-i, --identifiers` (comma-separated tickers) and are the most efficient way to get complete financials for several companies at once.
100
85
 
101
86
  ```bash
102
- # Income statement
103
87
  invd financials income-statement -i AAPL -p annual --json
104
- invd financials income-statement -i AAPL -p quarterly --limit 4 --json
105
-
106
- # Balance sheet
107
88
  invd financials balance-sheet -i MSFT -p quarterly --limit 4 --json
108
-
109
- # Cash flow statement
110
- invd financials cash-flow -i GOOGL -p annual --json
111
-
112
- # Financial snapshot (multiple companies, comma-separated)
89
+ invd financials as-reported-cash-flow -i GOOGL -p annual --json
113
90
  invd financials snapshot -i AAPL,MSFT,GOOGL -p annual --json
114
91
  invd financials snapshot -i AAPL -p quarterly --calendar-year 2024 --calendar-quarter 3 --json
115
92
  ```
116
93
 
117
- Statement options:
118
- - `--detailed` — includes formula, accession number, HTML tag info
119
- - `--presentation` — returns nested tree structure (hierarchical)
120
- - `--as-reported` — uses as-reported data instead of standardized
121
- - `--with-formula` — includes formula info (requires `--detailed`)
122
- - `--detailed` and `--presentation` are mutually exclusive
123
-
124
- ### Financial Metrics
94
+ ### Financial metrics
125
95
 
126
96
  **Before querying any metrics endpoint (ratios, CAGR, or growth), first fetch the available metric identifiers using `metadata metrics`.** The response from ratios/CAGR/growth uses `metric_id` keys (e.g., `PR_TO_EARNINGS`, `CURRENT_RATIO`) — without knowing the available IDs, you won't know what data exists or how to interpret the results. This also helps you confirm that the metric the user is asking about actually exists.
127
97
 
@@ -129,18 +99,10 @@ Statement options:
129
99
  # STEP 1: Always fetch available metrics first
130
100
  invd metadata metrics --json
131
101
  # Returns: { metrics: [{ metric_id: "...", name: "..." }, ...] }
132
- # Use this to understand what metric_id keys appear in ratios/CAGR/growth responses
133
102
 
134
103
  # STEP 2: Then query the specific metrics endpoint
135
- # Ratios (categories: valuation, profitability, liquidity, solvency)
136
- invd metrics ratios -i AAPL -p annual --json
137
- invd metrics ratios -i AAPL -p annual --category profitability --json
138
-
139
- # CAGR (periods: 3, 5, or 10 years)
140
- invd metrics cagr -i AAPL --json
141
- invd metrics cagr -i AAPL --period-years 5 --json
142
-
143
- # Growth metrics (year_over_year or quarter_over_quarter)
104
+ invd metrics ratios -i AAPL -p annual --category profitability --json # valuation, profitability, liquidity, solvency
105
+ invd metrics cagr -i AAPL --period-years 5 --json # 3, 5 or 10 years
144
106
  invd metrics growth -i MSFT -p quarterly --growth-type year_over_year --json
145
107
  ```
146
108
 
@@ -151,151 +113,469 @@ The metrics response structures differ by endpoint:
151
113
 
152
114
  All share the same `metric_id` identifiers from `metadata metrics`.
153
115
 
154
- ### Segments
116
+ ### Filings, ownership, insider trades
117
+
118
+ - Run `invd metadata section-ids --json` before `filings sections`; `filings search` (`-r, --request`) is natural-language search at 100 credits a call.
119
+ - Ownership transaction types (`--type`): `new_buy`, `added`, `reduced`, `sold_out`. `holdings-by-investor` needs the investor's `--cik`.
120
+ - Insider trades `--acquired-disposed`: `A` (acquisition) or `D` (disposition).
121
+
122
+ ### Earnings calls
123
+
124
+ Commands about one call take a selector: `--event-id <event_id>` (from `events` / `calendar`), or `-i <ticker>` with `--year` + `--quarter` (fiscal) or `--date YYYY-MM-DD` (New York call day); `--event-type` picks a non-earnings event (investor day, conference, AGM). `earnings calendar` defaults to earnings calls (`--event-type all` lists the others too).
125
+
126
+ - `--transcript-version N` (not `--version`) selects a published transcript version; `--as-of <iso>` the version current at that instant.
127
+ - `extractions --kind guidance|kpi`; `--review approved|auto|all` filters guidance by review status; `diff --vs prior` is the only comparison base.
128
+ - `earnings event --include observations` adds the date / time observations; `earnings participants --include evidence` the participation evidence.
129
+ - Every `*_ms` field is milliseconds from the call's start: cite it as `[m:ss]`. `qa_start_ms` is where the Q&A begins (null without one).
130
+ - Company documents and document-search hits are company-published material: quote them as "passages from company-published documents", never as verified facts, and cite each with its document title, year and page (`page`; open `url` at `#page=<page>`). A `webcast` row is link-only (`url` null, `source_url` = the replay page, `link_status`).
131
+ - Media signed URLs expire after 15 minutes; `--output` on the download commands saves the file.
132
+ - The live transcript (`ws listen --earnings`), audio, slides, the live stream and webhooks need the PRO plan (calendar, events and `live` need LITE, the other reads STANDARD); a `403` names the plan a route needs.
133
+
134
+ ### Live transcripts, price ticks and alerts
135
+
136
+ `price_tick` frames (`ws listen --prices`, PRO) carry `at`, `call_ms` (the transcript clock), `price`, `return_bps` (vs the last trade before the call), `day_return_bps` (vs the previous close) and `source` (`stream` | `snapshot`); only seconds with a trade are sent, so pre-market and after-hours ticks are sparse. Describe a move as temporal coincidence with what was said, never as caused by it. `invd earnings live` says `live_prices: true` when ticks flow; during the call `invd earnings price-attribution` returns the minute rows so far (`live: true`, `settled: false`, summary fields null) until the post-call run replaces them.
137
+
138
+ Keyword / guidance alerts (PRO) are webhook subscriptions: `earnings_call.keyword_hit` delivers one POST per mention of a keyword on any live call (speaker, `start_ms`, sentence), `earnings_call.guidance_flash` one per guidance number spoken live. "Alert me when any call mentions 'tariffs'" → `earnings_call_alert_create` with `keywords: ["tariffs"]`, `events: ["earnings_call.keyword_hit"]`, the user's HTTPS endpoint and no `ciks` (every company); later changes go through `earnings_call_alert_update` (keywords, ciks, events, active). CLI:
155
139
 
156
140
  ```bash
157
- # Segmented financials
158
- invd segments list -i AAPL -p annual --json
159
- invd segments list -i AAPL -p annual --detailed --json
141
+ invd webhooks create --body '{"url":"https://hooks.example.com/alerts","events":["earnings_call.keyword_hit"],"filters":{"keywords":["tariffs"]}}' --json # the secret is printed once
142
+ invd webhooks create --body '{"url":"https://hooks.example.com/invinite","events":["earnings_call.transcript_ready"],"filters":{"ciks":["320193"]}}' --json
143
+ invd webhooks update --id <id> --body '{"keywords":["tariffs","buyback"]}' --json
144
+ invd webhooks deliveries --id <id> --json
160
145
  ```
161
146
 
162
- ### SEC Filings
147
+ ## Commands Reference
148
+
149
+ One example per command. `<name>` is a value to fill in; `invd <group> <action> --help` lists every flag. A command about one call also needs the selector described under *Earnings calls* (`--event-id`, or `-i` with `--year` + `--quarter` or `--date`).
150
+
151
+ <!-- invd:commands:start -->
152
+ <!-- Generated by `pnpm skill:commands` from src/generated/cli-manifest.json and src/hand-written-commands.ts. Edit only inside an invd:hand block; `pnpm skill:commands:check` fails on drift. -->
153
+
154
+ ### company
155
+
156
+ Company search, details, fiscal periods, dividends and splits
163
157
 
164
158
  ```bash
165
- # List filings (filter by form type: 10-K, 10-Q, 8-K, etc.)
166
- invd filings list -i AAPL --json
167
- invd filings list -i AAPL --form-type 10-K --json
159
+ # Company details
160
+ invd company details -i <identifier> --json
168
161
 
169
- # Natural language search through filings
170
- invd filings search -r "revenue recognition policy changes" -i AAPL --json
162
+ # Company dividends (optional: --start-date, --end-date, --sort, --limit, --offset, --all)
163
+ invd company dividends -i <identifier> --json
171
164
 
172
- # Fetch filing sections (full text content)
173
- invd filings sections -i AAPL --form-type 10-K --section-id risk_factors --json
174
- invd filings sections -i AAPL --form-type 10-K --accession-number 0000320193-23-000106 --json
165
+ # Company fiscal periods (optional: --sort, --limit, --offset, --all)
166
+ invd company fiscal-periods -i <identifier> --json
167
+
168
+ # List available companies
169
+ invd company list --json
170
+
171
+ # Search companies (optional: --limit, --offset, --all)
172
+ invd company search -q <query> --json
173
+
174
+ # Stock splits (optional: --sort, --limit, --offset, --all)
175
+ invd company splits -i <identifier> --json
176
+ ```
177
+
178
+ ### config
179
+
180
+ <!-- invd:hand:config -->
181
+ ```bash
182
+ invd config set-key # masked prompt for an API key
183
+ invd config set-url https://api.data.invinite.com # API host
184
+ invd config show
185
+ invd config reset
186
+ ```
187
+ <!-- /invd:hand:config -->
188
+
189
+ ### earnings
190
+
191
+ Earnings calls: calendar, transcripts, Q&A, extractions, media, search and webhook subscriptions
192
+
193
+ ```bash
194
+ # Analysts of a company (optional: --limit, --offset, --all)
195
+ invd earnings analysts -i <identifier> --json
196
+
197
+ # Earnings call calendar (optional: --from, --to, --status, --session, --exchange, --event-type, --sort, --limit, --offset, --all)
198
+ invd earnings calendar --json
199
+
200
+ # Call-over-call diff (optional: --event-id, --identifier, --year, --quarter, --date, --event-type, --vs)
201
+ invd earnings diff --json
175
202
 
176
- # Available form types
203
+ # Search investor documents (optional: --identifier, --kind, --section, --year, --table, --limit)
204
+ invd earnings document-search -q <q> --json
205
+
206
+ # Earnings call by ID (optional: --include)
207
+ invd earnings event --event-id <event_id> --json
208
+
209
+ # Event history of a company (optional: --from, --to, --include, --event-type, --sort, --limit, --offset, --all)
210
+ invd earnings events -i <identifier> --json
211
+
212
+ # Guidance and KPI extractions (optional: --event-id, --identifier, --year, --quarter, --date, --event-type, --kind, --review, --limit, --offset, --all)
213
+ invd earnings extractions --json
214
+
215
+ # Guidance history (optional: --period-kind, --basis, --limit)
216
+ invd earnings guidance-history -i <identifier> --metric <metric> --json
217
+
218
+ # Live earnings calls
219
+ invd earnings live --json
220
+
221
+ # Earnings call metrics (optional: --event-id, --identifier, --year, --quarter, --date, --event-type)
222
+ invd earnings metrics --json
223
+
224
+ # Earnings call participants (optional: --event-id, --identifier, --year, --quarter, --date, --event-type, --include)
225
+ invd earnings participants --json
226
+
227
+ # Person across earnings calls (optional: --limit, --offset, --all)
228
+ invd earnings person --person-id <person_id> --json
229
+
230
+ # Price moves during a call (optional: --event-id, --identifier, --year, --quarter, --date, --event-type)
231
+ invd earnings price-attribution --json
232
+
233
+ # Speaker prosody (optional: --event-id, --identifier, --year, --quarter, --date, --event-type, --section)
234
+ invd earnings prosody --json
235
+
236
+ # Earnings call Q&A (optional: --event-id, --identifier, --year, --quarter, --date, --event-type, --limit, --offset, --include, --all)
237
+ invd earnings qa --json
238
+
239
+ # Search earnings calls (optional: --event-id, --identifier, --from, --to, --type, --event-type, --limit)
240
+ invd earnings search -q <q> --json
241
+
242
+ # Live audio stream URL (optional: --event-id, --identifier, --year, --quarter, --date, --event-type)
243
+ invd earnings stream --json
244
+
245
+ # Transcript version diff (optional: --event-id, --identifier, --year, --quarter, --date, --event-type, --to)
246
+ invd earnings transcript-diff --from <from> --json
247
+
248
+ # Transcript versions (optional: --event-id, --identifier, --year, --quarter, --date, --event-type)
249
+ invd earnings versions --json
250
+ ```
251
+
252
+ <!-- invd:hand:earnings transcript -->
253
+ ```bash
254
+ # Transcript (formats: speakers, text, words, sections, cleaned); --output saves it as text
255
+ invd earnings transcript -i AAPL --year 2026 --quarter 4 --format speakers --json
256
+ invd earnings transcript --event-id <event_id> --format sections --json
257
+ invd earnings transcript -i AAPL --year 2026 --quarter 4 --output aapl-q4.txt
258
+ ```
259
+ <!-- /invd:hand:earnings transcript -->
260
+
261
+ <!-- invd:hand:earnings press-release -->
262
+ ```bash
263
+ # Press release of a call; --body includes its text, --output saves it
264
+ invd earnings press-release --event-id <event_id> --body --json
265
+ invd earnings press-release -i AAPL --year 2026 --quarter 4 --body --output release.txt
266
+ ```
267
+ <!-- /invd:hand:earnings press-release -->
268
+
269
+ <!-- invd:hand:earnings audio -->
270
+ ```bash
271
+ # Call recording (PRO); --output saves the file from its signed URL (expires after 15 min)
272
+ invd earnings audio --event-id <event_id> --json
273
+ invd earnings audio --event-id <event_id> --output call.mp3
274
+ ```
275
+ <!-- /invd:hand:earnings audio -->
276
+
277
+ <!-- invd:hand:earnings slides -->
278
+ ```bash
279
+ # Slide deck (PRO): --markdown prints the page markdown, --output saves the PDF
280
+ invd earnings slides --event-id <event_id> --markdown --json
281
+ invd earnings slides -i AAPL --year 2026 --quarter 4 --output deck.pdf
282
+ ```
283
+ <!-- /invd:hand:earnings slides -->
284
+
285
+ <!-- invd:hand:earnings documents -->
286
+ ```bash
287
+ # A call's documents; --output downloads every row into a directory (a link-only sec_filing row is warned on stderr; use its source_url)
288
+ invd earnings documents --event-id <event_id> --kind cfo_commentary --json
289
+ invd earnings documents --event-id <event_id> --output ./docs
290
+ ```
291
+ <!-- /invd:hand:earnings documents -->
292
+
293
+ <!-- invd:hand:earnings company-documents -->
294
+ ```bash
295
+ # Company IR library (outside the calls' folders); --output downloads every stored file: <year>-<kind>-<document_id>.<ext>
296
+ invd earnings company-documents -i AAPL --section annual_reports,proxy --json
297
+ invd earnings company-documents -i AAPL --kind investor_day_deck --output ./ir-docs
298
+ ```
299
+ <!-- /invd:hand:earnings company-documents -->
300
+
301
+ <!-- invd:hand:earnings document -->
302
+ ```bash
303
+ # One company document: metadata, --pages for per-page text, --output to download it
304
+ invd earnings document --document-id <document_id> --pages --json
305
+ invd earnings document --document-id <document_id> --output annual-report.pdf
306
+ ```
307
+ <!-- /invd:hand:earnings document -->
308
+
309
+ ### filings
310
+
311
+ SEC filings, their parsed sections and natural-language filing search
312
+
313
+ ```bash
314
+ # Available SEC form types (optional: --identifier)
177
315
  invd filings form-types --json
178
- invd filings form-types -i AAPL --json
179
316
 
180
- # Available section IDs
181
- invd metadata section-ids --json
317
+ # SEC filings (optional: --form-type, --sort, --limit, --offset, --all)
318
+ invd filings list -i <identifier> --json
319
+
320
+ # Search SEC filings (optional: --identifier, --accession-number)
321
+ invd filings search -r <request> --json
322
+
323
+ # SEC filing sections (optional: --section-id, --accession-number, --fiscal-year, --fiscal-quarter)
324
+ invd filings sections -i <identifier> --form-type 10-Q --json
182
325
  ```
183
326
 
184
- ### Institutional Ownership
327
+ ### financials
328
+
329
+ Financial statements (standardized & as-reported)
185
330
 
186
331
  ```bash
187
- # Holdings by investor (requires CIK)
188
- invd ownership holdings-by-investor --cik 0001067983 --json
332
+ # As-reported balance sheet (optional: --sort, --limit, --offset, --all)
333
+ invd financials as-reported-balance-sheet -i <identifier> -p quarterly --json
189
334
 
190
- # Holdings by company
191
- invd ownership holdings-by-company -i AAPL --json
192
- invd ownership holdings-by-company -i AAPL --min-value 1000000 --json
335
+ # As-reported balance sheet (detailed) (optional: --sort, --limit, --offset, --with-formula, --all)
336
+ invd financials as-reported-balance-sheet-detailed -i <identifier> -p quarterly --json
193
337
 
194
- # Ownership transactions
195
- invd ownership transactions -i AAPL --type new_buy --json
196
- invd ownership transactions --cik 0001067983 --calendar-year 2024 --json
338
+ # As-reported balance sheet (presentation) (optional: --sort, --limit, --offset, --all)
339
+ invd financials as-reported-balance-sheet-presentation -i <identifier> -p quarterly --json
197
340
 
198
- # List institutional investors
199
- invd ownership institutions --json
200
- invd ownership institutions --ciks 0001067983,0001364742 --json
341
+ # As-reported cash flow statement (optional: --sort, --limit, --offset, --all)
342
+ invd financials as-reported-cash-flow -i <identifier> -p quarterly --json
343
+
344
+ # As-reported cash flow statement (detailed) (optional: --sort, --limit, --offset, --with-formula, --all)
345
+ invd financials as-reported-cash-flow-detailed -i <identifier> -p quarterly --json
346
+
347
+ # As-reported cash flow statement (presentation) (optional: --sort, --limit, --offset, --all)
348
+ invd financials as-reported-cash-flow-presentation -i <identifier> -p quarterly --json
349
+
350
+ # As-reported income statement (optional: --sort, --limit, --offset, --all)
351
+ invd financials as-reported-income-statement -i <identifier> -p quarterly --json
352
+
353
+ # As-reported income statement (detailed) (optional: --sort, --limit, --offset, --with-formula, --all)
354
+ invd financials as-reported-income-statement-detailed -i <identifier> -p quarterly --json
355
+
356
+ # As-reported income statement (presentation) (optional: --sort, --limit, --offset, --all)
357
+ invd financials as-reported-income-statement-presentation -i <identifier> -p quarterly --json
358
+
359
+ # As-reported snapshot (optional: --calendar-year, --calendar-quarter)
360
+ invd financials as-reported-snapshot -i <identifiers> -p quarterly --json
361
+
362
+ # As-reported snapshot (detailed) (optional: --calendar-year, --calendar-quarter, --with-formula)
363
+ invd financials as-reported-snapshot-detailed -i <identifiers> -p quarterly --json
364
+
365
+ # As-reported snapshot (presentation) (optional: --calendar-year, --calendar-quarter)
366
+ invd financials as-reported-snapshot-presentation -i <identifiers> -p quarterly --json
367
+
368
+ # Standardized balance sheet (optional: --sort, --limit, --offset, --all)
369
+ invd financials balance-sheet -i <identifier> -p quarterly --json
370
+
371
+ # Standardized balance sheet (detailed) (optional: --sort, --limit, --offset, --with-formula, --all)
372
+ invd financials balance-sheet-detailed -i <identifier> -p quarterly --json
373
+
374
+ # Standardized balance sheet (presentation) (optional: --sort, --limit, --offset, --all)
375
+ invd financials balance-sheet-presentation -i <identifier> -p quarterly --json
376
+
377
+ # Standardized cash flow statement (optional: --sort, --limit, --offset, --all)
378
+ invd financials cash-flow -i <identifier> -p quarterly --json
379
+
380
+ # Standardized cash flow statement (detailed) (optional: --sort, --limit, --offset, --with-formula, --all)
381
+ invd financials cash-flow-detailed -i <identifier> -p quarterly --json
382
+
383
+ # Standardized cash flow statement (presentation) (optional: --sort, --limit, --offset, --all)
384
+ invd financials cash-flow-presentation -i <identifier> -p quarterly --json
385
+
386
+ # Standardized income statement (optional: --sort, --limit, --offset, --all)
387
+ invd financials income-statement -i <identifier> -p quarterly --json
388
+
389
+ # Standardized income statement (detailed) (optional: --sort, --limit, --offset, --with-formula, --all)
390
+ invd financials income-statement-detailed -i <identifier> -p quarterly --json
391
+
392
+ # Standardized income statement (presentation) (optional: --sort, --limit, --offset, --all)
393
+ invd financials income-statement-presentation -i <identifier> -p quarterly --json
394
+
395
+ # Standardized snapshot (optional: --calendar-year, --calendar-quarter)
396
+ invd financials snapshot -i <identifiers> -p quarterly --json
397
+
398
+ # Standardized snapshot (detailed) (optional: --calendar-year, --calendar-quarter, --with-formula)
399
+ invd financials snapshot-detailed -i <identifiers> -p quarterly --json
400
+
401
+ # Standardized snapshot (presentation) (optional: --calendar-year, --calendar-quarter)
402
+ invd financials snapshot-presentation -i <identifiers> -p quarterly --json
403
+ ```
404
+
405
+ ### health
406
+
407
+ Liveness of the API (no API key)
408
+
409
+ ```bash
410
+ # Health check
411
+ invd health --json
201
412
  ```
202
413
 
203
- Transaction types: `new_buy`, `added`, `reduced`, `sold_out`
414
+ ### insider-trades
204
415
 
205
- ### Insider Trades
416
+ Insider transactions of a company
206
417
 
207
418
  ```bash
208
- # Insider transactions
209
- invd insider-trades list -i AAPL --json
210
- invd insider-trades list -i TSLA --acquired-disposed D --limit 20 --json
211
- invd insider-trades list -i AAPL --start-date 2024-01-01 --json
419
+ # Insider trades (optional: --start-date, --end-date, --acquired-disposed, --sort, --limit, --offset, --all)
420
+ invd insider-trades list -i <identifier> --json
212
421
  ```
213
422
 
214
- `--acquired-disposed`: `A` (acquisition) or `D` (disposition)
423
+ ### ipos
215
424
 
216
- ### IPOs
425
+ Initial public offerings
217
426
 
218
427
  ```bash
428
+ # List IPOs (optional: --start-date, --end-date, --sort, --limit, --offset, --all)
219
429
  invd ipos list --json
220
- invd ipos list --start-date 2024-01-01 --end-date 2024-12-31 --json
221
430
  ```
222
431
 
223
- ### Market Data
432
+ ### login
433
+
434
+ <!-- invd:hand:login -->
435
+ ```bash
436
+ invd login # browser sign-in to your Invinite Data account; stores the key
437
+ ```
438
+ <!-- /invd:hand:login -->
439
+
440
+ ### logout
224
441
 
442
+ <!-- invd:hand:logout -->
225
443
  ```bash
444
+ invd logout # revokes the login and clears stored credentials
445
+ ```
446
+ <!-- /invd:hand:logout -->
447
+
448
+ ### market
449
+
450
+ Market calendar
451
+
452
+ ```bash
453
+ # Market holidays (optional: --sort, --limit, --offset, --all)
226
454
  invd market holidays --json
227
455
  ```
228
456
 
229
- ### Metadata (query before using metrics or filing sections)
457
+ ### metadata
230
458
 
231
- These are discovery endpoints — use them before querying data that depends on specific identifiers.
459
+ The metrics and filing section ids the API serves
232
460
 
233
461
  ```bash
234
- # List all available metric IDs — run this BEFORE querying ratios, CAGR, or growth
462
+ # Available metrics
235
463
  invd metadata metrics --json
236
- # Returns: { metrics: [{ metric_id: "PR_TO_EARNINGS", name: "Price-to-Earnings Ratio" }, ...] }
237
464
 
238
- # List available section IDs — run this BEFORE querying filing sections
465
+ # Available SEC section IDs
239
466
  invd metadata section-ids --json
240
467
  ```
241
468
 
242
- ### Earnings Calls
469
+ ### metrics
243
470
 
244
- Commands about one call take a selector: `--event <event_id>` (from `events` / `calendar`), or `-i <ticker>` with `--year` + `--quarter` (fiscal) or `--date YYYY-MM-DD` (New York call day).
471
+ Ratios, growth and CAGR derived from the statements
245
472
 
246
473
  ```bash
247
- # Calendar across companies, a company's calls, calls being captured right now
248
- # --event-type: earnings_call (calendar default), investor_day, conference, agm, other, all (events default)
249
- invd earnings calendar --from 2026-10-20 --to 2026-10-31 --json
250
- invd earnings calendar --event-type all --json # investor days, conferences, AGMs too
251
- invd earnings events -i AAPL -s desc -l 4 --json
252
- invd earnings live --json
253
- invd earnings event <event_id> --json
474
+ # CAGR metrics (optional: --period-years, --sort, --limit, --offset, --all)
475
+ invd metrics cagr -i <identifier> --json
254
476
 
255
- # Transcript (formats: speakers, text, words, sections, cleaned), versions, word diff between versions
256
- # qa_start_ms = where the Q&A begins (ms into the call, null without one)
257
- invd earnings transcript -i AAPL --year 2026 --quarter 4 --format speakers --json
258
- invd earnings versions --event <event_id> --json
259
- invd earnings transcript-diff --event <event_id> --from 1 --json
260
-
261
- # Q&A pairs, speakers, analysts of a company, one person's appearances
262
- invd earnings qa --event <event_id> --json
263
- invd earnings participants --event <event_id> --json
264
- invd earnings analysts -i AAPL --json
265
- invd earnings person <person_id> --json
266
-
267
- # Press release, guidance / KPI extractions, a metric's guidance across calls
268
- invd earnings press-release --event <event_id> --body --json
269
- invd earnings extractions --event <event_id> --kind guidance --json
270
- invd earnings extractions --event <event_id> --kind kpi --json
271
- invd earnings guidance-history -i AAPL --metric revenue --json
272
-
273
- # Derived: diff vs the prior call, call metrics, prosody, price moves during the call
274
- invd earnings diff --event <event_id> --json
275
- invd earnings metrics --event <event_id> --json
276
- invd earnings prosody --event <event_id> --section qa --json
277
- invd earnings price-attribution --event <event_id> --json # minute returns (bps) next to what was said; coincidence, not cause
278
-
279
- # Media (signed URLs expire after 15 min; --output saves the file)
280
- invd earnings audio --event <event_id> --output call.mp3
281
- invd earnings slides --event <event_id> --markdown --json
282
- invd earnings documents --event <event_id> --kind cfo_commentary --json
283
- invd earnings documents --event <event_id> --output ./docs # a row without url (link-only sec_filing) is warned on stderr; use its source_url
284
- invd earnings stream --event <event_id> --json # live HLS URL of a call in progress (PRO)
285
-
286
- # Semantic search over transcripts and slides
287
- invd earnings search -q "data center demand" -i NVDA --json
477
+ # Growth metrics (optional: --growth-type, --sort, --limit, --offset, --all)
478
+ invd metrics growth -i <identifier> -p quarterly --json
479
+
480
+ # Financial ratios (optional: --category, --sort, --limit, --offset, --all)
481
+ invd metrics ratios -i <identifier> -p quarterly --json
288
482
  ```
289
483
 
290
- - `--transcript-version N` (not `--version`) selects a published transcript version; `--as-of <iso>` the version current at that instant.
291
- - `extractions --review approved|auto|all` filters guidance by review status; `diff --vs prior` is the only comparison base.
292
- - Every `*_ms` field is milliseconds from the call's start: cite it as `[m:ss]`.
293
- - The live transcript (`ws listen --earnings`), audio, slides, the live stream and webhooks need the PRO plan (calendar, events and `live` need LITE, the other reads STANDARD); a `403` names the plan a route needs.
484
+ ### ownership
485
+
486
+ 13F holdings, holders and position changes of institutional investors
487
+
488
+ ```bash
489
+ # Holdings by company (optional: --min-value, --sort, --limit, --offset, --all)
490
+ invd ownership holdings-by-company -i <identifier> --json
491
+
492
+ # Holdings by investor (optional: --sort, --limit, --offset, --all)
493
+ invd ownership holdings-by-investor --cik <cik> --json
294
494
 
295
- ### Live transcripts and webhooks
495
+ # List institutional investors (optional: --ciks, --limit, --offset, --sort, --all)
496
+ invd ownership institutions --json
497
+
498
+ # Institutional transactions (optional: --cik, --identifier, --start-date, --end-date, --type, --calendar-year, --calendar-quarter, --sort, --limit, --offset, --all)
499
+ invd ownership transactions --json
500
+ ```
501
+
502
+ ### plugin
503
+
504
+ <!-- invd:hand:plugin -->
505
+ ```bash
506
+ invd plugin install --claude --global # also --opencode, --codex, --copilot, --all; --local for this project
507
+ invd plugin uninstall --claude --global
508
+ ```
509
+ <!-- /invd:hand:plugin -->
510
+
511
+ ### segments
512
+
513
+ Financial facts broken down by business and geographic segment
514
+
515
+ ```bash
516
+ # Segmented financials (optional: --segment-id, --sort, --limit, --offset, --all)
517
+ invd segments list -i <identifier> -p quarterly --json
518
+
519
+ # Segmented financials (detailed) (optional: --segment-id, --sort, --limit, --offset, --all)
520
+ invd segments list-detailed -i <identifier> -p quarterly --json
521
+ ```
522
+
523
+ ### status
524
+
525
+ Public status and licensing (no API key)
526
+
527
+ ```bash
528
+ # Licensing policy
529
+ invd status licensing --json
530
+
531
+ # Service status
532
+ invd status show --json
533
+ ```
534
+
535
+ ### usage
536
+
537
+ Your data account's own usage (costs no credits)
538
+
539
+ ```bash
540
+ # Account usage (optional: --days)
541
+ invd usage --json
542
+ ```
543
+
544
+ ### webhooks
545
+
546
+ Earnings-call webhook subscriptions (PRO): signed POSTs of the call lifecycle
296
547
 
297
548
  ```bash
298
- # Follow a live call over the WebSocket (event ID or CIK; NDJSON with --json)
549
+ # Create a webhook (optional: --body-file)
550
+ invd webhooks create --body '<json>' --json
551
+
552
+ # Delete a webhook
553
+ invd webhooks delete --id <id> --json
554
+
555
+ # Webhook delivery attempts
556
+ invd webhooks deliveries --id <id> --json
557
+
558
+ # List webhooks
559
+ invd webhooks list --json
560
+
561
+ # Rotate a webhook signing secret
562
+ invd webhooks rotate-secret --id <id> --json
563
+
564
+ # Send a test delivery
565
+ invd webhooks test --id <id> --json
566
+
567
+ # Update a webhook (optional: --body, --body-file)
568
+ invd webhooks update --id <id> --json
569
+ ```
570
+
571
+ ### ws
572
+
573
+ <!-- invd:hand:ws -->
574
+ ```bash
575
+ # Real-time SEC filing stream
576
+ invd ws listen --json
577
+
578
+ # Follow a live call (event ID or CIK; NDJSON with --json; PRO)
299
579
  invd ws listen --earnings <event_id> --json
300
580
  invd ws listen --earnings 320193 --names
301
581
 
@@ -305,32 +585,18 @@ invd ws listen --earnings <event_id> --prices --json | jq 'select(.type=="price_
305
585
  # Keyword alerts on a live call, or across every live call (--all-live needs --keywords)
306
586
  invd ws listen --earnings 320193 --keywords tariffs,china --keyword-match stem --json
307
587
  invd ws listen --all-live --keywords tariffs --json
308
-
309
- # Earnings-call webhook subscriptions (the secret is printed once)
310
- invd webhooks list --json
311
- invd webhooks create --url https://hooks.example.com/invinite --events earnings_call.transcript_ready --ciks 320193
312
- invd webhooks create --url https://hooks.example.com/alerts --events earnings_call.keyword_hit --keywords tariffs # every company
313
- invd webhooks update <id> --keywords tariffs,buyback --json
314
- invd webhooks deliveries <id> --json
315
588
  ```
589
+ <!-- /invd:hand:ws -->
316
590
 
317
- `price_tick` frames (`--prices`, PRO) carry `at`, `call_ms` (the transcript clock), `price`, `return_bps` (vs the last trade before the call), `day_return_bps` (vs the previous close) and `source` (`stream` | `snapshot`); only seconds with a trade are sent, so pre-market and after-hours ticks are sparse. Describe a move as temporal coincidence with what was said, never as caused by it. `invd earnings live` says `live_prices: true` when ticks flow; during the call `invd earnings price-attribution` returns the minute rows so far (`live: true`, `settled: false`, summary fields null) until the post-call run replaces them.
318
-
319
- Keyword / guidance alerts (PRO) are webhook subscriptions: `earnings_call.keyword_hit` delivers one POST per mention of a keyword on any live call (speaker, `start_ms`, sentence), `earnings_call.guidance_flash` one per guidance number spoken live. "Alert me when any call mentions 'tariffs'" → `earnings_call_alert_create` with `keywords: ["tariffs"]`, `events: ["earnings_call.keyword_hit"]`, the user's HTTPS endpoint and no `ciks` (every company); later changes go through `earnings_call_alert_update` (keywords, ciks, events, active). CLI: `invd webhooks create --url <url> --events earnings_call.keyword_hit --keywords tariffs`.
320
-
321
- ### Health Check
322
-
323
- ```bash
324
- invd health --json
325
- ```
591
+ <!-- invd:commands:end -->
326
592
 
327
593
  ## Pagination
328
594
 
329
- All list endpoints support:
595
+ Paginated commands (the `--all` ones above) take:
330
596
  - `-l, --limit <n>` — max results per page
331
597
  - `--offset <n>` — pagination offset
332
- - `--all` — auto-paginate all results
333
- - `-s, --sort <dir>` — `asc` or `desc`
598
+ - `--all` — auto-paginate all results (follows `next_url`; per-company commands merge each company's pages)
599
+ - `-s, --sort <dir>` — `asc` or `desc` (where the operation supports it)
334
600
 
335
601
  ## Common Patterns
336
602
 
@@ -359,10 +625,10 @@ invd filings search -r "artificial intelligence strategy" -i MSFT --json
359
625
  Find the call, then read it from the cheapest source to the most detailed:
360
626
  ```bash
361
627
  invd earnings events -i NVDA -s desc -l 4 --json # pick the event_id
362
- invd earnings transcript --event <event_id> --format sections --json
363
- invd earnings extractions --event <event_id> --kind guidance --json
364
- invd earnings search -q "gross margin outlook" --event <event_id> --json
365
- invd earnings price-attribution --event <event_id> --json # optional: price moves during the call
628
+ invd earnings transcript --event-id <event_id> --format sections --json
629
+ invd earnings extractions --event-id <event_id> --kind guidance --json
630
+ invd earnings search -q "gross margin outlook" --event-id <event_id> --json
631
+ invd earnings price-attribution --event-id <event_id> --json # optional: price moves during the call
366
632
  ```
367
633
  `price-attribution` (MCP `earnings_call_price_moves`, STANDARD, 1 credit) lines up minute returns with what was said in that minute: temporal coincidence, not attribution of cause; pre-market bars are sparse, and a `404 price_attribution_unavailable` means the call is not attributed yet.
368
634