Agent-ready SEC EDGAR parser and query CLI, powered by Rust.
| Core | What it gives you |
|---|---|
| Insider activity | Form 4 owner, role, transaction code, shares, price, value, footnotes, signatures |
| Institutional holdings | 13F holdings, portfolio summary, top positions, quarter-over-quarter changes |
| Company disclosure | 8-K events, 10-K/10-Q risk factors, MD&A, foreign issuer 20-F/6-K/40-F, filing search |
| Fund disclosure | N-PORT holdings, N-CSR shareholder reports, N-CEN census, N-PX votes, 497K summaries, 24F notices |
| Capital markets | S-1/F-1/424B prospectus terms, IPO signals, proceeds, risks, underwriters |
| Financial analysis | SEC-derived margins, growth, free cash flow, ROA/ROE, liquidity, leverage |
| Market monitoring | SEC daily master index scans across all new filings by date, form, and company |
| Global search | SEC EDGAR Full-Text Search (EFTS) across companies, forms, dates, and CIKs |
| Agent interface | Stable JSON/JSONL, LLM name resolution, source URLs, accession numbers |
sec filings --ticker AAPL --form 10-K
sec daily --date 2026-05-15 --form 8-K --limit 50 --pretty
sec efts --query "supply chain risk" --form 10-K --from 2024-01-01 --to 2024-12-31 --limit 10 --pretty
sec facts --ticker AAPL --concept revenue
sec statements --ticker AAPL --statement income --period annual --latest 4
sec stitch --ticker AAPL --statement income --latest 8 --pretty
sec metrics --ticker AAPL --period annual --latest 4 --pretty
sec scores --ticker AAPL --period annual --latest 1 --pretty
sec export --kind metrics --ticker AAPL --period annual --latest 4 --format parquet --out aapl_metrics.parquet
sec archive --ticker AAPL --form 10-K --latest 2 --primary-only --out-dir ./archives/aapl
sec agent-pack --ticker AAPL --sections risk-factors,mda --metrics-latest 4 --pretty
sec ixbrl --ticker AAPL --form 10-K --concept RevenueFromContractWithCustomerExcludingAssessedTax
sec xbrl-links --ticker AAPL --form 10-K --linkbase presentation --concept Revenue --limit 20 --pretty
sec xbrl-tree --ticker AAPL --form 10-K --role OPERATIONS --limit 30 --pretty
sec xbrl-calc --ticker AAPL --form 10-K --role OPERATIONS --limit 20 --pretty
sec xbrl-statement --ticker AAPL --form 10-K --role OPERATIONS --values-only --limit 30 --pretty
sec tables --ticker AAPL --form 10-K --limit-tables 5 --limit-rows 10
sec company-report --ticker AAPL --form 10-K --topic segment --pretty
sec proxy --ticker AAPL --latest 1 --pretty
sec prospectus --ticker RDDT --form S-1 --include-amends --latest 1 --pretty
sec foreign --ticker TSM --form 20-F --latest 1 --pretty
sec fund --cik 0000036405 --form NPORT-P --latest 1 --limit-holdings 10 --pretty
sec fund --cik 0000036405 --form N-PX --latest 1 --limit-holdings 20 --pretty
sec search --ticker TSLA --form 10-K --query "supply chain risk"
sec section --ticker AAPL --form 10-K --item risk-factors --limit-bytes 8000
sec report --ticker AAPL --kind financial --latest 4
sec report --ticker AAPL --kind risk
sec resolve --query 段永平 --pretty
sec 13f-diff --investor 段永平 --pretty
sec report --cik 1067983 --kind portfolio --limit 10
sec docs --ticker AAPL --form 10-K --latest 1 --limit 20
sec doc --ticker AAPL --form 10-K --primary --limit-bytes 4000
sec form4 --ticker AAPL --latest 3
sec form4-summary --ticker AAPL --latest 3
sec 8k --ticker AAPL --item 2.02 --latest 5
sec 8k-exhibits --ticker AAPL --category earnings_release --latest 5 --pretty
sec 13d --ticker TSLA --form 13g --latest 2 --include-amends
sec 13f --cik 1067983 --latest 1
sec 13f-aggregate --cik 1067983 --latest 1 --limit 20
sec 13f-diff --cik 1067983 --limit 20
sec 13f-summary --cik 1067983 --latest 1
sec parse --ticker AAPL --form 4 --latest 1
sec forms --pretty
sec config set-identity "Your Name your.email@example.com"
sec completions zsh > ~/.zfunc/_sec
sec serve --host 127.0.0.1 --port 8716
sec mcpsec-cli turns SEC filings into source-backed JSON for agents, analysts, and
data workflows. It is designed as a fast command-line tool first: stable output,
clear exit codes, local caching, and source URLs on every result.
This is an early MVP. The first implementation focuses on:
- Finding company filings from SEC submissions data
- Scanning SEC daily master indexes for all-market filing monitoring by date, form, company, and amendments
- Searching SEC EDGAR Full-Text Search across the market with optional ticker/CIK, form, and date filters
- Querying SEC CompanyFacts for source-backed XBRL facts
- Building broader standardized 10-K/10-Q income statement, balance sheet, and cash flow rows from CompanyFacts
- Calculating source-backed financial metrics such as growth, margins, free cash flow, ROA/ROE, current ratio, and leverage
- Streaming Inline XBRL facts directly from primary filing HTML
- Parsing XBRL presentation, calculation, definition, label, and schema linkbase attachments
- Extracting HTML tables from filing primary documents
- Parsing deeper 10-K/10-Q company-report topic tables such as segment revenue, geography, debt maturities, obligations, leases, taxes, and repurchases
- Parsing DEF 14A proxy statements for meeting details, voting proposals, directors, auditors, and executive compensation tables
- Parsing S-1/F-1/424B prospectuses for securities offered, ticker/exchange, price range, proceeds, risks, underwriters, and selected offering tables
- Parsing 20-F/6-K/40-F foreign issuer disclosures for annual reports, current reports, exchanges, symbols, auditors, event signals, and key excerpts
- Parsing N-PORT/N-CSR/N-CEN/N-PX/497K/24F-2NT fund disclosures for portfolio holdings, fund metadata, proxy votes, summary prospectuses, securities-sold notices, shareholder-report excerpts, and financial statement sections
- Searching filing submission text with snippets
- Extracting common 10-K/10-Q sections such as business, risk factors, and MD&A
- Generating source-backed Markdown reports for insider activity, 13F portfolios, and risk review
- Resolving public investor/fund/person names through an LLM, then validating candidates against SEC 13F filings
- Listing and reading individual SEC submission documents
- Parsing Form 4 insider ownership transactions
- Summarizing Form 4 reports, owners, signatures, footnotes, and net activity
- Parsing Form 8-K current-report events by item
- Discovering and classifying 8-K exhibits, including earnings releases, press releases, contracts, agreements, XBRL, and accountant letters
- Parsing Schedule 13D/13G beneficial ownership reports
- Parsing 13F-HR information-table holdings
- Aggregating 13F-HR holdings by CUSIP/class/put-call
- Comparing the latest two 13F-HR portfolios
- Parsing 13F-HR cover, summary, signature, and manager metadata
- Returning JSON arrays, JSONL, CSV, terminal tables, and Markdown reports
- Caching SEC responses locally
- Serving the same core queries through a local JSON HTTP API
- Serving the SEC query/parser/report surface through a stdio MCP adapter for agents
Longer term, the project aims to grow into a Rust-powered SEC disclosure engine: Deeper agent-native query workflows on top of the current CLI/HTTP/MCP/export and offline archive surfaces.
These are useful, source-backed questions that work today:
| Question | Command |
|---|---|
| What did insiders recently buy or sell? | sec form4 --ticker AAPL --latest 5 --pretty |
| Which executives/directors filed Form 4s and what was net activity? | sec form4-summary --ticker AAPL --latest 5 --pretty |
| Which 8-K events did a company recently report? | sec 8k --ticker AAPL --latest 5 --pretty |
| Did a company file earnings-related 8-K events? | sec 8k --ticker AAPL --item 2.02 --latest 5 --pretty |
| Which 8-K exhibits include earnings releases or material contracts? | sec 8k-exhibits --ticker AAPL --category earnings_release --latest 5 --pretty |
| What did the whole market file on a specific day? | sec daily --date 2026-05-15 --form 8-K --limit 50 --pretty |
| Which companies mentioned a phrase across SEC filings? | sec efts --query "supply chain risk" --form 10-K --from 2024-01-01 --to 2024-12-31 --pretty |
| What are the latest standardized financial statement rows? | sec statements --ticker AAPL --statement all --period annual --latest 1 --pretty |
| What are the latest SEC-derived financial ratios and growth metrics? | sec metrics --ticker AAPL --period annual --latest 4 --pretty |
| Can I get a human-readable financial trend memo? | sec report --ticker AAPL --kind financial --latest 4 |
| What Inline XBRL facts are embedded in the filing HTML? | sec ixbrl --ticker AAPL --form 10-K --concept RevenueFromContractWithCustomerExcludingAssessedTax --pretty |
| What tables are embedded in a filing? | sec tables --ticker AAPL --form 10-K --limit-tables 5 --limit-rows 10 --pretty |
| Which 10-K/10-Q topic tables discuss segments, geography, debt, obligations, leases, taxes, or repurchases? | sec company-report --ticker AAPL --form 10-K --topic segment --pretty |
| What is in the latest proxy statement? | sec proxy --ticker AAPL --latest 1 --pretty |
| What are the key terms in an IPO prospectus? | sec prospectus --ticker RDDT --form S-1 --include-amends --latest 1 --pretty |
| What did a foreign private issuer disclose in its latest annual/current report? | sec foreign --ticker TSM --form 20-F --latest 1 --pretty |
| What holdings did a fund disclose in N-PORT? | sec fund --cik 0000036405 --form NPORT-P --latest 1 --limit-holdings 10 --pretty |
| How did a fund vote proxies in N-PX? | sec fund --cik 0000036405 --form N-PX --latest 1 --limit-holdings 20 --pretty |
| Which 5% beneficial owners recently filed 13D/13G? | sec 13d --ticker TSLA --form 13g --include-amends --pretty |
| What is Berkshire Hathaway's latest 13F portfolio? | sec 13f-aggregate --cik 1067983 --limit 20 --pretty |
| What changed between the latest two 13F filings? | sec 13f-diff --cik 1067983 --limit 20 --pretty |
| What if I know the investor name but not the CIK? | sec resolve --query 段永平 --pretty, then sec 13f-diff --investor 段永平 --pretty |
| What are a company's latest 10-K risk factors? | sec section --ticker AAPL --form 10-K --item risk-factors --pretty |
| How can an app or local agent call sec-cli over HTTP? | sec serve --port 8716, then curl "http://127.0.0.1:8716/v1/filings?ticker=AAPL&form=10-K&latest=1" |
| How can an MCP-capable agent call sec-cli directly? | Run sec config set-identity ..., then configure the agent to launch sec mcp |
| Where did the answer come from? | Every structured result includes source_url; document results also include document_url |
sec-cli has two broad query families: company disclosure and 13F investment
manager disclosure.
Company-disclosure commands use --ticker or --cik:
filingsfactsstatementsmetricscompany-reportsearchsectiondocsdocform4form4-summary8kproxyprospectusforeignfundparsereport --kind riskreport --kind insider
13F investment-manager commands can use four selector styles:
--cik: most precise. Use it when you already know the SEC CIK.--manager: deterministic SEC company search by legal filing-manager name; no LLM.--investor: public person/fund name. Uses verified cache first, then LLM if needed, then SEC validation.--ticker: useful when the 13F manager is also a public company and the ticker maps to the 13F filer, such asBRK-B.
The same subject can be queried several ways; all paths should converge on the same verified SEC CIK:
# Duan Yongping / H&H: natural-language input for people and agents
sec resolve --query 段永平 --pretty
sec 13f-diff --investor 段永平 --limit 10 --pretty
sec report --investor 段永平 --kind portfolio --limit 10
# Duan Yongping / H&H: legal entity, deterministic, no LLM
sec resolve --manager "H&H International Investment LLC" --pretty
sec 13f-summary --manager "H&H International Investment LLC" --latest 2 --pretty
sec 13f-diff --manager "H&H International Investment LLC" --limit 10 --pretty
# Duan Yongping / H&H: CIK, best for scripts and production jobs
sec resolve --cik 1759760 --pretty
sec 13f-aggregate --cik 1759760 --latest 1 --limit 20 --pretty
sec 13f-diff --cik 1759760 --limit 10 --jsonl
# Warren Buffett / Berkshire: public name, manager, CIK, and ticker all work
sec resolve --query "Warren Buffett" --pretty
sec 13f-summary --manager "BERKSHIRE HATHAWAY INC" --latest 1 --pretty
sec 13f-diff --cik 1067983 --limit 20 --pretty
sec 13f-diff --ticker BRK-B --limit 20 --prettyPractical rule:
- For a person or agent prompt, start with
--investoror--query. - For repeatable scripts, prefer
--cik. - For known SEC legal entities, prefer
--manager. - For operating-company filings and insider activity, prefer
--ticker, then--cik.
sec-cli uses SEC public data directly. It does not call paid market-data APIs.
| Data/source | Commands | What it contains | Main output table |
|---|---|---|---|
| SEC submissions JSON | filings, archive, export --kind filings |
Filing list, dates, accession numbers, primary document names, filing metadata exports, and offline filing document archives | filing records, archive manifests, Arrow/Parquet filing tables |
| SEC daily master index | daily, monitor |
All-market daily filing feed: CIK, company, form, filing date, archive filename, accession, source URLs | daily filing records |
| SEC EDGAR Full-Text Search / EFTS | efts, full-text, global-search |
All-market text-search hits with score, company, CIK, form, dates, accession, document URL | EFTS search records |
| SEC CompanyFacts JSON | facts, statements, stitch, metrics, scores, export, report --kind financial |
XBRL facts such as revenue, net income, assets, units, periods, standardized statement lines, de-duplicated 10-K/10-Q time series, derived margins/growth/returns/liquidity/leverage, Piotroski/Altman/Beneish health scores, and Arrow/Parquet exports | fact records, financial statement rows, stitched statement rows, financial metric records, health score records, Arrow/Parquet tables, Markdown financial report |
| Inline XBRL filing HTML | ixbrl |
Filing-embedded ix:nonFraction and ix:nonNumeric facts, context refs, units, scale, decimals, raw value |
Inline XBRL fact records |
| XBRL linkbase attachments | xbrl-links, linkbase, xbrl-tree, xbrl-calc, xbrl-statement |
EX-101.PRE/CAL/DEF/LAB/SCH relationships: presentation arcs, calculation weights, definition arcs, labels, schema elements, rendered statement rows with same-accession CompanyFacts values | XBRL linkbase relationship records, presentation tree rows, calculation checks, rendered XBRL statement rows |
| Filing HTML tables | tables |
Table rows from primary HTML documents: compensation tables, segment tables, registration tables, contract tables | HTML table records |
| 10-K/10-Q company report primary document | company-report, parse --form "10-K" |
Classified topic tables: segment revenue, geography, revenue disaggregation, debt maturities, contractual obligations, leases, taxes, share repurchases | company report records |
| DEF 14A proxy statement primary document | proxy, parse --form "DEF 14A" |
Annual meeting date/site, voting proposals, board recommendations, director nominees, auditor, named executive officers, summary compensation table | proxy statement records |
| S-1/F-1/424B prospectus primary document | prospectus, parse --form "S-1" |
Securities offered, IPO/prospectus type, ticker/exchange, price range, shares, proceeds, underwriters, auditor, risk/business/proceeds excerpts | prospectus records |
| 20-F/6-K/40-F foreign issuer primary document | foreign, parse --form "20-F" |
Foreign private issuer annual/current reports, exchanges, symbols, auditors, event signals, risk/business/operating review/controls/financial statements excerpts | foreign issuer records |
| N-PORT/N-CSR/N-CEN/N-PX/497K/24F-2NT fund documents | fund, parse --form "NPORT-P" |
Fund registrant/series/class metadata, N-PORT holdings, N-PX proxy votes, 497K summary prospectus excerpts, 24F securities-sold notices, assets/liabilities/net assets, N-CSR shareholder report excerpts, controls and financial statements | fund disclosure records |
| SEC complete submission text and archive documents | search, section, docs, doc |
Original filing text, HTML/XML attachments, exhibits, source snippets | snippet, section, document records |
| Form 3/4/5 XML ownership reports | form4, form4-summary, report --kind insider |
Insider owners, roles, transaction codes, shares, prices, footnotes, signatures | transaction and ownership-report records |
| Form 8-K primary document | 8k |
Current-report event items such as 2.02 earnings, 5.02 management changes, 8.01 other events, 9.01 exhibits | 8-K event records |
| Form 8-K exhibits | 8k-exhibits |
Attached EX documents classified as earnings release, press release, material contract, transaction agreement, charter/bylaws, security instrument, XBRL, accountant letter | 8-K exhibit records |
| Schedule 13D/13G primary document | 13d, 13g, schedule13 |
5% beneficial ownership, reporting persons, ownership percentage, voting/dispositive power, activist/passive intent signal | Schedule 13 records |
| Form 13F-HR information table | 13f, 13f-aggregate, 13f-diff, report --kind portfolio |
Institutional long holdings: issuer, class, CUSIP, value, shares, voting authority | holding, aggregate holding, diff records |
| Form 13F-HR primary document | 13f-summary |
Manager identity, report period, total holdings/value, signature, included managers | 13F report summary records |
| 10-K/10-Q primary document | section, report --kind risk |
Business, risk factors, cybersecurity, MD&A, financial statement sections | section records and Markdown report |
| LLM resolver plus SEC validation | resolve, 13F commands with --investor |
Public name to legal SEC filing manager/CIK candidate | resolve candidate records |
Every serious output carries source metadata. For citations and audit trails,
look for source_url, document_url, accession, document, section, and
fact_id depending on the command.
Output record cheat sheet:
| Output record | Produced by | Read this first | Source fields |
|---|---|---|---|
| Filing | filings |
company, form, filing_date, report_date, primary_document |
accession, source_url, text_url |
| Daily filing | daily, monitor |
company, form, filing_date, filename |
accession, source_url, text_url |
| EFTS search hit | efts, full-text, global-search |
company, form, file_date, score, document |
accession, source_url, document_url |
| Fact | facts |
concept, label, value, unit, fy, fp, filed |
accession, source_url, fact_id |
| Financial statement row | statements |
statement, line_order, line_item, value, unit, fiscal_year, fiscal_period |
accession, source_url, fact_id |
| Stitched statement row | stitch, statement-stitch |
statement, line_item, period_kind, form, value, duplicate_forms, source_count |
accession, source_url, fact_id |
| Financial metric | metrics |
metric, category, value, display_value, period_end, calculation, components |
source_urls, component accession, component fact_id |
| Financial health score | scores |
score_name, score, max_score, rating, period_end, signals |
source_urls, signal calculation |
| Inline XBRL fact | ixbrl |
name, context_ref, unit_ref, scale, raw_value, numeric_value |
accession, document_url, source_url |
| XBRL linkbase relationship | xbrl-links |
linkbase, relationship, role, parent_concept, child_concept, concept, label, order, weight |
accession, document_url, source_url |
| XBRL presentation tree row | xbrl-tree |
role, depth, line_order, concept, label, parent_concept, path |
accession, document_url, source_url |
| XBRL calculation check | xbrl-calc |
parent_concept, parent_value, calculated_value, difference, status, matched_children |
accession, document_url, source_url |
| Rendered XBRL statement row | xbrl-statement, statement-render |
role, depth, line_order, concept, label, value, numeric_value, calculation_status, path |
accession, fact_id, document_url, source_url |
| HTML table | tables |
title_hint, row_count, column_count, headers, rows, truncated |
accession, document_url, source_url |
| Company report topic table | company-report |
topics[].topic, confidence, headers, rows, matched_table_count, scanned_table_count |
accession, document_url, source_url |
| Proxy statement | proxy, parse --form "DEF 14A" |
meeting_date, proposals, director_nominees, auditor, named_executive_officers, summary_compensation_table |
accession, document_url, source_url |
| Prospectus | prospectus, parse --form "S-1" |
securities_offered, proposed_ticker, exchange, price_range, shares_offered, underwriters, risk_factors |
accession, document_url, source_url |
| Foreign issuer | foreign, parse --form "20-F" |
report_type, exchange, ticker_or_symbol, auditor, event_signals, risk_factors, operating_review |
accession, document_url, source_url |
| Fund disclosure | fund, parse --form "NPORT-P" |
disclosure_type, registrant_name, series_name, period_end, holdings, proxy_votes, summary_prospectus, registration_fee_notice, net_assets |
accession, document_url, source_url |
| Search snippet | search |
query, snippet, offset, form, filing_date |
accession, source_url, document, section |
| Section | section |
item, title, content, truncated |
accession, document_url, source_url |
| Document | docs, doc |
filename, document_type, description, content_type, content |
accession, document_url, source_url |
| Form 4 transaction | form4 |
reporting_owner, officer_title, transaction_code, shares, price, value |
accession, source_url |
| Form 4 report summary | form4-summary |
owners, transaction_count, net_shares, total_value, footnotes |
accession, source_url |
| 8-K event | 8k |
item, item_title, category, is_furnished_item, content |
accession, document_url, source_url |
| 8-K exhibit | 8k-exhibits |
document_type, category, is_earnings_release, description, content |
accession, document_url, source_url |
| Schedule 13D/13G | 13d, 13g, schedule13 |
reporting_persons, beneficially_owned_shares, percent_of_class, activist_intent |
accession, document_url, source_url |
| 13F holding | 13f |
manager, issuer, class, cusip, value_usd, shares |
accession, source_url |
| 13F aggregate holding | 13f-aggregate |
issuer, cusip, value_usd, shares, rows |
source_url |
| 13F diff row | 13f-diff |
issuer, change_type, change_value_usd, change_shares |
current_source_url, previous_source_url |
| 13F report summary | 13f-summary |
manager, report_date, total_holdings_reported, total_value_usd, signature_name |
accession, source_url |
| Resolve candidate | resolve |
investor, manager, cik, confidence, validation.status |
validation.source_url, validation.latest_accession |
edgartools already has Python objects, rich displays, DataFrame exports, AI
context helpers, and many filing-type parsers. sec-cli is deliberately
different: it is a standalone Rust CLI optimized for automation and agents. The
parity goal is to cover the useful structured outputs edgartools exposes, while
adding stable command-line schemas, precise exit behavior, source URLs on every
record, and Markdown reports that can be dropped directly into an analyst note.
The code is intentionally split by responsibility:
cli: command arguments and CLI orchestration onlylib: reusable Rust core shared by the CLI, HTTP API, MCP adapter, and future batch/export jobshttp: low-level SEC HTTPstorage: local byte cache/storeclient: SEC domain facade, ticker-to-CIK lookupedgar: SEC data sources, submissions, facts, archive URLscompany: deeper 10-K/10-Q topic-table parsermetrics: source-backed financial ratios and growth analysisdocuments: complete-submission.txtsplitting and attachment selectionllm: OpenAI-compatible and Anthropic-compatible model clientsresolve: LLM candidate resolution plus SEC 13F validationparsers: shared XML helpers and form-specific parsersmodels: query DTOs and stable output recordsregistry: supported parser discoverypipeline: unified parser dispatch for supported filing formssearch: filing text search and snippetsoutput: stable JSON / JSONL rendering
New SEC forms should usually be added as a new parser under src/sec/parsers/forms/.
The CLI should stay thin: resolve CIK, call a domain operation, print records.
See docs/ARCHITECTURE.md for the longer-term architecture.
For normal use, download a prebuilt binary from the latest GitHub Release. You do not need Rust or Cargo unless you are developing sec-cli itself.
Release page: https://github.com/okloorcl/sec-cli/releases/latest
| Platform | Architecture | Release asset |
|---|---|---|
| macOS | Apple Silicon / arm64 | sec-cli-aarch64-apple-darwin.tar.gz |
| Windows | amd64 / x86_64 | sec-cli-x86_64-pc-windows-msvc.zip |
| Linux | amd64 / x86_64 | sec-cli-x86_64-unknown-linux-gnu.tar.gz |
| Linux | amd32 / i686 | sec-cli-i686-unknown-linux-gnu.tar.gz |
| Linux | arm64 / AArch64 | sec-cli-aarch64-unknown-linux-gnu.tar.gz |
| Linux | arm32 / ARMv7 hard-float | sec-cli-armv7-unknown-linux-gnueabihf.tar.gz |
macOS Apple Silicon:
curl -L -o sec-cli.tar.gz \
https://github.com/okloorcl/sec-cli/releases/latest/download/sec-cli-aarch64-apple-darwin.tar.gz
tar -xzf sec-cli.tar.gz
sudo mv sec-cli-aarch64-apple-darwin/sec /usr/local/bin/sec
sec --helpLinux amd64:
curl -L -o sec-cli.tar.gz \
https://github.com/okloorcl/sec-cli/releases/latest/download/sec-cli-x86_64-unknown-linux-gnu.tar.gz
tar -xzf sec-cli.tar.gz
sudo mv sec-cli-x86_64-unknown-linux-gnu/sec /usr/local/bin/sec
sec --helpWindows PowerShell:
Invoke-WebRequest `
-Uri https://github.com/okloorcl/sec-cli/releases/latest/download/sec-cli-x86_64-pc-windows-msvc.zip `
-OutFile sec-cli.zip
Expand-Archive sec-cli.zip -DestinationPath .
.\sec-cli-x86_64-pc-windows-msvc\sec.exe --helpSEC requests must include a real identity. The easiest durable setup is:
sec config set-identity "Your Name your.email@example.com"
sec config showYou can also use environment variables:
export SEC_IDENTITY="Your Name your.email@example.com"You can also pass it per command:
sec --identity "Your Name your.email@example.com" filings --ticker AAPLShell completion scripts are generated locally:
sec completions zsh > ~/.zfunc/_sec
sec completions bash > sec.bash
sec completions fish > ~/.config/fish/completions/sec.fishUse Cargo only when you are developing or testing the project locally:
cargo build
cargo test
SEC_IDENTITY="Your Name your.email@example.com" \
cargo run --bin sec -- filings --ticker AAPL --form 10-K --latest 2 --prettyGitHub Actions checks the project on every push and pull request. Pushing a
v* tag builds and uploads release binaries for the same targets:
| Platform | Architecture | Rust target | CI behavior |
|---|---|---|---|
| Ubuntu Linux | amd64 / x86_64 | x86_64-unknown-linux-gnu |
check, test, release build |
| Ubuntu Linux | amd32 / i686 | i686-unknown-linux-gnu |
cross check, cross release build |
| Ubuntu Linux | arm64 / AArch64 | aarch64-unknown-linux-gnu |
cross check, cross release build |
| Ubuntu Linux | arm32 / ARMv7 hard-float | armv7-unknown-linux-gnueabihf |
cross check, cross release build |
| Windows | amd64 / x86_64 | x86_64-pc-windows-msvc |
check, test, release build |
| macOS | arm64 / Apple Silicon | aarch64-apple-darwin |
check, test, release build |
Native runners execute tests where GitHub provides the matching machine.
Linux non-native targets use cross, so CI verifies compilation for 32-bit and
ARM Linux without trying to run those binaries on the x86_64 runner.
sec resolve does not use a hardcoded investor map. Resolution is layered:
standard inputs are handled by deterministic SEC lookups first, and the LLM is
only used when the input is a non-standard public name.
--cikvalidates the CIK directly against SEC13F-HRfilings.--managersearches SEC company records for the legal 13F filing manager.--querychecks the verified local cache, asks the LLM for likely legal filing managers, then validates/corrects candidates against SEC filings.
The LLM is used for name understanding; SEC data remains the source of truth.
Verified resolutions are cached under the local sec-cli cache directory, so
commands such as sec 13f-diff --investor <NAME> can reuse the last SEC-verified
CIK instead of depending on a fresh LLM answer every time.
OpenAI-compatible config, including GLM/BigModel-compatible endpoints:
mkdir -p ~/.config/sec-cli
cat > ~/.config/sec-cli/llm.json <<'JSON'
{
"provider": "openai",
"base_url": "https://open.bigmodel.cn/api/coding/paas/v4",
"model": "GLM-5.1",
"api_key_env": "BIGMODEL_API_KEY"
}
JSON
export BIGMODEL_API_KEY="your-api-key"
sec resolve --query 段永平 --pretty
sec resolve --manager "H&H International Investment LLC" --pretty
sec resolve --cik 1759760 --prettyAnthropic-compatible config:
{
"provider": "anthropic",
"base_url": "https://open.bigmodel.cn/api/anthropic",
"model": "GLM-5.1",
"api_key_env": "BIGMODEL_API_KEY"
}Environment overrides:
| Variable | Meaning |
|---|---|
SEC_CLI_LLM_CONFIG |
Override config file path |
SEC_CLI_LLM_PROVIDER |
openai or anthropic |
SEC_CLI_LLM_BASE_URL |
Provider base URL |
SEC_CLI_LLM_MODEL |
Model name |
SEC_CLI_LLM_API_KEY_ENV |
Name of the environment variable containing the API key |
SEC_CLI_LLM_API_KEY |
Direct API key fallback; prefer api_key_env for shells and repos |
Per-command overrides are also available:
sec resolve --query "Warren Buffett" \
--llm-provider openai \
--llm-base-url https://open.bigmodel.cn/api/coding/paas/v4 \
--llm-model GLM-5.1 \
--llm-api-key-env BIGMODEL_API_KEY \
--prettyDo not commit API keys. Keep local config files private and prefer environment variables for secrets.
Copy this block to build, configure GLM, run unit tests, and validate live SEC queries plus live LLM resolution. Replace the two exported values with your real identity and API key before running.
cd /Users/w0x7ce/Downloads/AACC/sec-cli
export SEC_IDENTITY="Your Name your.email@example.com"
export BIGMODEL_API_KEY="paste-your-bigmodel-key-here"
mkdir -p ~/.config/sec-cli
cat > ~/.config/sec-cli/llm.json <<'JSON'
{
"provider": "openai",
"base_url": "https://open.bigmodel.cn/api/coding/paas/v4",
"model": "GLM-5.1",
"api_key_env": "BIGMODEL_API_KEY"
}
JSON
cargo build
cargo test
cargo check
cargo run --bin sec -- filings --ticker AAPL --form 10-K --latest 1 --pretty
cargo run --bin sec -- facts --ticker AAPL --concept revenue --form 10-K --latest 3 --pretty
cargo run --bin sec -- statements --ticker AAPL --statement income --period annual --latest 2 --pretty
cargo run --bin sec -- statements --ticker AAPL --statement cashflow --period quarterly --latest 4 --jsonl
cargo run --bin sec -- ixbrl --ticker AAPL --form 10-K --concept RevenueFromContractWithCustomerExcludingAssessedTax --latest 1 --limit 3 --pretty
cargo run --bin sec -- xbrl-links --ticker AAPL --form 10-K --linkbase presentation --concept Revenue --limit 10 --pretty
cargo run --bin sec -- xbrl-tree --ticker AAPL --form 10-K --role OPERATIONS --limit 15 --pretty
cargo run --bin sec -- xbrl-calc --ticker AAPL --form 10-K --role OPERATIONS --limit 10 --pretty
cargo run --bin sec -- xbrl-statement --ticker AAPL --form 10-K --role OPERATIONS --values-only --limit 10 --pretty
cargo run --bin sec -- tables --ticker AAPL --form 10-K --latest 1 --limit-tables 3 --limit-rows 5 --pretty
cargo run --bin sec -- foreign --ticker TSM --form 20-F --latest 1 --limit-bytes 800 --pretty
cargo run --bin sec -- fund --cik 0000036405 --form NPORT-P --latest 1 --limit-holdings 5 --pretty
cargo run --bin sec -- form4-summary --ticker AAPL --latest 2 --pretty
cargo run --bin sec -- 8k --ticker AAPL --item 2.02 --latest 5 --limit-bytes 600 --pretty
cargo run --bin sec -- 13d --ticker TSLA --form 13g --latest 2 --include-amends --pretty
cargo run --bin sec -- resolve --query 段永平 --pretty
cargo run --bin sec -- resolve --manager "H&H International Investment LLC" --pretty
cargo run --bin sec -- resolve --cik 1759760 --pretty
cargo run --bin sec -- 13f-summary --investor 段永平 --latest 2 --pretty
cargo run --bin sec -- 13f-diff --manager "H&H International Investment LLC" --limit 10 --pretty
cargo run --bin sec -- 13f-diff --investor 段永平 --limit 10 --pretty
cargo run --bin sec -- report --investor 段永平 --kind portfolio --limit 10
cargo run --bin sec -- resolve --query 巴菲特 --pretty
cargo run --bin sec -- 13f-summary --investor 巴菲特 --latest 1 --pretty
cargo run --bin sec -- resolve --query Bridgewater --pretty
cargo run --bin sec -- report --investor Bridgewater --kind portfolio --limit 5Expected smoke-test signals:
cargo testshould pass all tests.resolve --query 段永平should end withvalidation.status = verified_13fand CIK1759760.resolve --manager "H&H International Investment LLC"andresolve --cik 1759760should return the same verified CIK without using the LLM.13f-diff --investor 段永平should show H&H International Investment, LLC and recent changes such as Apple, Tesla, Nvidia, Berkshire, and PDD.resolve --query 巴菲特should resolve to Berkshire Hathaway Inc, CIK1067983.
Find recent filings by ticker or CIK.
sec filings --ticker AAPL --form 10-K --latest 3 --pretty
sec filings --cik 320193 --form 10-Q --from 2023-01-01 --to 2025-12-31
sec filings --ticker TSLA --form 8-K --latest 5 --jsonl
sec filings --ticker NVDA --form 10-K --include-amends --latest 2 --prettyEach result includes:
accessioncikcompanyformfiling_dateprimary_documentsource_urltext_url
Scan the all-market SEC daily master index. This is the high-volume monitoring entry point: it starts from a SEC filing date and filters the whole daily feed, instead of starting from a single ticker.
sec daily --date 2026-05-15 --form 8-K --limit 50 --pretty
sec daily --date 2026-05-15 --form 13F-HR --include-amends --jsonl
sec daily --date 2026-05-15 --company apple --pretty
sec monitor --form 4 --limit 100 --jsonlIf --date is omitted, sec-cli uses the latest SEC weekday in UTC. Weekend
defaults roll back to Friday. Each record includes cik, company, form,
filing_date, accession, filename, text_url, and source_url.
Search the official SEC EDGAR Full-Text Search index across the whole market. Use this when you do not know which company filed the phrase, or when you want to scan a theme across many companies.
sec efts --query "supply chain risk" --form 10-K --from 2024-01-01 --to 2024-12-31 --limit 10 --pretty
sec efts --ticker AAPL --query "artificial intelligence" --form 10-K --limit 5 --pretty
sec efts --cik 320193 --query "services revenue" --form 10-K,10-Q --from 2023-01-01 --pretty
sec full-text --query "GLP-1" --form 10-K --limit 20 --jsonl--ticker and --cik are optional. Without them, the search is all-market.
--form accepts one form or comma-separated forms. Output includes score,
cik, company, form, file_date, period_ending, accession, document,
source_url, and document_url.
Query SEC CompanyFacts by concept alias or XBRL concept name. Common aliases
such as revenue, cogs, grossprofit, rd, sga, cash,
receivables, currentdebt, ocf, and capex map to a 100+ concept
US-GAAP candidate catalog.
sec facts --ticker AAPL --concept revenue --form 10-K --latest 5 --pretty
sec facts --ticker MSFT --concept us-gaap:NetIncomeLoss --latest 10 --jsonl
sec facts --cik 320193 --concept us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax --unit USD --latest 8 --prettyEach fact includes:
conceptlabelvalueunitfyfpformfiledstartendaccessionsource_urlfact_id
Build standardized 10-K/10-Q financial statement rows from SEC CompanyFacts. This is a normalized long table, not a rendered spreadsheet: every row is one statement line, period, concept, unit, and source filing.
sec statements --ticker AAPL --statement income --period annual --latest 4 --pretty
sec statements --ticker AAPL --statement balance --period annual --latest 2 --pretty
sec statements --ticker AAPL --statement cashflow --period quarterly --latest 4 --jsonl
sec statements --cik 320193 --statement all --period annual --latest 1 --pretty--statement accepts:
income: revenue, cost of revenue, gross profit, R&D, SG&A, operating income, interest, tax, net income, EPS, sharesbalance: cash, securities, receivables, inventory, current assets, PP&E, goodwill, intangibles, leases, debt, liabilities, equitycashflow: net income, D&A, stock compensation, working-capital changes, operating cash flow, capex, acquisitions, dividends, repurchases, debt issuance/repayment, cash changeall: income, balance, and cashflow together
--period accepts:
annual: 10-K factsquarterly: 10-Q factsall: any available filing form
Each row includes:
cikcompanystatementline_orderline_itemconcepttaxonomylabelvaluenumeric_valueunitfiscal_yearfiscal_periodformfiledstartendframeaccessionsource_urlfact_id
Build a de-duplicated 10-K / 10-Q CompanyFacts time series from standardized
statement rows. It groups rows by statement line and period end, prefers 10-K
FY rows for annual periods, keeps 10-Q rows for quarterly periods, and exposes
duplicate_forms plus source_count so agents can see when multiple facts fed
the same stitched period.
sec stitch --ticker AAPL --statement income --latest 8 --pretty
sec stitch --ticker AAPL --statement all --latest 6 --jsonl
sec statement-stitch --cik 320193 --statement cashflow --latest 10 --output tableEach row includes: statement, line_item, period_kind, form,
fiscal_period, value, numeric_value, duplicate_forms, source_count,
accession, source_url, and fact_id.
Calculate source-backed financial metrics from standardized CompanyFacts
statement rows. This is the first secondary-analysis layer: every metric keeps
the SEC facts used in components, including accession, fact id, and source
URL.
sec metrics --ticker AAPL --period annual --latest 4 --pretty
sec metrics --ticker AAPL --period quarterly --latest 8 --jsonl
sec metrics --cik 320193 --period annual --latest 1 --pretty--period accepts:
annual: derive metrics from 10-K factsquarterly: derive metrics from 10-Q factsall: use any available filing form
Metrics currently include 50+ SEC-derived records when the required facts are available:
- profitability:
gross_margin,operating_margin,net_margin,cost_of_revenue_margin,pretax_margin - profitability/tax:
effective_tax_rate - growth:
revenue_growth,net_income_growth - expense intensity:
rd_to_revenue,sga_to_revenue,operating_expense_ratio - cash flow:
free_cash_flow,free_cash_flow_margin,operating_cash_flow_margin,cash_conversion,free_cash_flow_to_net_income - returns:
return_on_assets,return_on_equity,roic,cash_flow_return_on_assets - liquidity:
working_capital,current_ratio,quick_ratio,cash_ratio,cash_to_assets,cash_and_securities_to_assets,cash_and_securities_coverage - leverage/solvency:
total_debt,net_debt,liabilities_to_assets,debt_to_equity,debt_to_assets,net_debt_to_equity,debt_to_capital,cash_flow_to_debt,fcf_to_debt,interest_coverage - efficiency:
asset_turnover,inventory_turnover,receivables_turnover,inventory_to_current_assets,receivables_to_revenue - asset quality:
goodwill_to_assets,intangibles_to_assets,marketable_securities_to_assets - capital intensity/return:
capex_to_revenue,capex_to_operating_cash_flow,dividend_payout_ratio,share_repurchases_to_revenue,share_repurchases_to_free_cash_flow
Each metric includes: metric, category, value, display_value, unit,
period_end, fiscal_year, fiscal_period, form, calculation,
components, and source_urls.
Calculate SEC-derived financial-health scores from the same standardized CompanyFacts statement rows and metrics. The command emits one record per score and keeps the underlying signal list so agents can explain the result.
sec scores --ticker AAPL --period annual --latest 1 --pretty
sec scores --ticker MSFT --period annual --latest 3 --jsonl
sec scores --cik 320193 --period annual --latest 1 --output tableImplemented scores:
piotroski_f_score: 9 binary quality signals for profitability, accruals, leverage/liquidity, dilution, margin, and turnover.altman_z_score_private: Altman Z'' approximation using book equity, designed for SEC-only data without market cap.beneish_m_score: Beneish M-Score approximation using SEC-derived ratios;watchmeans the score is above-1.78.
Each score includes: score_name, score, max_score, rating,
period_end, calculation, signals, and source_urls. Missing components
produce insufficient_data or null signal values instead of silently inventing
inputs.
Write structured query records to Arrow IPC or Parquet files for DuckDB, Polars, Spark, pandas, and data pipelines. The export command runs the same SEC queries as the interactive CLI, then flattens each record into a stable column set. Nested fields such as metric components or score signals are preserved as JSON strings so source provenance is not lost.
sec export --kind filings --ticker AAPL --form 10-K --latest 5 --format parquet --out data/aapl_10k.parquet
sec export --kind facts --ticker AAPL --concept revenue --latest 20 --format arrow --out data/aapl_revenue.arrow
sec export --kind statements --ticker AAPL --statement income --period annual --latest 4 --format parquet --out data/aapl_income.parquet
sec export --kind stitch --ticker AAPL --statement all --latest 8 --format parquet --out data/aapl_stitch.parquet
sec export --kind metrics --ticker AAPL --period annual --latest 4 --format parquet --out data/aapl_metrics.parquet
sec export --kind scores --ticker AAPL --period annual --latest 1 --format arrow --out data/aapl_scores.arrowSupported --kind values: filings, facts, statements, stitch,
metrics, and scores. --kind facts requires --concept. --format
accepts arrow or parquet. The command creates parent directories
automatically and prints the record count to stderr.
Download complete SEC submission documents into an offline directory. This is
useful before a long agent run, CI job, or airplane-mode analysis session: the
archive contains document files plus manifest.json at the archive root and
filing.json inside each accession directory.
sec archive --ticker AAPL --form 10-K --latest 2 --primary-only --out-dir ./archives/aapl --pretty
sec archive --cik 320193 --form 8-K --latest 5 --include-amends --out-dir ./archives/aapl_8k --jsonl
sec archive --ticker MSFT --form 10-Q --latest 4 --limit-bytes 2000000 --out-dir ./archives/msft_10qImportant options:
--primary-only: save only the primary sequence 1 document for each filing.--limit-bytes: cap each saved document on a UTF-8 boundary.--include-amends: include amended forms such as10-K/A.
The returned manifest includes filing_count, document_count, manifest_path,
per-filing source URLs, and per-document local paths.
Build a compact, source-backed research packet for an LLM agent or local automation. The packet combines recent filings, selected 10-K/10-Q sections, SEC-derived metrics, financial-health scores, deduplicated source URLs, and suggested next commands.
sec agent-pack --ticker AAPL --sections risk-factors,mda --metrics-latest 4 --pretty
sec pack --cik 320193 --form 10-K --latest 1 --sections business,risk-factors,mda --section-limit-bytes 15000 --output jsonDefault sections are risk-factors,mda. Use this command when the agent needs a
single JSON object that is broad enough for first-pass analysis but still
grounded in exact SEC filing URLs and facts.
Stream Inline XBRL facts directly from the primary filing HTML. This is useful when you need the exact facts embedded in a specific 10-K/10-Q document rather than SEC's normalized CompanyFacts API.
sec ixbrl --ticker AAPL --form 10-K --concept RevenueFromContractWithCustomerExcludingAssessedTax --latest 1 --limit 3 --pretty
sec ixbrl --ticker AAPL --form 10-K --concept us-gaap:NetIncomeLoss --limit 5 --jsonl
sec ixbrl --cik 320193 --form 10-Q --latest 1 --limit 100 --pretty--concept accepts either a full concept such as us-gaap:NetIncomeLoss or a
local concept name such as NetIncomeLoss.
Each fact includes:
accessionfact_typenamenamespacelocal_namecontext_refunit_refdecimalsscaleformatsignidraw_valuevaluenumeric_valuedocument_urlsource_url
Parse XBRL linkbase attachments from complete SEC submissions. This command is the low-level foundation for true filing-specific financial statement rendering: it exposes the presentation tree, calculation weights, definition arcs, labels, and schema elements that are not available in SEC CompanyFacts JSON.
sec xbrl-links --ticker AAPL --form 10-K --linkbase presentation --concept Revenue --limit 20 --pretty
sec xbrl-links --ticker AAPL --form 10-K --linkbase calculation --concept NetIncomeLoss --pretty
sec linkbase --cik 320193 --form 10-Q --linkbase label --concept Revenue --jsonl--linkbase accepts presentation, calculation, definition, label, or
schema. --concept matches parent, child, or label concepts and accepts either
us-gaap:Revenues style names or local names such as Revenues.
Each relationship includes: linkbase, relationship, role, arcrole,
parent_concept, child_concept, concept, label, label_role, order,
weight, preferred_label, document_url, and source_url.
Render filing-specific XBRL presentation arcs into preorder tree rows. This is
the human- and agent-friendly view of EX-101.PRE: each row has a depth,
line_order, path, parent concept, role URI, and source document URL. Use
xbrl-statement when you also want same-filing fact values.
sec xbrl-tree --ticker AAPL --form 10-K --role OPERATIONS --limit 30 --pretty
sec xbrl-tree --ticker AAPL --form 10-K --concept NetIncomeLoss --pretty
sec presentation-tree --cik 320193 --form 10-Q --limit 50 --jsonl--role is a case-insensitive substring filter over role URIs, so short terms
such as OPERATIONS, BALANCE, CASH, or Revenue are usually enough.
Each row includes: role, depth, line_order, concept, label,
parent_concept, order, preferred_label, path, document_url, and
source_url.
Validate XBRL calculation linkbase parent totals against same-accession
CompanyFacts values. It groups EX-101.CAL arcs by role and parent concept,
applies each child weight, and reports whether the SEC fact value matches the
calculated total within --tolerance.
sec xbrl-calc --ticker AAPL --form 10-K --role OPERATIONS --limit 20 --pretty
sec xbrl-calc --ticker AAPL --form 10-K --concept GrossProfit --tolerance 1 --pretty
sec calculation-checks --cik 320193 --form 10-Q --unit USD --limit 50 --jsonlEach check includes: parent_concept, parent_value, calculated_value,
difference, relative_difference, status, children_count,
matched_children, missing_children, document_url, and source_url.
Render filing-specific presentation-tree rows with same-accession CompanyFacts
values and calculation-check status. This is the closest CLI view to a true
SEC-native financial statement: EX-101.PRE controls row order and hierarchy,
CompanyFacts supplies values, CompanyFacts labels fill missing extension labels,
and EX-101.CAL adds calculation_status for totals.
sec xbrl-statement --ticker AAPL --form 10-K --role OPERATIONS --values-only --limit 30 --pretty
sec xbrl-statement --ticker AAPL --form 10-K --role BALANCE --unit USD --limit 50 --pretty
sec statement-render --cik 320193 --form 10-Q --concept NetIncomeLoss --jsonlUseful flags:
--role: filters role URIs by substring, such asOPERATIONS,BALANCE, orCASH.--values-only: hides abstract/heading rows and returns only rows with matched facts.--unit: selects the CompanyFacts unit, usuallyUSDorshares.--tolerance: controls calculation-check tolerance for total rows.
Each row includes: role, depth, line_order, concept, label, value,
numeric_value, unit, fact_id, calculation_status,
calculation_difference, calculation_relative_difference, path,
document_url, and source_url.
Extract HTML tables from primary filing documents. This is intentionally generic: the command returns rows and source metadata so agents can inspect compensation, segment, debt, registration, exhibit, or contract tables without bespoke parsing for every table type.
sec tables --ticker AAPL --form 10-K --latest 1 --limit-tables 5 --limit-rows 10 --pretty
sec tables --ticker TSLA --form DEF 14A --include-amends --limit-tables 20 --limit-rows 8 --jsonl
sec tables --cik 320193 --form 10-Q --latest 1 --limit-tables 10 --prettyEach table includes:
table_indextitle_hintrow_countcolumn_countreturned_rowstruncatedheadersrowsdocument_urlsource_url
Parse high-value 10-K/10-Q topic tables from the primary company report. This is
more opinionated than tables: it classifies likely segment revenue,
geographic revenue, revenue disaggregation, debt maturity, contractual
obligations, lease maturity, tax, and share repurchase tables.
sec company-report --ticker AAPL --form 10-K --latest 1 --pretty
sec company-report --ticker AAPL --form 10-K --topic segment --limit-tables 5 --limit-rows 12 --pretty
sec company-report --cik 320193 --form 10-Q --topic debt --jsonl
sec parse --ticker AAPL --form 10-K --limit 5 --prettyEach record includes matched_table_count, scanned_table_count, and
topics[] with topic, confidence, title_hint, headers, rows, and SEC
source fields.
Parse DEF 14A proxy statements. This command turns shareholder-meeting materials into one structured record per filing: meeting logistics, voting proposals, board recommendations, director nominees, auditor, named executive officers, and the summary compensation table.
sec proxy --ticker AAPL --latest 1 --pretty
sec proxy --cik 320193 --latest 2 --include-amends --limit-rows 20 --pretty
sec parse --ticker AAPL --form "DEF 14A" --latest 1 --prettyEach proxy record includes:
meeting_datemeeting_timemeeting_siterecord_datematerials_available_dateproposalsdirector_nomineesauditornamed_executive_officerssummary_compensation_tabledocument_urlsource_url
Parse S-1, F-1, and 424B prospectus filings. This command extracts capital markets signals that are useful for IPO and offering analysis: offered securities, IPO/prospectus type, proposed ticker, exchange, price range, shares, offering amount, underwriters, auditor, selected tables, and source-backed excerpts for use of proceeds, risk factors, business, and dilution.
sec prospectus --ticker RDDT --form S-1 --include-amends --latest 1 --pretty
sec prospectus --cik 1713445 --form all --latest 3 --limit-bytes 800 --limit-tables 5 --pretty
sec parse --ticker RDDT --form "424B4" --latest 1 --pretty--form accepts all, S-1, S-1/A, F-1, F-1/A, 424B, 424B1
through 424B5, plus 424B7. Use --include-amends when you want amended
registration statements such as S-1/A.
Each prospectus record includes:
prospectus_typeis_ipo_relatedsecurities_offeredproposed_tickerexchangeprice_rangeshares_offeredoffering_amountunderwritersauditoruse_of_proceedsrisk_factorsbusinessdilutiontablesdocument_urlsource_url
Parse 20-F, 6-K, and 40-F foreign issuer disclosures. This command is for ADRs and foreign private issuers such as TSM, BABA, ASML, SHOP, or SONY. It extracts the report type, exchange/symbol clues, auditor names, current-report event signals, and source-backed excerpts for risk factors, business, operating review, controls, and financial statements.
sec foreign --ticker TSM --form 20-F --latest 1 --pretty
sec foreign --ticker BABA --form 6-K --latest 3 --limit-bytes 800 --pretty
sec foreign --ticker SHOP --form 40-F --latest 1 --pretty
sec foreign --cik 1046179 --form all --latest 5 --include-amends --jsonl
sec parse --ticker TSM --form "20-F" --latest 1 --pretty
sec parse --ticker BABA --form "6-K" --latest 1 --pretty--form accepts all, 20-F, 20-F/A, 6-K, 6-K/A, 40-F, and
40-F/A. Use --include-amends when amended foreign annual reports or current
reports matter.
Each foreign issuer record includes:
report_typeis_amendmentexchangeticker_or_symbolauditorevent_signalsrisk_factorsbusinessoperating_reviewcontrolsfinancial_statementsdocument_urlsource_url
Parse N-PORT, N-CSR/N-CSRS, N-CEN, N-PX, 497K, and 24F-2NT fund disclosures.
NPORT-P is the most structured holdings source: it contains portfolio holdings,
security identifiers, values, portfolio percentages, asset categories, issuer
categories, country, and restricted-security flags. N-PX exposes proxy voting
records, 497K is a summary prospectus, 24F-2NT is an annual notice of
securities sold, N-CSR/N-CSRS are shareholder reports, and N-CEN is the
annual fund census.
sec fund --cik 0000036405 --form NPORT-P --latest 1 --limit-holdings 10 --pretty
sec fund --cik 0000036405 --form N-PX --latest 1 --limit-holdings 20 --pretty
sec fund --cik 0000036405 --form 497K --latest 1 --limit-bytes 1200 --pretty
sec fund --cik 0000036405 --form 24F-2NT --latest 1 --pretty
sec fund --cik 0000036405 --form N-CSR --latest 1 --limit-bytes 1200 --pretty
sec fund --cik 0000036405 --form N-CEN --latest 1 --pretty
sec fund --cik 0000036405 --form all --latest 5 --include-amends --jsonl
sec parse --cik 0000036405 --form "NPORT-P" --latest 1 --limit 10 --pretty--form accepts all, NPORT-P, NPORT-P/A, N-PORT, N-PORT/A,
N-CSR, N-CSR/A, N-CSRS, N-CSRS/A, N-CEN, N-CEN/A, N-PX,
N-PX/A, 497K, 497K/A, 24F-2NT, and 24F-2NT/A. Use
--limit-holdings to cap the returned N-PORT holdings or N-PX proxy-vote array.
Each fund disclosure record includes:
disclosure_typeregistrant_nameseries_nameclass_nameperiod_endfiscal_year_endtotal_assetstotal_liabilitiesnet_assetsholdings_countholdingsproxy_votes_countproxy_votesshareholder_reportportfolio_summaryproxy_voting_recordsummary_prospectusregistration_fee_noticefinancial_statementscontrolsdocument_urlsource_url
Search filing submission text and return source-backed snippets.
sec search --ticker TSLA --form 10-K --query "risk factors" --latest 1 --pretty
sec search --ticker NVDA --form 10-K --query "export controls" --jsonl
sec search --cik 320193 --form 10-K --query "supply chain" --context 300 --latest 2 --prettySearch first tries an exact case-insensitive phrase match, then falls back to a token-window match so agent queries are more robust against SEC HTML markup.
Extract common sections from the primary 10-K or 10-Q document. The extractor normalizes HTML/XBRL markup to text, locates item headings, chooses the largest matching body over table-of-contents hits, and returns source-backed JSON.
sec section --ticker AAPL --form 10-K --item risk-factors --limit-bytes 8000 --pretty
sec section --ticker MSFT --form 10-K --item mda --latest 1 --pretty
sec section --cik 320193 --form 10-K --item 1A --latest 1 --jsonl
sec section --ticker TSLA --form 10-Q --item market-risk --limit-bytes 6000 --prettySupported item aliases include:
business/1risk-factors/1Acybersecurity/1Cproperties/2legal-proceedings/3mda/7market-risk/7Afinancial-statements/8
Each section includes:
accessionitemtitlestart_offsetend_offsetbyte_lengthreturned_bytestruncateddocument_urlsource_urlcontent
Generate a source-backed Markdown report for a human analyst or an AI agent. Reports reuse the same structured parsers used by the JSON commands.
sec report --ticker AAPL --kind insider --latest 5 --limit 10
sec report --investor 段永平 --kind portfolio --limit 10
sec report --manager "H&H International Investment LLC" --kind portfolio --limit 10
sec report --cik 1067983 --kind portfolio --limit 10
sec report --ticker AAPL --kind financial --latest 4 --limit 20
sec report --ticker AAPL --kind risk --limit-bytes 4000
sec report --ticker AAPL --kind risk --latest 1 --limit-bytes 12000 > aapl-risk.mdReport kinds:
financial: SEC-derived metric table, multi-period trend snapshot, and rule-based signalsinsider: Form 4 summary table with owner, role, net shares, value, and SEC sourceportfolio: 13F summary, top holdings, visual bars, and largest position changesrisk: 10-K risk factor and MD&A excerpts with source links
Resolve an investor, fund, public person, known manager, or CIK to SEC 13F
filing manager candidates. Standard selectors are deterministic; natural
language --query can use the LLM and is always checked against SEC data when
verification is enabled.
sec resolve --query 段永平 --pretty
sec resolve --manager "H&H International Investment LLC" --pretty
sec resolve --cik 1759760 --pretty
sec resolve --query "Warren Buffett" --pretty
sec resolve --query Bridgewater --pretty
sec resolve --query "Seth Klarman" --no-verify --pretty
sec resolve --query 段永平 --llm-provider openai --llm-model GLM-5.1 --prettyEach candidate includes:
querycandidate_typeinvestormanagercikconfidencerelationshipevidence_queriesnotesvalidationnext_commands
validation.status is verified_13f only when the candidate has a SEC
13F-HR filing. Commands such as sec 13f-diff --investor <NAME> require a
verified 13F candidate.
List documents and attachments inside complete SEC submissions.
sec docs --ticker AAPL --form 10-K --latest 1 --limit 20 --pretty
sec docs --cik 320193 --form 8-K --latest 2 --limit 50 --jsonlEach document includes:
accessiondocument_typesequencefilenamedescriptioncontent_typebyte_lengthis_primarydocument_urlsource_url
Read one document from a complete submission. By default, sec doc returns one
JSON record with source metadata and content. Use --raw for exact extracted
document content or --text for compact plain text.
sec doc --ticker AAPL --form 10-K --primary --limit-bytes 4000 --pretty
sec doc --ticker AAPL --form 10-K --sequence 1 --text --limit-bytes 12000
sec doc --cik 320193 --accession 0000320193-25-000079 --filename aapl-20250927.htm --raw
sec doc --ticker AAPL --form 10-K --filename a10-kexhibit21109272025.htm --limit-bytes 4000 --prettySelectors:
--primaryselects sequence1--sequence 2selects a document by SEC sequence--filename form4.xmlselects a document by filename--accessionnarrows the filing set to one accession--limit-bytesreturns a UTF-8-safe prefix and setstruncated
Each JSON record includes:
accessiondocument_typesequencefilenamecontent_typebyte_lengthreturned_bytestruncateddocument_urlsource_urlcontent
Parse Form 4 ownership transactions.
sec form4 --ticker AAPL --latest 3 --limit 10 --pretty
sec form4 --cik 320193 --latest 10 --jsonl
sec form4-summary --ticker TSLA --include-amends --latest 5 --prettyEach transaction includes:
accessionissuerissuer_tickerreporting_ownerofficer_titletransaction_datetransaction_form_typetransaction_codeequity_swap_involvedtransaction_typesecurity_titlesharespricevalueshares_owned_afterdirect_or_indirectnature_of_ownershipderivativeconversion_or_exercise_priceexercise_dateexpiration_dateunderlying_security_titleunderlying_sharessource_url
Summarize each Form 4 ownership report before drilling into transaction rows. This is useful for agents that need a compact, source-backed answer about who filed, whether activity was net acquisition or disposition, and which footnotes or signatures are present.
sec form4-summary --ticker AAPL --latest 3 --limit 10 --pretty
sec form4-summary --cik 320193 --include-amends --jsonlEach report summary includes:
accessionperiod_of_reportissuerissuer_tickerownerssignaturesfootnotestransaction_countacquisition_countdisposition_countderivative_transaction_counttotal_shares_acquiredtotal_shares_disposednet_sharestotal_valuesource_url
Parse Form 8-K current-report event items from the primary document. This turns the usual free-form 8-K HTML into event records with official item labels and source-backed excerpts.
sec 8k --ticker AAPL --latest 5 --pretty
sec 8k --ticker AAPL --item 2.02 --latest 5 --limit-bytes 600 --pretty
sec 8k --ticker TSLA --item 5.02 --latest 10 --jsonl
sec 8k --cik 320193 --item 9.01 --include-amends --pretty
sec 8k-exhibits --ticker AAPL --category earnings_release --latest 5 --limit-bytes 1200 --pretty
sec 8k-exhibits --ticker MSFT --category material_contract --latest 10 --jsonlCommon item filters:
1.01: material agreement2.02: results of operations and financial condition4.02: non-reliance on previously issued financial statements5.02: director/officer departure, appointment, or compensation7.01: Regulation FD disclosure8.01: other events9.01: financial statements and exhibits
8k-exhibits categories include earnings_release, press_release,
material_contract, transaction_agreement, charter_or_bylaws,
security_instrument, accountant_letter, xbrl, and other_exhibit.
Each event includes:
accessionitemitem_titlecategoryis_furnished_itemstart_offsetend_offsetbyte_lengthreturned_bytestruncateddocumentdocument_urlsource_urlcontent
Parse Schedule 13D and Schedule 13G beneficial ownership reports. These filings
show investors or groups that report more than 5% ownership of a public company.
13D usually signals possible influence or activist intent; 13G is usually
passive or exempt ownership reporting.
sec 13d --ticker TSLA --form 13g --latest 2 --include-amends --pretty
sec 13g --ticker TSLA --latest 5 --include-amends --jsonl
sec schedule13 --cik 1318605 --form all --latest 5 --include-amends --pretty
sec parse --ticker TSLA --form "SC 13G" --latest 1 --include-amends --pretty--form accepts 13d, 13g, SC 13D, SC 13G, SC 13D/A, SC 13G/A,
or all. Use --include-amends when you want the current amended ownership
picture, which is usually what analysts want.
Each report includes:
accessionformfiling_typeis_amendmentactivist_intentissuer_namesecurity_titlecusipevent_datereporting_personsfiling_rulebeneficially_owned_sharespercent_of_classsole_voting_powershared_voting_powersole_dispositive_powershared_dispositive_powerpurpose_of_transactionownership_summarysignaturesdocument_urlsource_url
Parse 13F-HR information-table holdings. Values include both the SEC-reported number and a normalized USD value because older 13F filings reported values in thousands while modern XML filings report dollars.
sec 13f --cik 1067983 --latest 1 --limit 20 --pretty
sec 13f --ticker BRK-B --limit 50 --jsonl
sec 13f --manager "H&H International Investment LLC" --latest 1 --limit 20 --prettyEach holding includes:
accessionmanagerreport_dateissuerclasscusipvalue_reportedvalue_scalevalue_usdsharesinvestment_discretionvoting_solevoting_sharedvoting_nonesource_url
Aggregate 13F information-table rows by accession, CUSIP, class, and put/call. This is usually the portfolio view analysts want when a consolidated 13F filing contains multiple included managers.
sec 13f-aggregate --cik 1067983 --latest 1 --limit 20 --pretty
sec 13f-aggregate --ticker BRK-B --latest 4 --jsonl
sec 13f-aggregate --investor "Warren Buffett" --latest 1 --limit 20 --prettyEach aggregate holding includes:
issuerclasscusipput_callvalue_reportedvalue_scalevalue_usdsharesvoting_solevoting_sharedvoting_nonerowssource_url
Compare the latest two 13F-HR portfolios after aggregation. This classifies
positions by share-count movement as new, increased, reduced,
unchanged, or exited, and sorts by the absolute USD value change.
sec 13f-diff --cik 1067983 --limit 20 --pretty
sec 13f-diff --manager "H&H International Investment LLC" --limit 20 --pretty
sec 13f-diff --investor 段永平 --pretty
sec 13f-diff --ticker BRK-B --jsonlEach diff row includes:
current_accessionprevious_accessioncurrent_report_dateprevious_report_dateissuerclasscusipput_callchange_typecurrent_value_usdprevious_value_usdchange_value_usdcurrent_sharesprevious_shareschange_sharescurrent_source_urlprevious_source_url
Parse the 13F primary document: report metadata, summary totals, signature, and included manager information.
sec 13f-summary --cik 1067983 --latest 1 --pretty
sec 13f-summary --ticker BRK-B --latest 4 --jsonl
sec 13f-summary --manager "H&H International Investment LLC" --latest 2 --prettyEach report summary includes:
accessionmanagerreport_datereport_typetotal_holdings_reportedtotal_value_reportedvalue_scaletotal_value_usdfiling_manager_namesignature_nameother_managerssource_url
Use the unified parser pipeline for supported forms. This is the interface most HTTP/MCP adapters and future batch/export jobs should call internally.
sec parse --ticker AAPL --form 4 --latest 1 --limit 5 --pretty
sec parse --cik 1067983 --form 13F-HR --latest 1 --limit 20 --jsonlEach record is wrapped with a stable kind, such as form4_transaction or
thirteenf_holding.
List supported structured parser families.
sec forms --prettyRun a local JSON HTTP API for apps, dashboards, and local agents. The server uses
the same SecClient, cache, parsers, and source-backed records as the CLI.
SEC_IDENTITY="Your Name your.email@example.com" sec serve --host 127.0.0.1 --port 8716
curl "http://127.0.0.1:8716/health"
curl "http://127.0.0.1:8716/v1/forms"
curl "http://127.0.0.1:8716/v1/filings?ticker=AAPL&form=10-K&latest=1"
curl "http://127.0.0.1:8716/v1/daily?date=2026-05-15&form=8-K&limit=50"
curl "http://127.0.0.1:8716/v1/efts?query=supply%20chain%20risk&form=10-K&from=2024-01-01&to=2024-12-31&limit=10"
curl "http://127.0.0.1:8716/v1/facts?ticker=AAPL&concept=revenue&latest=3"
curl "http://127.0.0.1:8716/v1/statements?ticker=AAPL&statement=income&period=annual&latest=2"
curl "http://127.0.0.1:8716/v1/stitch?ticker=AAPL&statement=income&latest=8"
curl "http://127.0.0.1:8716/v1/metrics?ticker=AAPL&period=annual&latest=4"
curl "http://127.0.0.1:8716/v1/scores?ticker=AAPL&period=annual&latest=1"
curl "http://127.0.0.1:8716/v1/agent-pack?ticker=AAPL§ions=risk-factors,mda&metrics_latest=4"
curl "http://127.0.0.1:8716/v1/company-report?ticker=AAPL&form=10-K&topic=segment"
curl "http://127.0.0.1:8716/v1/8k?ticker=AAPL&item=2.02&latest=5&limit_bytes=600"
curl "http://127.0.0.1:8716/v1/8k-exhibits?ticker=AAPL&category=earnings_release&latest=5"
curl "http://127.0.0.1:8716/v1/13f?cik=1067983&latest=1&limit=20"
curl "http://127.0.0.1:8716/v1/proxy?ticker=AAPL&latest=1"
curl "http://127.0.0.1:8716/v1/prospectus?ticker=RDDT&form=S-1&include_amends=true"
curl "http://127.0.0.1:8716/v1/foreign?ticker=TSM&form=20-F&latest=1"
curl "http://127.0.0.1:8716/v1/fund?cik=0000036405&form=NPORT-P&limit_holdings=10"
curl "http://127.0.0.1:8716/v1/parse?ticker=AAPL&form=4&latest=1&limit=5"Available endpoints:
| Endpoint | Equivalent CLI |
|---|---|
/health |
health check |
/v1/forms |
sec forms |
/v1/filings |
sec filings |
/v1/daily |
sec daily |
/v1/efts |
sec efts |
/v1/facts |
sec facts |
/v1/statements |
sec statements |
/v1/stitch |
sec stitch |
/v1/metrics |
sec metrics |
/v1/scores |
sec scores |
/v1/agent-pack |
sec agent-pack |
/v1/company-report |
sec company-report |
/v1/ixbrl |
sec ixbrl |
/v1/sections |
sec section |
/v1/docs |
sec docs |
/v1/form4, /v1/form4-summary |
sec form4, sec form4-summary |
/v1/8k |
sec 8k |
/v1/8k-exhibits |
sec 8k-exhibits |
/v1/schedule13 |
sec 13d / sec 13g |
/v1/13f, /v1/13f-summary, /v1/13f-diff |
sec 13f, sec 13f-summary, sec 13f-diff |
/v1/proxy |
sec proxy |
/v1/prospectus |
sec prospectus |
/v1/foreign |
sec foreign |
/v1/fund |
sec fund |
/v1/parse |
sec parse |
Run a stdio Model Context Protocol adapter for MCP-capable agents. The adapter uses JSON-RPC over stdin/stdout and exposes source-backed SEC tools without requiring an HTTP server.
sec config set-identity "Your Name your.email@example.com"
sec mcpAvailable MCP tools:
| Tool | What it calls |
|---|---|
sec_forms |
parser registry |
sec_filings |
sec filings equivalent |
sec_daily |
sec daily all-market index scan |
sec_efts |
sec efts SEC full-text search |
sec_facts |
sec facts equivalent |
sec_statements |
sec statements equivalent |
sec_stitch |
sec stitch equivalent |
sec_metrics |
sec metrics equivalent |
sec_scores |
sec scores equivalent |
sec_agent_pack |
sec agent-pack equivalent |
sec_ixbrl |
sec ixbrl equivalent |
sec_tables |
sec tables equivalent |
sec_company_report |
sec company-report equivalent |
sec_proxy |
sec proxy equivalent |
sec_prospectus |
sec prospectus equivalent |
sec_foreign |
sec foreign equivalent |
sec_fund |
sec fund equivalent |
sec_search |
sec search equivalent |
sec_section |
sec section equivalent |
sec_docs |
sec docs equivalent |
sec_doc |
sec doc equivalent |
sec_form4 |
sec form4 equivalent |
sec_form4_summary |
sec form4-summary equivalent |
sec_8k |
sec 8k equivalent |
sec_8k_exhibits |
sec 8k-exhibits equivalent |
sec_schedule13 |
sec 13d / sec 13g equivalent |
sec_13f |
sec 13f equivalent |
sec_13f_aggregate |
sec 13f-aggregate equivalent |
sec_13f_diff |
sec 13f-diff equivalent for CIK/ticker selectors |
sec_13f_summary |
sec 13f-summary equivalent |
sec_report |
Markdown reports for insider, portfolio, and risk |
sec_parse |
unified parser pipeline for supported forms |
Example MCP tool arguments:
{
"name": "sec_filings",
"arguments": {
"ticker": "AAPL",
"form": "10-K",
"latest": 1
}
}Global options:
| Option | Meaning |
|---|---|
--identity <TEXT> |
SEC request identity / user agent. Required unless local config, SEC_IDENTITY, or EDGAR_IDENTITY is set. |
--cache-dir <PATH> |
Override the local response cache directory. |
--output <MODE> |
Override structured output globally: json, pretty, jsonl, csv, or table. |
Command options:
| Command | Required selector | Important options |
|---|---|---|
filings |
--ticker or --cik |
--form, --latest, --from, --to, --include-amends, --jsonl, --pretty |
daily / monitor |
none | --date, --form, --company, --limit, --include-amends, --jsonl, --pretty |
efts / full-text / global-search |
--query |
--ticker, --cik, --form, --from, --to, --limit, --jsonl, --pretty |
facts |
--ticker or --cik, --concept |
--form, --unit, --latest, --jsonl, --pretty |
statements |
--ticker or --cik |
--statement, --period, --unit, --latest, --jsonl, --pretty |
stitch / statement-stitch |
--ticker or --cik |
--statement, --unit, --latest, --jsonl, --pretty |
metrics |
--ticker or --cik |
--period, --unit, --latest, --jsonl, --pretty |
scores |
--ticker or --cik |
--period, --unit, --latest, --jsonl, --pretty |
export |
--ticker or --cik, --kind, --format, --out |
--concept, --form, --statement, --period, --unit, --latest, --include-amends |
archive |
--ticker or --cik, --out-dir |
--form, --latest, --include-amends, --primary-only, --limit-bytes, --jsonl, --pretty |
agent-pack / pack |
--ticker or --cik |
--form, --latest, --sections, --section-limit-bytes, --metrics-latest, --jsonl, --pretty |
company-report |
--ticker or --cik |
--form, --topic, --latest, --limit-tables, --limit-rows, --include-amends, --jsonl, --pretty |
ixbrl |
--ticker or --cik |
--form, --concept, --latest, --limit, --include-amends, --jsonl, --pretty |
xbrl-links / linkbase |
--ticker or --cik |
--form, --linkbase, --role, --concept, --latest, --limit, --include-amends, --jsonl, --pretty |
xbrl-tree / presentation-tree |
--ticker or --cik |
--form, --role, --concept, --latest, --limit, --include-amends, --jsonl, --pretty |
xbrl-calc / calculation-checks |
--ticker or --cik |
--form, --role, --concept, --unit, --tolerance, --latest, --limit, --include-amends, --jsonl, --pretty |
xbrl-statement / statement-render |
--ticker or --cik |
--form, --role, --concept, --unit, --tolerance, --values-only, --latest, --limit, --include-amends, --jsonl, --pretty |
tables |
--ticker or --cik |
--form, --latest, --limit-tables, --limit-rows, --include-amends, --jsonl, --pretty |
proxy |
--ticker or --cik |
--latest, --limit-rows, --include-amends, --jsonl, --pretty |
prospectus |
--ticker or --cik |
--form, --latest, --limit-bytes, --limit-tables, --limit-rows, --include-amends, --jsonl, --pretty |
foreign |
--ticker or --cik |
--form, --latest, --limit-bytes, --include-amends, --jsonl, --pretty |
fund |
--ticker or --cik |
--form, --latest, --limit-holdings, --limit-bytes, --include-amends, --jsonl, --pretty |
search |
--ticker or --cik, --query |
--form, --latest, --context, --include-amends, --jsonl, --pretty |
section |
--ticker or --cik, --item |
--form, --latest, --accession, --limit-bytes, --include-amends, --jsonl, --pretty |
report |
--ticker, --cik, --manager, or --investor; --kind |
--latest, --limit, --limit-bytes, --include-amends |
resolve |
--query, --manager, or --cik |
--no-verify, --llm-provider, --llm-base-url, --llm-model, --llm-api-key-env, --jsonl, --pretty |
docs |
--ticker or --cik |
--form, --latest, --limit, --include-amends, --jsonl, --pretty |
doc |
--ticker or --cik |
--form, --latest, --accession, --filename, --sequence, --primary, --limit-bytes, --raw, --text, --jsonl, --pretty |
form4 |
--ticker or --cik |
--latest, --limit, --include-amends, --jsonl, --pretty |
form4-summary |
--ticker or --cik |
--latest, --limit, --include-amends, --jsonl, --pretty |
8k |
--ticker or --cik |
--item, --latest, --limit, --limit-bytes, --include-amends, --jsonl, --pretty |
8k-exhibits |
--ticker or --cik |
--category, --latest, --limit, --limit-bytes, --include-amends, --jsonl, --pretty |
13d / 13g / schedule13 |
--ticker or --cik |
--form, --latest, --include-amends, --limit-bytes, --jsonl, --pretty |
13f |
--ticker, --cik, --manager, or --investor |
--latest, --limit, --include-amends, --jsonl, --pretty |
13f-aggregate |
--ticker, --cik, --manager, or --investor |
--latest, --limit, --include-amends, --jsonl, --pretty |
13f-diff |
--ticker, --cik, --manager, or --investor |
--latest, --limit, --include-amends, --jsonl, --pretty |
13f-summary |
--ticker, --cik, --manager, or --investor |
--latest, --limit, --include-amends, --jsonl, --pretty |
parse |
--ticker or --cik, --form |
--latest, --limit, --include-amends, --jsonl, --pretty |
forms |
none | --jsonl, --pretty |
config |
none | set-identity <TEXT>, show, path |
completions |
shell name | bash, zsh, fish, power-shell, elvish |
serve |
none | --host, --port |
mcp |
none | stdio JSON-RPC server; configure local identity or SEC_IDENTITY in the agent environment |
Default output is compact JSON:
sec filings --ticker AAPL --form 10-KPretty JSON:
sec filings --ticker AAPL --form 10-K --prettyJSONL:
sec facts --ticker AAPL --concept revenue --jsonlCSV:
sec --output csv filings --ticker AAPL --form 10-K --latest 3Terminal table:
sec --output table metrics --ticker AAPL --period annual --latest 1File exports for data engineering:
sec export --kind metrics --ticker AAPL --period annual --latest 4 --format parquet --out data/aapl_metrics.parquet
sec export --kind scores --ticker AAPL --period annual --latest 1 --format arrow --out data/aapl_scores.arrowTerminal table:
sec --output table filings --ticker AAPL --form 10-K --latest 3--output is global and can be used with any structured command. sec report
still prints Markdown, while sec doc --raw and sec doc --text keep printing
document content.
For AI agents, prefer JSON/JSONL commands when the next step is computation,
filtering, or citation, and prefer sec report when the next step is a human
readable briefing.
Useful patterns:
sec form4-summary --ticker AAPL --latest 5 --pretty
sec 8k --ticker AAPL --item 2.02 --latest 5 --limit-bytes 600 --pretty
sec ixbrl --ticker AAPL --form 10-K --concept NetIncomeLoss --limit 5 --jsonl
sec tables --ticker AAPL --form 10-K --limit-tables 5 --limit-rows 10 --pretty
sec 13d --ticker TSLA --form 13g --latest 2 --include-amends --pretty
sec foreign --ticker TSM --form 20-F --latest 1 --pretty
sec fund --cik 0000036405 --form NPORT-P --latest 1 --limit-holdings 10 --pretty
sec 13f-diff --cik 1067983 --limit 20 --jsonl
sec resolve --query 段永平 --pretty
sec 13f-diff --investor 段永平 --pretty
sec section --ticker AAPL --form 10-K --item risk-factors --limit-bytes 12000 --pretty
sec report --ticker AAPL --kind financial > aapl-financial.md
sec report --ticker AAPL --kind risk > aapl-risk.mdEvery result is designed to preserve traceability with fields like accession,
document, section, fact_id, source_url, and document_url where
applicable.
By default, responses are cached under the system cache directory:
~/Library/Caches/sec-cli # macOS
~/.cache/sec-cli # Linux
Override with:
sec --cache-dir ./cache filings --ticker AAPLsec-cli is not trying to be a Python convenience wrapper. It is a CLI-native
SEC data tool for agents:
- Stable JSON / JSONL
- Source-backed results
- Fast on-demand fetching and parsing
- Local caching by default
- Future Rust streaming parsers for SGML/XBRL
- Arrow/Parquet exports for data engineering