Edgar

From mvanhorn/printing-press-library · View interactive version

Edgar is an AI agent skill from the GitHub repository mvanhorn/printing-press-library. An agent-native CLI for SEC EDGAR — six sanctioned endpoints, SQLite-cached filings with FTS5, and LODESTAR-shaped... Trigger phrases: `primary sources for <ticker>`, `insider summary <ticker>`, `recheck delta for <ticker>`, `eightk items <ticker>`, `xbrl pivot`, `use edgar-pp-cli`, `run edgar`.

How to use this skill

Skill file

SEC EDGAR — Printing Press CLI

Prerequisites: Install the CLI

This skill drives the edgar-pp-cli binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:

  1. Install via the Printing Press installer. It defaults binaries to $HOME/.local/bin on macOS/Linux and %LOCALAPPDATA%\Programs\PrintingPress\bin on Windows:

```bash

npx -y @mvanhorn/printing-press-library install edgar --cli-only

```

  1. Verify: edgar-pp-cli --version
  2. Ensure the reported install directory is on $PATH for the agent/runtime that will invoke this skill.

If the npx install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.6 or newer):

go install github.com/mvanhorn/printing-press-library/library/other/edgar/cmd/edgar-pp-cli@latest

If --version reports "command not found" after install, the runtime cannot see the binary directory on $PATH. Do not proceed with skill commands until verification succeeds.

When to Use This CLI

Use edgar-pp-cli when an agent needs structured SEC filing data shaped for token-efficient consumption — primary-source bundles, insider-summary with S/F discrimination, cross-quarter MD&A diffs, or local FTS5 over cached filings. The compound primary-sources command is the LODESTAR shape: one call returns the full evidence pack for a Gate 1/2/3 thesis. Do not use this CLI for Federal Register searches, regulations.gov dockets, activist short reports, or NASDAQ short interest — those are out of scope and handled elsewhere.

When Not to Use This CLI

Do not activate this CLI for requests that require creating, updating, deleting, publishing, commenting, upvoting, inviting, ordering, sending messages, booking, purchasing, or changing remote state. This printed CLI exposes read-only commands for inspection, export, sync, and analysis.

Unique Capabilities

These capabilities aren't available in any other tool for this API.

Local state that compounds

_For quarterly thesis rechecks, reach for this before fetching the full submissions index — it eliminates re-paying token cost on filings already seen._

```bash

edgar-pp-cli since AAPL --as-of 2026-05-08 --json

```

_Reach for fts during deep-dives where you re-query the same filing body multiple times; reach for the absorbed efts command for the first lookup or for cross-issuer queries._

```bash

edgar-pp-cli fts "going concern" --ticker AAPL --form 10-Q --json

```

Service-specific content patterns

_Use this instead of pulling 8-K bodies when you need 'has anything material happened?' — answers in one call without reading filing text._

```bash

edgar-pp-cli eightk-items AAPL --since 2026-05-08 --material-only --json

```

_Use in LODESTAR Gate 3 asymmetric-structure checks to spot activist or institutional concentration without scrolling submissions._

```bash

edgar-pp-cli ownership-crosses AAPL --json

```

_Use as an early disqualifier check — if any flag fires, surface to LODESTAR before spending tokens on the full thesis._

```bash

edgar-pp-cli governance-flags AAPL --since 2y --json

```

Cross-entity joins

_Reach for this in LODESTAR Gate 2 execution-validation when an insider sale precedes material disclosures — surface management exits before bad news._

```bash

edgar-pp-cli insider-followthrough AAPL --json

```

Form 4 ingest cap. insider-summary, insider-followthrough, and primary-sources ingest Form 4 filings through a shared --max-form4 N cap (default 200) that bounds DB/API pressure on high-volume filers. When the cap clips older filings, the output surfaces form4_truncated: true and form4_total_in_window: <N> under form4_skipped plus a stderr WARN — never silent. Pass --max-form4 0 to disable; pass a larger value to widen the window.

_For cross-sectional quality screens — pivot before parsing 50 companyfacts JSON blobs by hand._

```bash

edgar-pp-cli xbrl-pivot --tickers AAPL,MSFT,GOOGL --concepts Revenues,NetIncomeLoss --quarters 8 --csv

```

Token-efficient extraction

_Use this instead of fetching the raw 10-K body — saves an order of magnitude in tokens when you only need Risk Factors and MD&A._

```bash

edgar-pp-cli sections AAPL --form 10-K --items 1A,7,7A --json

```

Command Reference

companies — Company identifiers (ticker → CIK) and per-issuer submissions index

companyfacts — XBRL company facts (financial concepts: revenue, net income, assets, cash flow, etc.) for a CIK

efts — EDGAR full-text search across all filings (efts.sec.gov). For offline FTS5 over cached filing bodies, use the offline fts command instead.

filings — Per-form-type filing retrieval and individual filing document fetch

Finding the right command

When you know what you want to do but not which command does it, ask the CLI directly:

edgar-pp-cli which "<capability in your own words>"

which resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code 0 means at least one match; exit code 2 means no confident match — fall back to --help or use a narrower query.

Recipes

Full LODESTAR research pull

edgar-pp-cli primary-sources AAPL --json --select shares_outstanding,senior_insider_sales,recent_eightk_items,def14a_governance

Compact JSON for an agent — primary-sources returns the full bundle; --select narrows to only the fields LODESTAR Gate evaluations actually need, dropping boilerplate.

Quarterly recheck delta

edgar-pp-cli since AAPL --as-of 2026-05-08 --json

Only filings filed after the supplied timestamp. Local cursor — no SEC round-trip when the cache is warm. Pair with eightk-items --material-only when the delta includes 8-Ks.

Insider follow-through pattern

edgar-pp-cli insider-followthrough AAPL --json

Cross-entity join: senior-officer code-S sales of ≥$1M paired with subsequent material 8-K items within 90 days. Surfaces management exits before bad news.

Cross-sectional XBRL screen

edgar-pp-cli xbrl-pivot --tickers AAPL,MSFT,GOOGL,META --concepts Revenues,NetIncomeLoss --quarters 8 --csv

Multi-ticker pivot with concept-alias resolution — flat table for downstream screening or spreadsheet load. Use --csv for tabular pipes.

Token-efficient 10-K item extraction

edgar-pp-cli sections AAPL --form 10-K --items 1A,7,7A --json --select item,text_offset,text

Pulls only Risk Factors (1A), MD&A (7), and Quantitative Disclosures (7A) with byte offsets — order of magnitude fewer tokens than the full filing body.

Local FTS5 deep-dive

edgar-pp-cli fts "going concern" --ticker AAPL --form 10-Q --json

Offline FTS5 over cached filing bodies; emits snippet + byte offsets for precise re-read. Run sync first if cache is cold.

Auth Setup

No API key — SEC EDGAR is publicly accessible. Identity is the User-Agent: set COMPANY_PP_CONTACT_EMAIL once and every request goes out as lodestar-edgar-pp-cli <email>. The CLI refuses to run if the env var is unset, with a clear error pointing at setup. Rate-limited to ≤2 req/sec sustained (well under SEC's 10 req/sec ceiling) with adaptive backoff on 429.

Run edgar-pp-cli doctor to verify setup.

Agent Mode

Add --agent to any command. Expands to: --json --compact --no-input --no-color --yes.

```bash

edgar-pp-cli companyfacts mock-value --agent --select id,name,status

```

Response envelope

Commands that read from the local store or the API wrap output in a provenance envelope:

{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}

Parse .results for data and .meta.source to know whether it's live or local. A human-readable N results (live) summary is printed to stderr only when stdout is a terminal — piped/agent consumers get pure JSON on stdout.

Agent Feedback

When you (or the agent) notice something off about this CLI, record it:

edgar-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
edgar-pp-cli feedback --stdin < notes.txt
edgar-pp-cli feedback list --json --limit 10

Entries are stored locally at ~/.edgar-pp-cli/feedback.jsonl. They are never POSTed unless EDGAR_FEEDBACK_ENDPOINT is set AND either --send is passed or EDGAR_FEEDBACK_AUTO_SEND=true. Default behavior is local-only.

Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.

Output Delivery

Every command accepts --deliver <sink>. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:

| Sink | Effect |

|------|--------|

| stdout | Default; write to stdout only |

| file:<path> | Atomically write output to <path> (tmp + rename) |

| webhook:<url> | POST the output body to the URL (application/json or application/x-ndjson when --compact) |

Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.

Named Profiles

A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.

edgar-pp-cli profile save briefing --json
edgar-pp-cli --profile briefing companyfacts mock-value
edgar-pp-cli profile list --json
edgar-pp-cli profile show briefing
edgar-pp-cli profile delete briefing --yes

Explicit flags always win over profile values; profile values win over defaults. agent-context lists all available profiles under available_profiles so introspecting agents discover them at runtime.

Exit Codes

| Code | Meaning |

|------|---------|

| 0 | Success |

| 2 | Usage error (wrong arguments) |

| 3 | Resource not found |

| 4 | Authentication required |

| 5 | API error (upstream issue) |

| 7 | Rate limited (wait and retry) |

| 10 | Config error |

Argument Parsing

Parse $ARGUMENTS:

  1. Empty, help, or --help → show edgar-pp-cli --help output
  2. Starts with install → ends with mcp → MCP installation; otherwise → see Prerequisites above
  3. Anything else → Direct Use (execute as CLI command with --agent)

MCP Server Installation

Install the MCP binary from this CLI's published public-library entry or pre-built release, then register it:

claude mcp add edgar-pp-mcp -- edgar-pp-mcp

Verify: claude mcp list

Direct Use

  1. Check if installed: which edgar-pp-cli

If not found, offer to install (see Prerequisites at the top of this skill).

  1. Match the user query to the best command from the Unique Capabilities and Command Reference above.
  2. Execute with the --agent flag:

```bash

edgar-pp-cli <command> [subcommand] [args] --agent

```

  1. If ambiguous, drill into subcommand help: edgar-pp-cli <command> --help.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.