invinite-api-cli
v0.1.19
Published
CLI for the Invinite API
Readme
invinite-api-cli
Command-line interface for the Invinite API — access company data, financial statements, SEC filings, institutional ownership, and more from your terminal.
Installation
From npm
npm install -g invinite-api-cliTo update to the latest version:
npm update -g invinite-api-cliFrom source
git clone https://github.com/outraday-org/invinite-api-cli.git
cd invinite-api-cli
npm install
npm run build
npm linkRequires Node.js >= 20.
Authentication
The CLI requires an Invinite API key. The key is resolved in the following order:
- Environment variable —
INVINITE_API_KEY - OS keychain — via the optional
keytarpackage - Stored config — set with the CLI
Set your API key
invinite config set-keyYou'll be prompted to enter your key (input is masked). Alternatively, export it as an environment variable:
export INVINITE_API_KEY=your-api-keyAI Plugin
This repo includes plugins for AI coding tools that enable AI-powered financial data retrieval and analysis. Supports Claude Code, OpenCode, Codex, and Copilot.
Quick install
# Interactive — prompts for runtime and scope
npx invinite-api-cli@latest plugin install
# Non-interactive examples
npx invinite-api-cli@latest plugin install --claude --global
npx invinite-api-cli@latest plugin install --claude --local
npx invinite-api-cli@latest plugin install --opencode --global
npx invinite-api-cli@latest plugin install --codex --global
npx invinite-api-cli@latest plugin install --copilot --local
npx invinite-api-cli@latest plugin install --all --globalUpdate
To update the plugin to the latest version, re-run the install command:
npx invinite-api-cli@latest plugin install --claude --global
npx invinite-api-cli@latest plugin install --all --globalUninstall
npx invinite-api-cli@latest plugin uninstall --claude --global
npx invinite-api-cli@latest plugin uninstall --all --globalWhat gets installed
| Runtime | Skill | Agent | Command |
|---------|-------|-------|---------|
| Claude Code | skills/invinite-api-cli/SKILL.md | agents/invinite-data.md | commands/financial-research.md |
| OpenCode | command/invinite-api-cli.md | agents/invinite-data.md | — |
| Codex | skills/invinite-api-cli/SKILL.md | — | skills/invinite-financial-research/SKILL.md |
| Copilot | skills/invinite-api-cli/SKILL.md | — | skills/invinite-financial-research/SKILL.md |
Alternative: Claude Code plugin directory
claude --plugin-dir /path/to/invinite-api-cli/claude-pluginUsage examples
Use /financial-research for multi-step analysis:
/financial-research Compare Apple, Microsoft, and Google's profitability and growth over the last 3 years
/financial-research Who are the largest institutional holders of TSLA and what are recent ownership changes?
/financial-research Analyze risk factors from NVDA's latest 10-K filingOr ask questions directly — the AI will auto-trigger the skill and delegate to the data agent as needed.
Note: The CLI must be installed and authenticated (see Authentication) for the plugin to work.
Global Options
These options are available on all data commands:
| Flag | Description |
|------|-------------|
| --json | Output raw JSON (pipe-friendly) |
| --all | Auto-paginate through all results |
Commands
- config — Manage CLI configuration
- health — Check API health
- company — Company information
- financials — Financial statements
- metrics — Financial metrics, ratios, and growth
- segments — Segmented financials
- filings — SEC filings
- ownership — Institutional ownership
- insider-trades — Insider trading data
- ipos — IPO listings
- market — Market data
- metadata — API metadata
- ws — WebSocket streaming
config
Manage CLI configuration.
# Set API key (interactive, masked input)
invinite config set-key
# Set custom API base URL
invinite config set-url https://custom-api.example.com
# Show current configuration
invinite config show
# Reset all configuration to defaults
invinite config resethealth
Check API health status.
invinite healthcompany
Company information, search, and corporate actions.
company list
List all available companies.
invinite company listcompany search
Search companies by ticker or name.
| Option | Description | Default |
|--------|-------------|---------|
| -q, --query <text> | Search query (required) | — |
| -l, --limit <n> | Maximum results | 10 |
| --offset <n> | Pagination offset | 0 |
invinite company search -q "Apple"
invinite company search -q MSFT --limit 5company details
Fetch company details.
| Option | Description |
|--------|-------------|
| -i, --identifier <ticker> | Ticker symbol or CIK (required) |
invinite company details -i AAPLcompany dividends
Fetch stock dividends.
| Option | Description | Default |
|--------|-------------|---------|
| -i, --identifier <ticker> | Ticker symbol or CIK (required) | — |
| --start-date <date> | Start date (YYYY-MM-DD) | — |
| --end-date <date> | End date (YYYY-MM-DD) | — |
| -s, --sort <dir> | Sort direction (asc / desc) | desc |
| -l, --limit <n> | Maximum results | 40 |
| --offset <n> | Pagination offset | 0 |
invinite company dividends -i AAPL --start-date 2023-01-01company fiscal-periods
Fetch available fiscal periods.
| Option | Description | Default |
|--------|-------------|---------|
| -i, --identifier <ticker> | Ticker symbol or CIK (required) | — |
| -s, --sort <dir> | Sort direction (asc / desc) | desc |
| -l, --limit <n> | Maximum results | 40 |
| --offset <n> | Pagination offset | 0 |
invinite company fiscal-periods -i MSFTcompany splits
Fetch stock splits.
| Option | Description | Default |
|--------|-------------|---------|
| -i, --identifier <ticker> | Ticker symbol or CIK (required) | — |
| -s, --sort <dir> | Sort direction (asc / desc) | desc |
| -l, --limit <n> | Maximum results | 40 |
| --offset <n> | Pagination offset | 0 |
invinite company splits -i AAPLfinancials
Financial statements — standardized and as-reported.
All statement commands share these options:
| Option | Description | Default |
|--------|-------------|---------|
| -i, --identifier <ticker> | Ticker symbol or CIK (required) | — |
| -p, --period <type> | Fiscal period: quarterly, annual, ytd, ttm (required) | — |
| -s, --sort <dir> | Sort direction (asc / desc) | desc |
| -l, --limit <n> | Maximum results | 10 |
| --offset <n> | Pagination offset | 0 |
| --detailed | Include formula, accession number, HTML tag info | — |
| --presentation | Return nested tree structure | — |
| --as-reported | Use as-reported data instead of standardized | — |
| --with-formula | Include formula info (only with --detailed) | — |
--detailedand--presentationare mutually exclusive.
financials income-statement
invinite financials income-statement -i AAPL -p annual
invinite financials income-statement -i AAPL -p quarterly --detailed
invinite financials income-statement -i AAPL -p annual --presentation
invinite financials income-statement -i AAPL -p annual --as-reportedfinancials balance-sheet
invinite financials balance-sheet -i MSFT -p quarterly --limit 4financials cash-flow
invinite financials cash-flow -i GOOGL -p annualfinancials snapshot
Fetch the latest complete financial snapshot. Uses comma-separated identifiers instead of a single identifier.
| Option | Description | Default |
|--------|-------------|---------|
| -i, --identifiers <tickers> | Comma-separated ticker symbols or CIKs (required) | — |
| -p, --period <type> | Fiscal period (required) | — |
| --calendar-year <year> | Filter by calendar year | — |
| --calendar-quarter <q> | Filter by calendar quarter | — |
| --detailed | Include detailed info | — |
| --presentation | Return nested tree structure | — |
| --as-reported | Use as-reported data | — |
invinite financials snapshot -i AAPL,MSFT,GOOGL -p annual
invinite financials snapshot -i AAPL -p quarterly --calendar-year 2024 --calendar-quarter 3metrics
Financial metrics, ratios, and growth rates.
metrics ratios
Fetch financial ratios.
| Option | Description | Default |
|--------|-------------|---------|
| -i, --identifier <ticker> | Ticker symbol or CIK (required) | — |
| -p, --period <type> | Fiscal period (required) | — |
| --category <cat> | Filter: valuation, profitability, liquidity, solvency | — |
| -s, --sort <dir> | Sort direction | desc |
| -l, --limit <n> | Maximum results | 10 |
| --offset <n> | Pagination offset | 0 |
invinite metrics ratios -i AAPL -p annual --category profitabilitymetrics cagr
Fetch compound annual growth rate metrics.
| Option | Description | Default |
|--------|-------------|---------|
| -i, --identifier <ticker> | Ticker symbol or CIK (required) | — |
| --period-years <years> | CAGR period: 3, 5, 10 | — |
| -s, --sort <dir> | Sort direction | desc |
| -l, --limit <n> | Maximum results | 10 |
| --offset <n> | Pagination offset | 0 |
invinite metrics cagr -i AAPL --period-years 5metrics growth
Fetch growth metrics.
| Option | Description | Default |
|--------|-------------|---------|
| -i, --identifier <ticker> | Ticker symbol or CIK (required) | — |
| -p, --period <type> | Fiscal period (required) | — |
| --growth-type <type> | year_over_year or quarter_over_quarter | — |
| -s, --sort <dir> | Sort direction | desc |
| -l, --limit <n> | Maximum results | 10 |
| --offset <n> | Pagination offset | 0 |
invinite metrics growth -i MSFT -p quarterly --growth-type year_over_yearsegments
Segmented financial data.
segments list
| Option | Description | Default |
|--------|-------------|---------|
| -i, --identifier <ticker> | Ticker symbol or CIK (required) | — |
| -p, --period <type> | Fiscal period (required) | — |
| --segment-id <id> | Filter by segment ID | — |
| --detailed | Include detailed breakdown | — |
| -s, --sort <dir> | Sort direction | desc |
| -l, --limit <n> | Maximum results | 10 |
| --offset <n> | Pagination offset | 0 |
invinite segments list -i AAPL -p annual
invinite segments list -i AAPL -p annual --detailedfilings
SEC filings data.
filings list
Fetch SEC filings for a company.
| Option | Description | Default |
|--------|-------------|---------|
| -i, --identifier <ticker> | Ticker symbol or CIK (required) | — |
| --form-type <type> | Filter by form type (e.g., 10-K, 10-Q, 8-K) | — |
| -s, --sort <dir> | Sort direction | desc |
| -l, --limit <n> | Maximum results | 40 |
| --offset <n> | Pagination offset | 0 |
invinite filings list -i AAPL --form-type 10-Kfilings search
Search SEC filings using natural language.
| Option | Description |
|--------|-------------|
| -r, --request <text> | Search query (required) |
| -i, --identifier <ticker> | Filter by company |
| --accession-number <num> | Filter by accession number |
invinite filings search -r "revenue recognition policy changes" -i AAPLfilings sections
Fetch SEC filing sections.
| Option | Description |
|--------|-------------|
| -i, --identifier <ticker> | Ticker symbol or CIK (required) |
| --form-type <type> | Form type: 10-Q, 10-K, 8-K (required) |
| --section-id <id> | Filter by section ID |
| --accession-number <num> | Filter by accession number |
| --fiscal-year <year> | Filter by fiscal year |
| --fiscal-quarter <q> | Filter by fiscal quarter |
invinite filings sections -i AAPL --form-type 10-K --section-id risk_factorsfilings form-types
List available SEC form types.
| Option | Description |
|--------|-------------|
| -i, --identifier <ticker> | Filter by company (optional) |
invinite filings form-types
invinite filings form-types -i AAPLownership
Institutional ownership data.
ownership holdings-by-investor
Fetch all holdings for an institutional investor.
| Option | Description | Default |
|--------|-------------|---------|
| --cik <cik> | Institution CIK (required) | — |
| -s, --sort <dir> | Sort direction | desc |
| -l, --limit <n> | Maximum results | 100 |
| --offset <n> | Pagination offset | 0 |
invinite ownership holdings-by-investor --cik 0001067983ownership holdings-by-company
Fetch institutional holders of a company.
| Option | Description | Default |
|--------|-------------|---------|
| -i, --identifier <ticker> | Ticker symbol or CIK (required) | — |
| --min-value <n> | Minimum holding value filter | — |
| -s, --sort <dir> | Sort direction | desc |
| -l, --limit <n> | Maximum results | 100 |
| --offset <n> | Pagination offset | 0 |
invinite ownership holdings-by-company -i AAPL --min-value 1000000ownership transactions
Fetch institutional ownership transactions.
| Option | Description | Default |
|--------|-------------|---------|
| --cik <cik> | Institution CIK | — |
| -i, --identifier <ticker> | Ticker symbol or CIK | — |
| --start-date <date> | Start date (YYYY-MM-DD) | — |
| --end-date <date> | End date (YYYY-MM-DD) | — |
| --type <type> | Transaction type: new_buy, added, reduced, sold_out | — |
| --calendar-year <year> | Filter by calendar year | — |
| --calendar-quarter <q> | Filter by calendar quarter | — |
| -s, --sort <dir> | Sort direction | desc |
| -l, --limit <n> | Maximum results | 100 |
| --offset <n> | Pagination offset | 0 |
invinite ownership transactions -i AAPL --type new_buy
invinite ownership transactions --cik 0001067983 --calendar-year 2024ownership institutions
List institutional investors.
| Option | Description | Default |
|--------|-------------|---------|
| --ciks <ciks> | Comma-separated institution CIKs | — |
| -s, --sort <dir> | Sort direction | asc |
| -l, --limit <n> | Maximum results | 100 |
| --offset <n> | Pagination offset | 0 |
invinite ownership institutions
invinite ownership institutions --ciks 0001067983,0001364742insider-trades
Insider trading data.
insider-trades list
| Option | Description | Default |
|--------|-------------|---------|
| -i, --identifier <ticker> | Ticker symbol or CIK (required) | — |
| --start-date <date> | Start date (YYYY-MM-DD) | — |
| --end-date <date> | End date (YYYY-MM-DD) | — |
| --acquired-disposed <ad> | A (acquisition) or D (disposition) | — |
| -s, --sort <dir> | Sort direction | desc |
| -l, --limit <n> | Maximum results | 100 |
| --offset <n> | Pagination offset | 0 |
invinite insider-trades list -i AAPL
invinite insider-trades list -i TSLA --acquired-disposed D --limit 20ipos
IPO listings.
ipos list
| Option | Description | Default |
|--------|-------------|---------|
| --start-date <date> | Start date (YYYY-MM-DD) | — |
| --end-date <date> | End date (YYYY-MM-DD) | — |
| -s, --sort <dir> | Sort direction | desc |
| -l, --limit <n> | Maximum results | 100 |
| --offset <n> | Pagination offset | 0 |
invinite ipos list --start-date 2024-01-01 --end-date 2024-12-31market
Market data.
market holidays
Fetch market holidays.
| Option | Description | Default |
|--------|-------------|---------|
| -s, --sort <dir> | Sort direction | asc |
| -l, --limit <n> | Maximum results | 100 |
| --offset <n> | Pagination offset | 0 |
invinite market holidaysmetadata
API metadata and available identifiers.
metadata metrics
List all available standardized financial metrics.
invinite metadata metricsmetadata section-ids
List available section IDs for SEC filings.
invinite metadata section-idsws
Real-time WebSocket streaming.
ws listen
Listen to real-time SEC filing notifications. Automatically reconnects on disconnection with exponential backoff.
invinite ws listenPress Ctrl+C to disconnect.
Output Formats
By default, data is displayed as formatted tables with aligned columns and number formatting.
# Default table output
invinite company search -q Apple
# Raw JSON output (useful for piping to jq or other tools)
invinite company search -q Apple --json
# Pipe to jq
invinite financials income-statement -i AAPL -p annual --json | jq '.data[0]'Financial statements with --presentation are displayed as indented trees showing the hierarchical structure of line items.
Pagination
Results are paginated by default. Use --limit and --offset to control pagination manually, or use --all to automatically fetch all pages:
# Get first 10 results (default)
invinite company dividends -i AAPL
# Get results 20-30
invinite company dividends -i AAPL --limit 10 --offset 20
# Fetch all results automatically
invinite company dividends -i AAPL --allDevelopment
# Run in development mode (no build step)
npm run dev -- company search -q Apple
# Build
npm run build
# Run tests
npm test
# Lint
npm run lintLicense
ISC
