The README lists every search filter and more recipes. Every command also has
--help with examples and its credit cost.
Install
- The npm package needs Node.js 22 or newer. To run it once without installing, use
npx @companyenrich/cli. - Homebrew and the install script fetch a standalone binary for macOS or Linux, so you don’t need Node.js.
- The install script verifies the download’s SHA-256 and puts the binary in
~/.local/bin. SetCOMPANYENRICH_INSTALL_DIRto change the location, orCOMPANYENRICH_VERSIONto pin a version. - On Alpine, run
apk add libstdc++ libgccfirst. - On Windows, use npm or download the zip from Releases.
Sign in
Create an API key at app.companyenrich.com/access-keys, then:me is free, so it is the quickest way to confirm your key works.
The CLI looks for a key in this order:
- The
--api-keyflag. - The
COMPANYENRICH_API_KEYenvironment variable. - The key saved by
auth loginin~/.companyenrich/api_key, a file only your user can read.
auth status shows which key is in use, and auth logout removes the saved one.
Commands
Run any command with
--help to see its flags, examples, and price. See Credits for how credits work.
Search
Company search has three modes, and filters work with all of them:- Lists take commas or repeated flags:
--country US,CAor--country US --country CA. - Exclusions use an
exclude-prefix:--exclude-country US --exclude-keyword agency. - Ranges use
..:2015..2020,2020..for 2020 or later,..2010for 2010 or earlier. - Amounts take suffixes:
500k,2.5M,1B. - Company filters on people use a
company-prefix:--company-country US,--company-semantic "developer tools".
Paging
Searches return 10 results unless you ask for more.--all counts the matches first, which is free, then fetches exactly that many.
If a page fails partway or you press Ctrl-C, the CLI still writes what it already fetched, along with the cursor to resume from. You paid for those pages, so none of them are thrown away.
Output
At a terminal you get tables. When output is piped or written to a file you get JSON in the same shape the API returns.--fields takes dot paths. A name applied to a list maps over it, so experiences.company.name returns every employer.
With -o, the CLI checks that it can write the file before it sends the request. A bad path fails right away, not after the credits are spent.
Control credit spend
Most calls cost credits, so the CLI gives you three ways to avoid surprises.1
Size the search for free
company count, people count, and the preview commands cost nothing.2
Preview the request
--dry-run prints the exact request and a credit estimate, and sends nothing. It works without an API key and never touches your -o file.3
Confirm large spends
Before a command that could use 1,000 credits or more, the CLI asks for confirmation. In a script, where nobody can answer, it stops and tells you to pass
--yes.COMPANYENRICH_CONFIRM_ABOVE. Set it to 0 to turn the check off.
The estimate for
people search --expand company is a ceiling, not a forecast. That expansion is charged per unique company across everyone’s employers, which can’t be known up front, so the CLI assumes the API’s limit of 500 companies per page.Bulk jobs
For large lists, run a background job instead of looping.company enrich accepts several domains and sends them 50 at a time:
Call any endpoint
api sends a request to any endpoint with your key and the same retry behavior.
Use it in scripts and AI agents
The CLI behaves the same without a terminal: JSON on stdout, errors on stderr, stable exit codes, and no prompts.
If you hand the CLI to an AI agent, give it two instructions:
- Run
--dry-runfirst to see the request and its cost. - Pass
--yesonly when a large spend is intended.
Configuration
Global flags:
--format, --json, --fields, -o/--output, --dry-run, -y/--yes, --timeout, --retries, -v/--verbose, and --no-color.
Retries and timeouts
- Rate limits and temporary server errors are retried 3 times by default. Change that with
--retries, from 0 to 10. - On a 429, the CLI waits for the period the API specifies.
- A request that timed out is not retried, because it may already have run and been charged.
--timeoutis in seconds and defaults to 120. For downloads it covers the wait for the response to start, not the length of the download.
Shell completion
Completion covers commands, flags, and allowed values such as--seniority or --employees.
Support
- Bugs and feature requests: GitHub issues
- When reporting a failed request, include the
Trace IDprinted with the error. It lets us find the exact call in our logs.--verboseshows the full request and response.