@disclosure-api/cli
v0.0.1
Published
Agent-friendly command line client for the Disclosure API.
Readme
Disclosure API CLI
Agent-friendly command line client for the Disclosure API.
Install
npm install -g @disclosure-api/cliThe package exposes one binary:
disclosure --helpEnvironment
export DISCLOSURE_API_KEY="your_api_key"
export DISCLOSURE_API_BASE_URL="https://disclosureapi.com"DISCLOSURE_API_BASE_URL is optional and defaults to https://disclosureapi.com. A local API
server can be used with:
DISCLOSURE_API_BASE_URL=http://127.0.0.1:5173 disclosure statusDISCLOSURE_API_KEY is required for all protected /v1 commands. disclosure status is public.
Output Contract
Success writes JSON to stdout. Errors write a JSON error envelope to stderr and exit non-zero.
List commands support --format jsonl for one returned data row per line.
Use --all on list commands to follow pagination.has_more and pagination.next_offset until
the API has no more pages.
Agent Help
The CLI is self-describing:
disclosure --help
disclosure help --json
disclosure help filings list
disclosure filings list --helpdisclosure help --json returns a machine-readable command catalog with command names,
arguments, flags, API endpoints, auth requirements, output behavior, and examples.
For coding agents:
- Prefer
--format jsonunless--format jsonlis easier to stream. - Use
--allonly when a complete dataset is required. - Avoid
--include-textunless full extracted filing text is needed. - On non-zero exit, parse stderr JSON and inspect
error.codeanderror.details. - Cite returned SEC/source URLs when relevant.
Examples
disclosure status
disclosure companies search AAPL --limit 5
disclosure companies get AAPL
disclosure filings list --ticker AAPL --form-type 8-K --format jsonl
disclosure filings get 0000320193-24-000037
disclosure filings sections 0000320193-24-000037 --item-code 2.02
disclosure earnings list --ticker DELL --limit 5
disclosure insider-transactions list --ticker AAPL --transaction-class buy
disclosure insider-holdings list --ticker AAPL --format jsonl
disclosure insiders search "Cook"
disclosure insiders transactions 0001214156 --all --format jsonl
disclosure material-events list --ticker AAPL --event-type earnings_release
disclosure confidential-filings list --ticker AAPL