@insourcia/cli
v0.1.4
Published
Command-line client for the Insourcia tools RPC API. Pilot the agent surface (search companies, get directors, financials, BODACC announcements) 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, BODACC announcements) 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 --helpSetup
Generate an API key from your Insourcia dashboard, then:
export INSOURCIA_API_TOKEN=isk_...Or pass --token isk_... on every call.
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"}' --rawAvailable tools
| Tool | Description |
|---|---|
| search_companies | Search FR companies by name, SIREN, sector, financials… |
| get_company | Full company profile by SIREN |
| get_financials | P&L, balance sheet, financial ratios |
| get_directors | Active and historical directors |
| search_announcements | BODACC announcements (sales, procedures, deposits) |
Full reference: insourcia.io/docs/tools.
Exit codes
0— success1— 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 | (required) |
| --base-url | INSOURCIA_API_BASE_URL | https://api.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
