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

@insourcia/cli

v0.2.0

Published

Command-line client for the Insourcia tools RPC API. Pilot the agent surface (search companies, get directors, financials, business events, credit risk, watchlists) from the terminal or shell scripts - no MCP client required.

Readme

@insourcia/cli

Command-line client for the Insourcia tools RPC API. Pilot the agent surface (search FR companies, get directors, financials, business events, credit risk, watchlists) from the terminal or shell scripts - no MCP client required.

Zero runtime dependencies. Works on Node.js ≥ 20.

Install

# One-off (no install)
npx @insourcia/cli --help

# Or install globally
npm install -g @insourcia/cli
insourcia --help

Authentication

Two options:

OAuth login (recommended for humans)

insourcia auth login     # opens browser, complete login + consent
insourcia auth status    # show current user
insourcia auth logout    # forget stored credentials

The OAuth flow uses Authorization Code + PKCE with a loopback redirect (the same pattern as gh auth login and infisical login). Credentials live in ~/.config/insourcia/credentials.json (mode 0600). The access token is refreshed automatically when it expires.

API key (recommended for CI / scripts)

Generate an API key from your Insourcia dashboard, then:

export INSOURCIA_API_TOKEN=isk_...

Or pass --token isk_... on every call.

Resolution order: --token > INSOURCIA_API_TOKEN > OAuth credentials from auth login.

Usage

# List available tools
insourcia tools list

# Invoke a tool (JSON in --input)
insourcia tools call search_companies --input '{"query":"vinci","limit":3}'

# From file
insourcia tools call search_companies --input @search.json

# From stdin
echo '{"siren":"552120222"}' | insourcia tools call get_company --input -

# Keep the {success,data} envelope (default unwraps to data)
insourcia tools call get_company --input '{"siren":"552120222"}' --raw

Available tools

Generated from the API tool registry - the same list insourcia tools list returns, with the same descriptions. Do not edit by hand.

| Tool | Description | |---|---| | search_companies | Recherche d'entreprises francaises par nom, SIREN, activite, et criteres financiers. | | resolve_companies | Rapprochement EN LOT de fiches mal identifiees vers leur SIREN - la forme qu'un CRM, un tableur ou un export CSV contient. | | get_company | Fiche complete d'une entreprise francaise identifiee par son SIREN. | | get_financials | Historique financier detaille d'une entreprise sur plusieurs exercices. | | get_directors | Detail des dirigeants d'une entreprise avec structure hierarchique. | | search_directors | Recherche de personnes (dirigeants) a travers toutes les entreprises francaises, par nom de famille. | | search_director_companies | Cartographie de l'empreinte corporate d'UNE personne physique : toutes les entreprises ou elle detient un mandat direct, identifiee de facon non ambigue par nom + prenom + date de naissance exacte. | | search_events | Recherche unifiee d'evenements d'entreprise (cross-SIREN), basee sur notre index ES. | | get_events | Timeline unifiee des evenements d'UNE entreprise (par SIREN). | | get_credit_risk | Score de risque credit d'UNE entreprise francaise (par SIREN). | | get_company_graph | Cartographie des entites autour d'UNE entreprise (par SIREN) : graphe ORIENTE et TYPE construit sur les mandats RCS/RNE et les liens de groupe. | | create_saved_search | Creation d'une recherche sauvegardee pour l'utilisateur, visible dans l'app Insourcia (page /news - Veille). | | watch_company | Mise sous surveillance d'une societe : l'ajoute a une liste de veille de l'utilisateur, visible dans l'app Insourcia (page /lists). | | unwatch_company | Retrait d'une societe de la surveillance : l'enleve d'une liste de veille de l'utilisateur (page /lists de l'app Insourcia). | | list_saved_searches | Liste des recherches sauvegardees de l'utilisateur (page /news - Veille de l'app Insourcia). | | list_watched_companies | Liste des societes surveillees par l'utilisateur dans ses listes de veille (page /lists de l'app Insourcia). | | get_news | Veille quotidienne de l'utilisateur : le fil d'actualite de ses societes surveillees, tel qu'il apparait sur la page /news de l'app Insourcia. | | mark_news_read | Marque comme lus des signaux precis de la veille de l'utilisateur (page /news de l'app Insourcia). |

Full reference: insourcia.io/docs/tools.

Exit codes

  • 0 — success
  • 1 — usage error (missing token, bad args, invalid JSON)
  • 2 — API error (4xx/5xx) or network failure

Configuration

| Option | Env var | Default | |---|---|---| | --token | INSOURCIA_API_TOKEN | (falls back to OAuth creds from auth login) | | --base-url | INSOURCIA_API_BASE_URL | https://api.insourcia.io | | --auth-base-url | INSOURCIA_AUTH_BASE_URL | https://app.insourcia.io |

Examples

# Pipe with jq
insourcia tools list | jq '.tools[].name'

# CSV export of P&L for a list of SIRENs
for siren in $(cat sirens.txt); do
  insourcia tools call get_financials --input "{\"siren\":\"$siren\"}" \
    | jq -r '[.exercices[] | [.annee, .chiffre_affaires, .resultat_net]] | @csv'
done > export.csv

# Smoke test staging
insourcia tools list --base-url https://staging.insourcia.io > /dev/null \
  && echo "✓ OK"

Links

License

MIT