The same framework-free engine that powers the app drives a terminal CLI and an MCP server. Query True MRR, today's cash and transactions from your shell — or let Claude do it. Read-only keys, run locally, nothing stored.
The revenue adapters (Stripe, Lemon Squeezy, Gumroad, App Store, Demo) are pure TypeScript with no app dependencies — so the exact same code runs in the iOS app, the CLI, the MCP server and the push worker.
# src/sources — pure adapters → aggregate() Stripe ─┐ Lemon Sqz. ─┤ Gumroad ─┼─▶ aggregate() ─▶ ┌─ iOS app App Store ─┤ ├─ frgmnt CLI Demo ─┘ ├─ MCP server └─ Cloudflare worker → Expo Push
frgmntRun via npm run cli -- <command> (or npx tsx cli/frgmnt.ts). Add --demo to any data command to run without keys.
$ npm run cli -- mrr --demo
TRUE MRR $6,622.73 ARR $79,473 313 subs
STRP $4,475.61
APPL $1,005.54
LEMN $767.32
GUMR $374.26$ npm run cli -- today
TODAY gross $78,901.00 refunds $4,334.00 fees $2,288.13 net $72,278.87 (347 txns)txns)$ npm run cli -- transactions --limit 5
14:10:37 LEMN ADDON_ENABLE +$79.00
14:09:36 APPL PRO_YEARLY_NEW +$19.00
14:08:31 STRP ADDON_ENABLE +$99.00
14:07:19 STRP TEAM_UPGRADE +$999.00
14:06:38 STRP PRO_MONTHLY_NEW +$240.00$ npm run cli -- validate stripe rk_live_xxx
✓ STRP valid (stripe)$ npm run cli -- push-test "ExponentPushToken[xxx]" "New sale \$49.00 via Stripe"$ npm run cli -- sources
config: ~/.frgmnt/config.json
STRP configured (rk_liv…)
APPL —
LEMN configured (eyJ0eX…)
GUMR —A stdio Model Context Protocol server exposing your revenue to any MCP client. Add it to Claude Code:
$ claude mcp add frgmnt -- npx tsx /path/to/frgmnt/mcp/server.mts
Then ask Claude things like "what's my MRR?" or "list today's Stripe transactions." Tools:
The CLI and MCP server read keys from environment variables first, then ~/.frgmnt/config.json (override the path with FRGMNT_CONFIG). Use read-only / restricted keys.
| Platform | Env var | config.json key | Format |
|---|---|---|---|
| Stripe | FRGMNT_STRIPE_KEY | stripe | rk_live_… (restricted, read) |
| Lemon Squeezy | FRGMNT_LEMON_KEY | lemonsqueezy | API key |
| Gumroad | FRGMNT_GUMROAD_KEY | gumroad | access token |
| App Store | FRGMNT_APPSTORE_KEY | appstore | ISSUER_ID:KEY_ID:base64(.p8) |
Example ~/.frgmnt/config.json:
{
"stripe": "rk_live_xxx",
"lemonsqueezy": "eyJ0eXAi…",
"gumroad": "gum_pat_xxx",
"appstore": "ISSUER_ID:KEY_ID:BASE64_OF_P8"
}
KEYS STAY ON YOUR MACHINE · CALLS GO DIRECT TO EACH PLATFORM · NOTHING IS STORED OR PROXIED.