npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cornect/cli

v0.8.0

Published

Command-line interface for the Cornect public API — search companies, manage exports, find new leads, watch companies with signal monitors, check credits.

Readme

Cornect CLI

Command-line interface for the Cornect public API — search companies, manage exports, find new leads, watch companies for signals, and check credits from your terminal or scripts. A third interface alongside the REST API and the MCP server, sharing the same auth + endpoints.

Install

npm install -g @cornect/cli   # then: cornect <command>
# or, without installing:
npx @cornect/cli <command>

Until it's published to npm, run from source: cd cli && npm install && npm run build && npm link (then cornect is on your PATH), or invoke node /path/to/cli/dist/index.js <command>.

Authenticate

Get a token at https://app.cornect.io → Account → API tokens (read scope covers search/lookup/credits and reading leads, signals and monitors; read_write adds export creation and changing monitors).

cornect login                                  # prompts for the token, validates it, stores it
cat token.txt | cornect login --token-stdin    # non-interactive; nothing lands in shell history
cornect logout                                 # removes the stored token

The token is saved to ~/.cornect/config.json (chmod 600). For CI/scripts, pipe it via --token-stdin, or set CORNECT_API_TOKEN from your CI secret store (it overrides the stored token).

Don't put the token on the command line or in an inline env assignment (--token cornect_…, CORNECT_API_TOKEN=cornect_… cornect …) — it becomes visible in the process table (ps) and your shell history. --token still works but is deprecated; use --token-stdin (pipe or < file) instead.

Base URL defaults to https://api.cornect.io/api/v1; override with CORNECT_API_BASE. For safety the CLI refuses to send your token to a non-https:// host that isn't loopback (pass --insecure to override), and prints a loud warning whenever the base is a host outside *.cornect.io.

Global flags

--json (raw JSON, for scripting) · --csv (CSV where supported) · --quiet (suppress decoration) · --debug (full error detail). Colors auto-disable when output isn't a TTY (clean pipes).

Commands

cornect search

cornect search --query fintech --country "Germany" --industry "Software" --limit 10
cornect search --country "United States" --exclude-industry "Staffing and Recruiting" \
               --exclude-keyword consulting
cornect search --query saas --json | jq '.items[].domain'
cornect search --country "Germany" --csv > german-companies.csv

Country/industry filters use full NAMES, not ISO codes — "Germany", "United States", "United Kingdom" (not "DE"/"US"). ISO codes match nothing. To target a city, also pass --country (city names repeat across countries — Berlin, Germany vs Berlin, Connecticut).

Full filter surface (all also accepted by export create / export preview --source-type search — the two share one mapping, so anything you can search you can export):

| Flag | Filter | | --- | --- | | -q, --query <text> | free text over name + description | | --country <name...> | full country name | | --state <name...> / --city <name...> | region / city | | --industry <name...> / --exclude-industry <name...> | industry in / out | | --keyword <kw...> / --exclude-keyword <kw...> | keyword in / out | | --naics <code...> | NAICS code | | --tech <name...> / --tech-category <name...> | technology / category | | --revenue-range <range...> | revenue bucket | | --employee-min <n> / --employee-max <n> | employee count bounds | | --founded-from <year> / --founded-to <year> | founded-year bounds | | --sort-by <field> | relevance | employee_count | founded_year | name | | --sort-order <dir> | asc | desc | | --include-aggs | include filter aggregations in the response |

List filters accept at most 500 values each; the CLI rejects an over-long list locally rather than making you wait for a 422.

Intent & relationship filters:

| Flag | Filter | | --- | --- | | --lookalike-domain <d...> / --lookalike-company-id <id...> | companies similar to these seeds | | --lookalike-min-score <0-1> | keep only similars at/above this similarity | | --jobs-title --jobs-seniority --jobs-category | hiring signal: what they're hiring for | | --jobs-country --jobs-state --jobs-city | hiring signal: where | | --jobs-count-min <n> / --jobs-count-max <n> | how many matching open roles | | --jobs-posted-from / --jobs-posted-to | posting date window (YYYY-MM-DD) | | --connection <category:target...> | relationships, e.g. vendor:salesforce.com | | --engagement-state <engaged\|new> | this workspace's saved/exported lens |

Only the first 10 lookalike seeds are used. Pass your best seeds first — the CLI warns and names any it dropped.

--engagement-state is workspace-relative. engaged = companies this workspace has already saved or exported; new = neither, i.e. the ones that still cost credits. Two tokens running identical filters get different results, by design. Use --engagement-state new before an export to avoid paying for rows you already own. (The engaged set is capped at 65,000.)

Two results that are not "no matches". An empty list can mean something specific, and the CLI says which:

  • Job-posting filter too broad (>65,000 companies) — results were withheld; narrow the filter (--jobs-count-min, a location, a tighter title).
  • That seed has no lookalike data — no similarity profile exists for it. Loosening other filters will not help; try a different seed.
cornect search --jobs-title engineer --jobs-country Germany --jobs-count-min 5
cornect search --lookalike-domain stripe.com --lookalike-min-score 0.7
cornect search --connection vendor:salesforce.com --engagement-state new

Numeric flags (--limit, --employee-min/max, --founded-from/to) reject anything that isn't a whole number. --limit abc is an error, not a silent fallback to 20.

cornect search --state California --tech Salesforce --employee-min 50 \
               --sort-by employee_count --sort-order desc

cornect company get <id>

cornect company get predictleads:acme.com
cornect company get predictleads:acme.com --json

cornect export

cornect export create --name "German SaaS" --country "Germany" --industry "Software"
cornect export preview --source-type search --state California --tech Salesforce
cornect export status <export-id>
cornect export download <export-id> --output leads.csv

export create charges 1 credit per newly-exported company and needs a read_write token (a read token gets 403 INSUFFICIENT_SCOPE).

cornect credits

cornect credits            # balance + recent transactions
cornect credits --json

Signals: cornect leads, cornect monitors, cornect signals

Find companies where something just happened, watch them every morning, and read what was delivered.

# Find new leads (free)
cornect leads                                   # one row per company, newest first (last 30 days)
cornect leads --family funding --days 7 --hide-watched
cornect leads company acme.com                  # every signal of one company, past year
cornect leads summary                           # companies per kind of event

# Watch companies: 1 credit per company per signal type, each morning at 09:00 UTC
cornect monitors create --name "Fintech watch" --type hiring,funding --domain acme.com,globex.com
#   This monitor checks 2 companies × 2 signal types every morning (09:00 UTC): 4 credits per run.
cornect monitors list                           # with each monitor's credits per day
cornect monitors get <id>                       # settings, companies, last 7 runs
cornect monitors add <id> initech.com umbrella.com
cornect monitors remove <id> globex.com
cornect monitors update <id> --type hiring,news --webhook-id <webhook-id>
cornect monitors pause <id>                     # no runs, no charges; `resume` restarts it
cornect monitors runs <id>                      # daily runs; `monitors run <id> <run-id>` for one
cornect monitors delete <id> --yes

# What your monitors delivered (free)
cornect signals list --type hiring --since 2026-10-01
cornect signals summary
cornect signals export -o signals.csv           # or to stdout without -o
  • Signal types (--type): hiring, funding, news, partnerships, or the API names job_openings, financing_events, news_events, connections. Kinds of event (--family): funding, mna, leadership, hiring, expansion, contraction, commercial, product, technology, other.
  • Delivery is a daily email digest to the workspace owner unless you pass --webhook-id. Hiring monitors can be narrowed with --title-keyword, --seniority and --category.
  • Up to 10 active monitors per workspace. A check that can't be made is refunded.
  • monitors add / remove report each domain and carry on past a failure, exiting non-zero if any failed. monitors delete needs --yes and removes the run history too; pause instead to stop the charges.
  • (content not kept) in signals list means the signal was delivered but its text wasn't stored (some older email deliveries), not that nothing happened.
  • signals export -o follows the same path rules as export download.

Who can change a monitor. Any token can read leads, signals and monitors. Creating, updating, pausing, resuming, adding/removing companies and deleting need a read_write token whose creator is an owner or admin of the workspace: a read token gets 403 INSUFFICIENT_SCOPE, a member's token 403 WORKSPACE_EDIT_FORBIDDEN.

Errors

Structured API errors print cleanly and exit non-zero — 401 → "Run: cornect login", 402 → top-up link, 403 INSUFFICIENT_SCOPE → "needs a read_write token", 403 WORKSPACE_EDIT_FORBIDDEN → "an owner or admin has to make this change", 429 → rate-limited. Stack traces only with --debug.

Develop

npm install
npm run build      # tsc → dist/
npm test           # vitest
npm run dev -- search --query fintech   # run from source via tsx