saasflow
v0.2.3
Published
Command-line client for the SaaSFlow public API.
Maintainers
Readme
saasflow
Command-line client for the SaaSFlow public API.
npm install -g saasflow
saasflow --helpSetup
Generate an API key in the SaaSFlow web UI (Settings → API keys), then either configure a profile:
saasflow configure
# Base URL: https://api.saasflow.com
# API key (sf_…): sf_live_…
# Default company id: cmp_……or pass credentials via env vars:
export SAASFLOW_BASE_URL=https://api.saasflow.com
export SAASFLOW_API_KEY=sf_live_…
export SAASFLOW_COMPANY_ID=cmp_…The config file lives at ~/.saasflow/config.json (mode 0o600). Multiple profiles are supported via --profile <name>.
Examples
saasflow companies list
saasflow companies get cmp_abc123
saasflow transactions list --limit 50 --format table
saasflow transactions get tx_xyz
saasflow customers list --limit 100
saasflow search "stripe payout"
# Data slices — one subcommand per slice, with flags derived from the
# server's Zod schema. `--help` lists exactly what the API accepts.
saasflow data mrrAtDate --mrr-type cmrr --date 2026-04-30
saasflow data monthlyData --mrr-type recurring \
--start-date 2026-01-01 --end-date 2026-04-30 --format table
saasflow data periodDetails \
--start-date 2026-01-01 --end-date 2026-04-30 \
--date-definition cash --split-by counterparty
# Multiple slices in one round trip
saasflow data batch --from-json dashboard.jsonOutput
JSON to stdout by default — pipes cleanly into jq:
saasflow transactions list --limit 5 | jq '.[] | {id, amount}'Human-friendly tables:
saasflow transactions list --limit 5 --format table \
--columns id,date,amount,counterparty.nameProfiles
saasflow configure --profile prod
saasflow configure --profile staging
saasflow --profile staging companies list
saasflow --profile prod data mrrAtDate --mrr-type cmrr --date 2026-04-30Authentication
Two credential types are accepted, both passed as Authorization: Bearer <token>:
- API key (
sf_…) — generate in the SaaSFlow web UI; scoped to a single company with explicit permissions. - Firebase ID token — used by the SaaSFlow web app; not directly supported by
saasflow configureyet.
For unattended scripts and CI, use API keys.
License
MIT
