Every govcon command and option, grouped by the work it does, with JSON output, exit codes and settings.
| Command | What it does |
|---|---|
govcon opportunities [OPTIONS] <QUERY> | Search open federal opportunities |
govcon documents-search [OPTIONS] <QUERY> | Search opportunities by the text inside their documents: SAM, SLED, DIBBS, SBIR/STTR |
govcon forecasts [OPTIONS] [KEYWORD] | Search procurement forecasts: planned buys not yet solicited |
govcon recompetes [OPTIONS] | List contracts ending soon and their likely recompetes |
govcon expiring [OPTIONS] | List awards whose period of performance ends in a window |
govcon grants [OPTIONS] [QUERY] | Search federal grants |
govcon events [OPTIONS] [QUERY] | Find GovCon events: industry days, conferences, and webinars |
govcon event [OPTIONS] <SLUG> | Show one event by the name in its G2X link |
govcon opportunities "cloud migration" --naics 541512,541519 --limit 8govcon documents-search "zero trust architecture" --source sam,sledgovcon documents-search "zero trust" --filter active:=true --filter 'posted_range:={"gte":"2026-01-01"}'govcon forecasts "cloud hosting" --agency DHS,VA --fiscal-year 2027govcon recompetes --uei UE9QJD4KK1L6 --from-month 3 --to-month 18govcon expiring --agency-code 9700 --fiscal-year 2027 --min-obligated 1000000govcon grants "rural broadband"govcon events cyber --from 2026-10-01 --state VAgovcon event <name-from-its-link>| Command | What it does |
|---|---|
govcon contracts [OPTIONS] [QUERY] | Search federal contract awards |
govcon awards [OPTIONS] [QUERY] | Search federal awards: contracts (default), IDVs, subawards, or OTAs |
govcon idvs [OPTIONS] [QUERY] | Search indefinite-delivery vehicles (IDVs) |
govcon vehicles [OPTIONS] [QUERY] | Search contract vehicles: GWACs, BPAs, and other programs |
govcon vehicle-usage [OPTIONS] <VEHICLE> | Show who uses a contract vehicle and how much flows through it |
govcon protests [OPTIONS] [QUERY] | Search bid protests at GAO, SBA, and the Court of Federal Claims |
govcon contracts "help desk" --filter naics=541512 --filter fiscal_year:=2025govcon awards --type idvs "enterprise infrastructure"govcon vehicles "OASIS+"govcon vehicle-usage "OASIS+"govcon protests --filter outcome=Denied| Command | What it does |
|---|---|
govcon companies [OPTIONS] <QUERY> | Find companies by name, UEI, or CAGE code |
govcon history [OPTIONS] <UEI> | Show a company's federal contracting portfolio by UEI |
govcon graph [OPTIONS] <UEI> | Show a company's connections: agencies, vehicles, and partners |
govcon socioeconomic [OPTIONS] <UEI> | Show a company's small-business certifications and set-aside eligibility |
govcon teaming [OPTIONS] <NAICS> | Find teaming partners with past performance in a NAICS code |
govcon people [OPTIONS] [QUERY] | Find people in the G2X directory by name, title, or company |
govcon companies "Leidos"govcon history UE9QJD4KK1L6 --from-year 2022 --expiring-within 365govcon graph UE9QJD4KK1L6 --per-relation 5govcon socioeconomic UE9QJD4KK1L6govcon teaming 541512 --exclude UE9QJD4KK1L6 --min-awards 5govcon people "contracting officer" --company UE9QJD4KK1L6| Command | What it does |
|---|---|
govcon record [OPTIONS] <TYPE> <ID> | Show one opportunity or company |
govcon attachments [OPTIONS] <OPPORTUNITY_ID> | List an opportunity's source documents and their readiness |
govcon read [OPTIONS] <OPPORTUNITY_ID> <ATTACHMENT_ID> | Print a whole opportunity document, or one page of it |
govcon record company UE9QJD4KK1L6govcon record opportunity <opportunity_id>govcon attachments <opportunity_id>govcon read <opportunity_id> <attachment_id>govcon read <opportunity_id> <attachment_id> --page 3govcon read <opportunity_id> <attachment_id> --format json > sow.json| Command | What it does |
|---|---|
govcon nsn [OPTIONS] <NSN> | Look up a National Stock Number |
govcon parts [OPTIONS] | Find National Stock Numbers by item name, part number, or CAGE code |
govcon nsn 5340-01-234-5678govcon parts --name "hydraulic pump" --fsc 4320| Command | What it does |
|---|---|
govcon search [OPTIONS] <DATASET> [QUERY] | Search any G2X dataset |
govcon tools [OPTIONS] [NAME] | List the G2X tools, or show one tool's input schema |
govcon call [OPTIONS] <TOOL> | Call any G2X tool with JSON input |
govcon search subawards "cybersecurity"govcon toolsgovcon tools g2x_search_recordsgovcon call g2x_search_records --input '{"dataset": "protests", "query": "cloud"}'| Command | What it does |
|---|---|
govcon login [OPTIONS] | Sign in to G2X in your browser |
govcon logout | Sign out of G2X on this computer |
govcon whoami [OPTIONS] | Show that you're signed in, with your plan and usage |
govcon usage [OPTIONS] | Show your G2X usage this session and this week |
govcon upgrade [OPTIONS] | Check for a newer govcon release |
govcon logingovcon login --no-browsergovcon logoutgovcon whoamigovcon usagegovcon upgradegovcon upgrade --check| Command | What it does |
|---|---|
govcon mcp serve | Run the G2X MCP server over stdio (your agent host starts this) |
govcon mcp add [OPTIONS] <HOST> | Connect G2X to Claude Code, Cursor, or Codex |
govcon skills install [OPTIONS] | Install the G2X skill for Claude Code, Codex, or Cursor |
govcon skills list [OPTIONS] | List the skills included with govcon |
govcon mcp add claudegovcon mcp add cursorgovcon mcp add codexgovcon skills install --host claude,codex,cursorgovcon skills install --globalgovcon skills listEvery command below is in govcon 0.3.4. Run govcon <command> --help for the same details in your terminal. Lists take comma-separated values, and a command whose results continue on another page prints the exact command for the next one.
Search open federal opportunities.
govcon opportunities [OPTIONS] <QUERY>| Argument or option | Meaning |
|---|---|
<query> | Search words (required) |
--naics <codes> | NAICS codes, comma-separated (up to 5) |
--limit <n> | Results to return, 1 to 8 |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Search opportunities by the text inside their documents: SAM, SLED, DIBBS, SBIR/STTR.
govcon documents-search [OPTIONS] <QUERY>| Argument or option | Meaning |
|---|---|
<query> | Words to find in statements of work, specifications, Q&A (required) |
--source <sources> | Sources, comma-separated: sam, sled, dibbs, sbir_sttr |
--filter <key=value> | Narrow the results: --filter naics=541512, or --filter fiscal_year:=2025 for a number (repeatable) |
--limit <n> | Results to return, 1 to 50 |
--cursor <cursor> | Continue from the cursor printed with the previous page |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Search procurement forecasts: planned buys not yet solicited.
govcon forecasts [OPTIONS] [KEYWORD]| Argument or option | Meaning |
|---|---|
<keyword> | Search words |
--agency <acronyms> | Agency acronyms, comma-separated, for example DHS,VA |
--naics <codes> | NAICS codes, comma-separated (up to 5) |
--status <statuses> | Forecast statuses, comma-separated |
--fiscal-year <year> | Fiscal year |
--award-after <YYYY-MM-DD> | Expected award on or after this date |
--award-before <YYYY-MM-DD> | Expected award on or before this date |
--limit <n> | Results to return, 1 to 50 |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
List contracts ending soon and their likely recompetes.
govcon recompetes [OPTIONS]| Argument or option | Meaning |
|---|---|
--uei <ueis> | UEIs holding the contracts, yours or a competitor's (up to 10) |
--office <codes> | Awarding contracting office codes, comma-separated |
--naics <codes> | NAICS codes, comma-separated (up to 5) |
--psc <codes> | PSC codes, comma-separated (up to 5) |
--from-month <n> | Window start, in months from today (default 0) |
--to-month <n> | Window end, in months from today (default 12) |
--limit <n> | Results to return, 1 to 50 |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
List awards whose period of performance ends in a window.
govcon expiring [OPTIONS]| Argument or option | Meaning |
|---|---|
--type <contracts|idvs> | Contract awards (default) or IDV awards |
--agency-code <codes> | Awarding agency codes, comma-separated, for example 9700 (DoD) or 3600 (VA) |
--fiscal-year <year> | Fiscal year the period of performance ends in |
--ends-after <YYYY-MM-DD> | Ends on or after this date |
--ends-before <YYYY-MM-DD> | Ends on or before this date |
--min-obligated <dollars> | Minimum obligated dollars |
--naics <codes> | NAICS codes, comma-separated (up to 5) |
--psc <codes> | PSC codes, comma-separated (up to 5) |
--uei <ueis> | Recipient UEIs, comma-separated (up to 10) |
--limit <n> | Results to return, 1 to 50 |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Search federal grants.
govcon grants [OPTIONS] [QUERY]| Argument or option | Meaning |
|---|---|
<query> | Search words |
--filter <key=value> | Narrow the results: --filter naics=541512, or --filter fiscal_year:=2025 for a number (repeatable) |
--limit <n> | Results to return, 1 to 50 |
--cursor <cursor> | Continue from the cursor printed with the previous page |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Find GovCon events: industry days, conferences, and webinars.
govcon events [OPTIONS] [QUERY]| Argument or option | Meaning |
|---|---|
<query> | Search words |
--from <YYYY-MM-DD> | Starting on or after this date |
--to <YYYY-MM-DD> | Starting on or before this date |
--state <XX> | Two-letter state |
--virtual | Only virtual events; --no-virtual for only in-person ones |
--limit <n> | Results to return, 1 to 25 |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Show one event by the name in its G2X link.
govcon event [OPTIONS] <SLUG>| Argument or option | Meaning |
|---|---|
<slug> | The event's name from its link, from govcon events (required) |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Search federal contract awards.
govcon contracts [OPTIONS] [QUERY]| Argument or option | Meaning |
|---|---|
<query> | Search words |
--filter <key=value> | Narrow the results: --filter naics=541512, or --filter fiscal_year:=2025 for a number (repeatable) |
--limit <n> | Results to return, 1 to 50 |
--cursor <cursor> | Continue from the cursor printed with the previous page |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Search federal awards: contracts (default), IDVs, subawards, or OTAs.
govcon awards [OPTIONS] [QUERY]| Argument or option | Meaning |
|---|---|
<query> | Search words |
--filter <key=value> | Narrow the results: --filter naics=541512, or --filter fiscal_year:=2025 for a number (repeatable) |
--limit <n> | Results to return, 1 to 50 |
--cursor <cursor> | Continue from the cursor printed with the previous page |
--type <contracts|idvs|subawards|otas> | Which awards to search (default contracts) |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Search indefinite-delivery vehicles (IDVs).
govcon idvs [OPTIONS] [QUERY]| Argument or option | Meaning |
|---|---|
<query> | Search words |
--filter <key=value> | Narrow the results: --filter naics=541512, or --filter fiscal_year:=2025 for a number (repeatable) |
--limit <n> | Results to return, 1 to 50 |
--cursor <cursor> | Continue from the cursor printed with the previous page |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Search contract vehicles: GWACs, BPAs, and other programs.
govcon vehicles [OPTIONS] [QUERY]| Argument or option | Meaning |
|---|---|
<query> | Search words |
--filter <key=value> | Narrow the results: --filter naics=541512, or --filter fiscal_year:=2025 for a number (repeatable) |
--limit <n> | Results to return, 1 to 50 |
--cursor <cursor> | Continue from the cursor printed with the previous page |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Show who uses a contract vehicle and how much flows through it.
govcon vehicle-usage [OPTIONS] <VEHICLE>| Argument or option | Meaning |
|---|---|
<vehicle> | Vehicle name or ID, for example OASIS+ (required) |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Search bid protests at GAO, SBA, and the Court of Federal Claims.
govcon protests [OPTIONS] [QUERY]| Argument or option | Meaning |
|---|---|
<query> | Search words |
--filter <key=value> | Narrow the results: --filter naics=541512, or --filter fiscal_year:=2025 for a number (repeatable) |
--limit <n> | Results to return, 1 to 50 |
--cursor <cursor> | Continue from the cursor printed with the previous page |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Find companies by name, UEI, or CAGE code.
govcon companies [OPTIONS] <QUERY>| Argument or option | Meaning |
|---|---|
<query> | Company name, UEI, or CAGE code (required) |
--limit <n> | Results to return, 1 to 8 |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Show a company's federal contracting portfolio by UEI.
govcon history [OPTIONS] <UEI>| Argument or option | Meaning |
|---|---|
<uei> | 12-character Unique Entity ID (required) |
--from-year <year> | First fiscal year |
--to-year <year> | Last fiscal year |
--naics <code> | One NAICS code |
--set-aside <type> | Set-aside type |
--expiring-within <days> | Also list awards ending within this many days |
--limit <n> | Results to return, 1 to 50 |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Show a company's connections: agencies, vehicles, and partners.
govcon graph [OPTIONS] <UEI>| Argument or option | Meaning |
|---|---|
<uei> | 12-character Unique Entity ID (required) |
--per-relation <n> | Connections to show per kind, 1 to 5 |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Show a company's small-business certifications and set-aside eligibility.
govcon socioeconomic [OPTIONS] <UEI>| Argument or option | Meaning |
|---|---|
<uei> | 12-character Unique Entity ID (required) |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Find teaming partners with past performance in a NAICS code.
govcon teaming [OPTIONS] <NAICS>| Argument or option | Meaning |
|---|---|
<naics> | The NAICS code the opportunity sits in (required) |
--exclude <ueis> | UEIs to leave out, such as your own or competitors' (up to 10) |
--min-awards <n> | Minimum awards in this NAICS code (default 3) |
--limit <n> | Results to return, 1 to 25 |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Find people in the G2X directory by name, title, or company.
govcon people [OPTIONS] [QUERY]| Argument or option | Meaning |
|---|---|
<query> | Name or title |
--company <uei> | Only people at this company (UEI) |
--limit <n> | Results to return, 1 to 50 |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Show one opportunity or company.
govcon record [OPTIONS] <TYPE> <ID>| Argument or option | Meaning |
|---|---|
<type> | opportunity or company (required) |
<id> | Opportunity ID, or a company's UEI (required) |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
List an opportunity's source documents and their readiness.
govcon attachments [OPTIONS] <OPPORTUNITY_ID>| Argument or option | Meaning |
|---|---|
<opportunity_id> | Opportunity ID returned by G2X (required) |
--offset <n> | Continue the list from this row |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Print a whole opportunity document, or one page of it.
govcon read [OPTIONS] <OPPORTUNITY_ID> <ATTACHMENT_ID>| Argument or option | Meaning |
|---|---|
<opportunity_id> | Opportunity ID returned by G2X (required) |
<attachment_id> | Attachment ID from govcon attachments (required) |
--format <markdown|json> | Markdown (default) or structured JSON |
--page <n> | Read one page instead of the whole document |
--cursor <cursor> | Read only the part a previous --page read said comes next |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Look up a National Stock Number.
govcon nsn [OPTIONS] <NSN>| Argument or option | Meaning |
|---|---|
<nsn> | The NSN, for example 5340-01-234-5678 (required) |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Find National Stock Numbers by item name, part number, or CAGE code.
govcon parts [OPTIONS]| Argument or option | Meaning |
|---|---|
--name <text> | Item name |
--part-number <text> | Manufacturer part number |
--cage <code> | 5-character CAGE code |
--fsc <code> | 4-digit Federal Supply Class, to narrow any of the above |
--limit <n> | Results to return, 1 to 50 |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Search any G2X dataset.
govcon search [OPTIONS] <DATASET> [QUERY]| Argument or option | Meaning |
|---|---|
<dataset> | opportunities, contracts, idvs, vehicles, protests, forecasts, grants, subawards, otas, entities, notices, agencies, naics, psc (required) |
<query> | Search words |
--filter <key=value> | Narrow the results: --filter naics=541512, or --filter fiscal_year:=2025 for a number (repeatable) |
--limit <n> | Results to return, 1 to 50 |
--cursor <cursor> | Continue from the cursor printed with the previous page |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
List the G2X tools, or show one tool's input schema.
govcon tools [OPTIONS] [NAME]| Argument or option | Meaning |
|---|---|
<name> | Tool name, for example g2x_search_opportunities |
--json | Print the raw G2X response as JSON |
Call any G2X tool with JSON input.
govcon call [OPTIONS] <TOOL>| Argument or option | Meaning |
|---|---|
<tool> | Tool name (see govcon tools) (required) |
--input <json> | Tool input as a JSON object |
--input-file <path> | Read the tool input from a file, or - for stdin |
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Sign in to G2X in your browser.
govcon login [OPTIONS]| Argument or option | Meaning |
|---|---|
--no-browser | Print a sign-in address to open on any device, then paste back where your browser ends up (for SSH and machines without a browser) |
Sign out of G2X on this computer.
govcon logoutNo options.
Show that you're signed in, with your plan and usage.
govcon whoami [OPTIONS]| Argument or option | Meaning |
|---|---|
--json | Print the raw G2X response as JSON |
Show your G2X usage this session and this week.
govcon usage [OPTIONS]| Argument or option | Meaning |
|---|---|
--json | Print the raw G2X response as JSON |
--verbose | Also print remaining quota and result details to stderr |
Check for a newer govcon release.
govcon upgrade [OPTIONS]| Argument or option | Meaning |
|---|---|
--check | Only report whether a newer release exists |
Run the G2X MCP server over stdio (your agent host starts this).
govcon mcp serveNo options.
Connect G2X to Claude Code, Cursor, or Codex.
govcon mcp add [OPTIONS] <HOST>| Argument or option | Meaning |
|---|---|
<host> | claude, cursor, or codex (required) |
--print | Only print the configuration; change nothing |
--direct | Connect the host straight to the G2X MCP server with a G2X sign-in, for hosts G2X has enabled |
Install the G2X skill for Claude Code, Codex, or Cursor.
govcon skills install [OPTIONS]| Argument or option | Meaning |
|---|---|
--host <claude,codex,cursor> | Hosts to install for. Default: every host with a folder in the target location. |
--global | Install into your home folder instead of the current project |
List the skills included with govcon.
govcon skills list [OPTIONS]| Argument or option | Meaning |
|---|---|
--json | Print the raw G2X response as JSON |
--json prints the result under data, and data.kind names its shape: opportunity_search, company_search, record, graph, dataset_rows, detail, usage, or a document. govcon read --json prints one JSON object with the whole document's text as text:
{ "ok": true, "data": { "kind": "dataset_rows", "title": "...", "rows": [{ "id": "...", "title": "...", "record_url": "https://g2x.com/app/...", "facts": {} }], "total": 12, "next_cursor": "..." } }When a result may be missing some matches, data.provenance.outcome is "partial", and the command still exits 0.
When a command fails with --json, the failure is printed to stdout and the command exits with a non-zero code:
{ "ok": false, "schema_version": "2026-09-01", "error": { "code": "rate_limited", "message": "...", "retryable": true } }govcon tools <name> --json prints that tool's definition, including its input schema.
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | G2X could not complete the request (the message says why), or an unexpected error |
| 2 | Invalid command, arguments, or input |
| 3 | Not signed in, the sign-in has ended, or sign-in was cancelled |
| 4 | Not included in your plan |
| 5 | Not found |
| 6 | Rate limited |
| 7 | G2X is temporarily unavailable or could not be reached |
| Variable | Purpose |
|---|---|
G2X_MCP_URL | The G2X research connection every command uses, default https://mcp.g2x.com/mcp/research |
BROWSER | The command govcon login opens the sign-in address with, instead of your default browser |
NO_COLOR | Turn off colored output |
Your sign-in is saved in ~/.govcon/credentials.json, readable only by you. govcon renews it on its own, and govcon logout ends it and removes the file.