Install the context-dev CLI so you — or your agent — can call every Context.dev API from the terminal.
The context-dev CLI wraps every Context.dev endpoint in a single binary. Anything that can run a shell command — you, a CI job, or a coding agent like Claude Code or Codex — can resolve brands, scrape pages to Markdown, take screenshots, and classify industries without writing any SDK code.
Sign up at context.dev/signup (free tier: 500 one-time credits, no card) and copy your key from the dashboard — it starts with ctxt_secret_.The CLI reads the key from the CONTEXT_DEV_API_KEY environment variable. Every command also accepts an explicit --api-key flag, which takes precedence over the environment.
--help works at every level: context-dev --help lists the resources, context-dev web --help lists its commands, and context-dev web web-scrape-md --help documents every flag.Three global flags do most of the output work:
terminal
# Pull one field out of the response with GJSON syntaxcontext-dev brand retrieve --domain stripe.com --transform 'brand.colors'# Force plain JSON for piping into jq or a filecontext-dev brand retrieve --domain stripe.com --format json > stripe.json# Interactively browse a large responsecontext-dev web extract-styleguide --domain stripe.com --format explore
--format accepts auto, explore, json, jsonl, pretty, raw, and yaml; auto (the default) picks based on whether output is going to a terminal or a pipe. --transform uses GJSON syntax to reshape responses before they’re printed.
# One page → LLM-ready Markdown (1 credit)context-dev web web-scrape-md --url https://stripe.com/pricing# Raw HTML instead (1 credit)context-dev web web-scrape-html --url https://stripe.com/pricing# Every image asset on a page (1 credit; 5 with --enrichment)context-dev web web-scrape-images --url https://stripe.com# All URLs in a site's sitemap (1 credit)context-dev web web-scrape-sitemap --domain stripe.com# Crawl a whole site to Markdown (1 credit per page)context-dev web web-crawl-md --url https://docs.stripe.com --max-pages 25# Search the web (1 credit per result)context-dev web search --query "stripe billing pricing"# Screenshot — returns a hosted PNG URL (5 credits)context-dev web screenshot --direct-url https://stripe.com/pricingcontext-dev web screenshot --domain stripe.com --page pricing --full-screenshot
# Is this URL a product page? If so, extract the product (10 credits)context-dev ai extract-product --url https://www.allbirds.com/products/mens-wool-runners# Pull a product list from a brand's whole site (10 credits)context-dev ai extract-products --domain allbirds.com --max-products 10# Ask for arbitrary datapoints from a brand's website (10 credits)context-dev ai ai-query \ --domain stripe.com \ --data-to-extract.datapoint-name ceo_name \ --data-to-extract.datapoint-description "Full name of the company's CEO" \ --data-to-extract.datapoint-type text
# 2022 NAICS codes from a domain or company namecontext-dev industry retrieve-naics --input stripe.com# SIC codes — original_sic (1987 list, default) or latest_sec (SEC's current list)context-dev industry retrieve-sic --input stripe.com --type latest_sec
# Warm the cache so the next lookup lands in under a second (0 credits, paid plans only)context-dev utility prefetch --domain stripe.comcontext-dev utility prefetch-by-email --email[email protected]
Any agent with shell access can use the CLI as-is — no MCP server or tool config required. Make sure CONTEXT_DEV_API_KEY is exported in the shell your agent inherits, then tell it the CLI exists in your CLAUDE.md or AGENTS.md:
CLAUDE.md / AGENTS.md
## Context.dev CLIThe `context-dev` CLI is installed and `CONTEXT_DEV_API_KEY` is set. Use it tolook up brand data (`context-dev brand retrieve --domain example.com`), scrapepages to Markdown (`context-dev web web-scrape-md --url ...`), take screenshots,extract styleguides and products, and classify industries. Run`context-dev --help` to list resources and`context-dev <resource> <command> --help` for flags.
When the agent pipes a command, --format auto emits plain JSON, so the output is parseable without extra flags. For trimming large responses before they hit the agent’s context window, --transform is the tool: --transform 'brand.colors' returns just the colors instead of the full profile.