Docs

Search G2X User Guide

Find a guide by task or topic. Use the arrow keys to choose a result.

Home
Docs home
Guides
  • Install the GovCon CLI
  • GovCon CLI commands
  • Use the GovCon CLI with coding agents
  1. Docs
  2. GovCon CLI commands

GovCon CLI commands

Every govcon command and option, grouped by the work it does, with JSON output, exit codes and settings.

On this page
  • Find work
  • Awards and vehicles
  • Companies and people
  • Opportunity records and documents
  • Supply items
  • Any dataset or tool
  • Your account
  • Coding agents
  • Options
  • JSON output
  • Exit codes
  • Settings

Find work

CommandWhat 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
Terminal
$ govcon opportunities "cloud migration" --naics 541512,541519 --limit 8$ govcon documents-search "zero trust architecture" --source sam,sled$ govcon documents-search "zero trust" --filter active:=true --filter 'posted_range:={"gte":"2026-01-01"}'$ govcon forecasts "cloud hosting" --agency DHS,VA --fiscal-year 2027$ govcon recompetes --uei [UEI] --from-month 3 --to-month 18$ govcon expiring --agency-code 9700 --fiscal-year 2027 --min-obligated 1000000$ govcon grants "rural broadband"$ govcon events cyber --from 2026-10-01 --state VA$ govcon event <name-from-its-link>

Awards and vehicles

CommandWhat 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
Terminal
$ govcon contracts "help desk" --filter naics=541512 --filter fiscal_year:=2025$ govcon awards --type idvs "enterprise infrastructure"$ govcon vehicles "OASIS+"$ govcon vehicle-usage "OASIS+"$ govcon protests --filter outcome=Denied

Companies and people

CommandWhat 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
Terminal
$ govcon companies "[Company Name or UEI]"$ govcon history [UEI] --from-year 2022 --expiring-within 365$ govcon graph [UEI] --per-relation 5$ govcon socioeconomic [UEI]$ govcon teaming 541512 --exclude [UEI] --min-awards 5$ govcon people "contracting officer" --company [UEI]

Opportunity records and documents

CommandWhat 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
Terminal
$ govcon record company [UEI]$ govcon record opportunity <opportunity_id>$ govcon attachments <opportunity_id>$ govcon read <opportunity_id> <attachment_id>$ govcon read <opportunity_id> <attachment_id> --page 3$ govcon read <opportunity_id> <attachment_id> --format json > sow.json

Supply items

CommandWhat 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
Terminal
$ govcon nsn 5340-01-234-5678$ govcon parts --name "hydraulic pump" --fsc 4320

Any dataset or tool

CommandWhat 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
Terminal
$ govcon search subawards "cybersecurity"$ govcon tools$ govcon tools g2x_search_records$ govcon call g2x_search_records --input '{"dataset": "protests", "query": "cloud"}'

Your account

CommandWhat it does
govcon login [OPTIONS]Sign in to G2X in your browser
govcon logoutSign 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
Terminal
$ govcon login$ govcon login --no-browser$ govcon logout$ govcon whoami$ govcon usage$ govcon upgrade$ govcon upgrade --check

Coding agents

CommandWhat it does
govcon mcp serveRun 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
Terminal
$ govcon mcp add claude$ govcon mcp add cursor$ govcon mcp add codex$ govcon skills install --host claude,codex,cursor$ govcon skills install --global$ govcon skills list

Options

Every 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.

govcon opportunities

Search open federal opportunities.

Terminal
$ govcon opportunities [OPTIONS] <QUERY>
Argument or optionMeaning
<query>Search words (required)
--naics <codes>NAICS codes, comma-separated (up to 5)
--limit <n>Results to return, 1 to 8
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon documents-search

Search opportunities by the text inside their documents: SAM, SLED, DIBBS, SBIR/STTR.

Terminal
$ govcon documents-search [OPTIONS] <QUERY>
Argument or optionMeaning
<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
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon forecasts

Search procurement forecasts: planned buys not yet solicited.

Terminal
$ govcon forecasts [OPTIONS] [KEYWORD]
Argument or optionMeaning
<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
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon recompetes

List contracts ending soon and their likely recompetes.

Terminal
$ govcon recompetes [OPTIONS]
Argument or optionMeaning
--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
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon expiring

List awards whose period of performance ends in a window.

Terminal
$ govcon expiring [OPTIONS]
Argument or optionMeaning
--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
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon grants

Search federal grants.

Terminal
$ govcon grants [OPTIONS] [QUERY]
Argument or optionMeaning
<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
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon events

Find GovCon events: industry days, conferences, and webinars.

Terminal
$ govcon events [OPTIONS] [QUERY]
Argument or optionMeaning
<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
--virtualOnly virtual events; --no-virtual for only in-person ones
--limit <n>Results to return, 1 to 25
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon event

Show one event by the name in its G2X link.

Terminal
$ govcon event [OPTIONS] <SLUG>
Argument or optionMeaning
<slug>The event's name from its link, from govcon events (required)
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon contracts

Search federal contract awards.

Terminal
$ govcon contracts [OPTIONS] [QUERY]
Argument or optionMeaning
<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
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon awards

Search federal awards: contracts (default), IDVs, subawards, or OTAs.

Terminal
$ govcon awards [OPTIONS] [QUERY]
Argument or optionMeaning
<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)
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon idvs

Search indefinite-delivery vehicles (IDVs).

Terminal
$ govcon idvs [OPTIONS] [QUERY]
Argument or optionMeaning
<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
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon vehicles

Search contract vehicles: GWACs, BPAs, and other programs.

Terminal
$ govcon vehicles [OPTIONS] [QUERY]
Argument or optionMeaning
<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
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon vehicle-usage

Show who uses a contract vehicle and how much flows through it.

Terminal
$ govcon vehicle-usage [OPTIONS] <VEHICLE>
Argument or optionMeaning
<vehicle>Vehicle name or ID, for example OASIS+ (required)
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon protests

Search bid protests at GAO, SBA, and the Court of Federal Claims.

Terminal
$ govcon protests [OPTIONS] [QUERY]
Argument or optionMeaning
<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
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon companies

Find companies by name, UEI, or CAGE code.

Terminal
$ govcon companies [OPTIONS] <QUERY>
Argument or optionMeaning
<query>Company name, UEI, or CAGE code (required)
--limit <n>Results to return, 1 to 8
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon history

Show a company's federal contracting portfolio by UEI.

Terminal
$ govcon history [OPTIONS] <UEI>
Argument or optionMeaning
<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
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon graph

Show a company's connections: agencies, vehicles, and partners.

Terminal
$ govcon graph [OPTIONS] <UEI>
Argument or optionMeaning
<uei>12-character Unique Entity ID (required)
--per-relation <n>Connections to show per kind, 1 to 5
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon socioeconomic

Show a company's small-business certifications and set-aside eligibility.

Terminal
$ govcon socioeconomic [OPTIONS] <UEI>
Argument or optionMeaning
<uei>12-character Unique Entity ID (required)
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon teaming

Find teaming partners with past performance in a NAICS code.

Terminal
$ govcon teaming [OPTIONS] <NAICS>
Argument or optionMeaning
<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
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon people

Find people in the G2X directory by name, title, or company.

Terminal
$ govcon people [OPTIONS] [QUERY]
Argument or optionMeaning
<query>Name or title
--company <uei>Only people at this company (UEI)
--limit <n>Results to return, 1 to 50
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon record

Show one opportunity or company.

Terminal
$ govcon record [OPTIONS] <TYPE> <ID>
Argument or optionMeaning
<type>opportunity or company (required)
<id>Opportunity ID, or a company's UEI (required)
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon attachments

List an opportunity's source documents and their readiness.

Terminal
$ govcon attachments [OPTIONS] <OPPORTUNITY_ID>
Argument or optionMeaning
<opportunity_id>Opportunity ID returned by G2X (required)
--offset <n>Continue the list from this row
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon read

Print a whole opportunity document, or one page of it.

Terminal
$ govcon read [OPTIONS] <OPPORTUNITY_ID> <ATTACHMENT_ID>
Argument or optionMeaning
<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
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon nsn

Look up a National Stock Number.

Terminal
$ govcon nsn [OPTIONS] <NSN>
Argument or optionMeaning
<nsn>The NSN, for example 5340-01-234-5678 (required)
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon parts

Find National Stock Numbers by item name, part number, or CAGE code.

Terminal
$ govcon parts [OPTIONS]
Argument or optionMeaning
--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
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon search

Search any G2X dataset.

Terminal
$ govcon search [OPTIONS] <DATASET> [QUERY]
Argument or optionMeaning
<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
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon tools

List the G2X tools, or show one tool's input schema.

Terminal
$ govcon tools [OPTIONS] [NAME]
Argument or optionMeaning
<name>Tool name, for example g2x_search_opportunities
--jsonPrint the raw G2X response as JSON

govcon call

Call any G2X tool with JSON input.

Terminal
$ govcon call [OPTIONS] <TOOL>
Argument or optionMeaning
<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
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon login

Sign in to G2X in your browser.

Terminal
$ govcon login [OPTIONS]
Argument or optionMeaning
--no-browserPrint a sign-in address to open on any device, then paste back where your browser ends up (for SSH and machines without a browser)

govcon logout

Sign out of G2X on this computer.

Terminal
$ govcon logout

No options.

govcon whoami

Show that you're signed in, with your plan and usage.

Terminal
$ govcon whoami [OPTIONS]
Argument or optionMeaning
--jsonPrint the raw G2X response as JSON

govcon usage

Show your G2X usage this session and this week.

Terminal
$ govcon usage [OPTIONS]
Argument or optionMeaning
--jsonPrint the raw G2X response as JSON
--verboseAlso print remaining quota and result details to stderr

govcon upgrade

Check for a newer govcon release.

Terminal
$ govcon upgrade [OPTIONS]
Argument or optionMeaning
--checkOnly report whether a newer release exists

govcon mcp serve

Run the G2X MCP server over stdio (your agent host starts this).

Terminal
$ govcon mcp serve

No options.

govcon mcp add

Connect G2X to Claude Code, Cursor, or Codex.

Terminal
$ govcon mcp add [OPTIONS] <HOST>
Argument or optionMeaning
<host>claude, cursor, or codex (required)
--printOnly print the configuration; change nothing
--directConnect the host straight to the G2X MCP server with a G2X sign-in, for hosts G2X has enabled

govcon skills install

Install the G2X skill for Claude Code, Codex, or Cursor.

Terminal
$ govcon skills install [OPTIONS]
Argument or optionMeaning
--host <claude,codex,cursor>Hosts to install for. Default: every host with a folder in the target location.
--globalInstall into your home folder instead of the current project

govcon skills list

List the skills included with govcon.

Terminal
$ govcon skills list [OPTIONS]
Argument or optionMeaning
--jsonPrint the raw G2X response as JSON

JSON output

--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:

JSON
{ "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:

JSON
{ "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.

Exit codes

CodeMeaning
0Success
1G2X could not complete the request (the message says why), or an unexpected error
2Invalid command, arguments, or input
3Not signed in, the sign-in has ended, or sign-in was cancelled
4Not included in your plan
5Not found
6Rate limited
7G2X is temporarily unavailable or could not be reached

Settings

VariablePurpose
G2X_MCP_URLThe G2X research connection every command uses, default https://mcp.g2x.com/mcp/research
BROWSERThe command govcon login opens the sign-in address with, instead of your default browser
NO_COLORTurn 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.

PreviousInstall the GovCon CLINextUse the GovCon CLI with coding agents

On this page

  • Find work
  • Awards and vehicles
  • Companies and people
  • Opportunity records and documents
  • Supply items
  • Any dataset or tool
  • Your account
  • Coding agents
  • Options
  • JSON output
  • Exit codes
  • Settings

Share this guide