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

@craftpipe/cashflow-cli

v1.0.0

Published

CLI tool for financial operations — transactions, balances, invoices, forecasting, and more.

Downloads

89

Readme

npm version Tests TypeScript License: MIT

Financial operations CLI — transactions, balances, invoices, forecasting, and more. Connect to Stripe, Exact Online, Moneybird, QuickBooks Online, and FreshBooks from your terminal.


Overview

cashflow-cli is a developer-first CLI tool for financial operations. Query transactions, check balances, generate P&L reports, forecast cash flow, and reconcile data across multiple providers — all from your terminal. Supports Stripe, Exact Online, Moneybird, and QuickBooks Online.

cashflow transactions --provider stripe --from 2024-01-01 --to 2024-12-31
cashflow pnl --providers stripe --period quarter
cashflow forecast --providers stripe --months 6

Architecture

graph TB
    CLI[cashflow CLI] --> FREE[Free Commands]
    CLI --> PRO[Pro Commands]

    FREE --> T[transactions]
    FREE --> B[balances]
    FREE --> I[invoices]
    FREE --> R[revenue]
    FREE --> E[expenses]
    FREE --> H[health]

    PRO --> PNL[pnl]
    PRO --> FC[forecast]
    PRO --> RC[reconcile]
    PRO --> AN[anomalies]
    PRO --> TX[tax]
    PRO --> MC[multi-currency]

    T & B & I & R & E & H --> AF[Adapter Factory]
    PNL & FC & RC & AN & TX & MC --> AF

    AF --> SA[StripeAdapter]
    AF --> EA[ExactOnlineAdapter]
    AF --> MA[MoneybirdAdapter]
    AF --> QA[QuickBooksAdapter]
    AF --> FA[FreshBooksAdapter]

    PNL --> PnLAnalysis[analysis/pnl.ts]
    FC --> CFAnalysis[analysis/cashflow.ts]
    RC --> RecAnalysis[analysis/reconciliation.ts]
    AN --> AnoAnalysis[analysis/anomaly.ts]
    TX --> TaxAnalysis[analysis/tax.ts]
    MC --> MCAnalysis[analysis/multi-currency.ts]

Installation

npm install -g cashflow-cli

Setup

Set environment variables for your providers:

# Stripe
export STRIPE_SECRET_KEY=sk_live_...

# Exact Online
export EXACT_CLIENT_ID=...
export EXACT_CLIENT_SECRET=...
export EXACT_REFRESH_TOKEN=...
export EXACT_DIVISION=12345

# Moneybird
export MONEYBIRD_TOKEN=...
export MONEYBIRD_ADMINISTRATION_ID=...

# QuickBooks Online
export QUICKBOOKS_ACCESS_TOKEN=...
export QUICKBOOKS_REALM_ID=...
export QUICKBOOKS_SANDBOX=true  # optional, for sandbox environment

# FreshBooks
export FRESHBOOKS_ACCESS_TOKEN=...
export FRESHBOOKS_ACCOUNT_ID=...

Free Commands

transactions

cashflow transactions --provider stripe [--from <date>] [--to <date>] [--limit <n>] [--json]

balances

cashflow balances --provider stripe [--json]

invoices

cashflow invoices --provider stripe [--status paid|pending|overdue] [--json]

revenue

cashflow revenue --provider stripe --period day|week|month|quarter|year [--json]

expenses

cashflow expenses --provider stripe [--categories infrastructure,marketing] [--json]

health

cashflow health --providers stripe,exact-online [--json]

Pro Commands

pnl

cashflow pnl --providers stripe --period month|quarter|year [--json]

forecast

cashflow forecast --providers stripe --months 3|6|12 [--json]

Forecast methodology: Weighted moving average over 3-month lookback window (weights 1:2:3). Three scenarios: conservative (-20% income), realistic (base), optimistic (+20% income).

reconcile

cashflow reconcile --source stripe --target exact-online [--from <date>] [--to <date>] [--json]

Matching criteria: Exact amount + date within ±2 days + description similarity >=20%. Confidence score: 40% date proximity + 60% description similarity.

anomalies

cashflow anomalies --providers stripe [--sensitivity low|medium|high] [--json]

Detection rules:

  • Duplicate: same amount + similar description within 24 hours
  • Large variance: transaction > N times category average (N: low=3.0, medium=2.0, high=1.5)

tax

cashflow tax --provider stripe --period quarter|year [--jurisdiction NL|DE|FR|GB|US|EU] [--json]

multi-currency

cashflow multi-currency --providers stripe --base EUR|USD|GBP [--json]

Output Modes

All commands support --json for machine-readable output:

cashflow balances --provider stripe --json | jq '.[] | .available'

Development

npm install
npm run build
npm test
npm run test:coverage

Providers

| Provider | Transactions | Balances | Invoices | Expenses | Subscriptions | |----------|:---:|:---:|:---:|:---:|:---:| | Stripe | yes | yes | yes | yes | yes | | Exact Online | yes | yes | yes | yes | - | | Moneybird | yes | - | yes | yes | - | | QuickBooks Online | yes | yes | yes | yes | - | | FreshBooks | yes | - | yes | yes | - |

License

MIT — see LICENSE.