Revenue Dashboard
Consolidated revenue intelligence across your Stripe accounts. Pulls charges, refunds, subscriptions, and MRR in a single command with period-over-period comparison, goal tracking, and anomaly detection.
Quick Start
- 1. Store your Stripe secret key at INLINECODE0
- Copy the config template and edit it:
cp {baseDir}/references/config-template.json ~/.config/revenue-dashboard/config.json
- 3. Edit
~/.config/revenue-dashboard/config.json with your Stripe account IDs and revenue goals - Run your first report:
CODEBLOCK1
Commands
Revenue Report
CODEBLOCK2
Periods: today, yesterday, week, month, quarter, year, all
Formats: json (default), markdown, INLINECODE11
Goal Tracking
CODEBLOCK3
Shows progress toward your monthly and annual revenue targets defined in config.
MRR & Subscription Metrics
CODEBLOCK4
Pulls active subscriptions across all accounts. With --breakdown, groups by plan/price.
Anomaly Detection
CODEBLOCK5
Flags unusual activity: revenue spikes/drops >2x vs 7-day average, refund rate >10%, or zero-revenue days.
Nightly Review Workflow
Run this sequence for a complete daily close:
CODEBLOCK6
Write findings to your daily notes. Propose next-day actions based on what the numbers show.
Automated Nightly Cron
CODEBLOCK7
Configuration
See references/config-template.json for the full config schema. Key fields:
CODEBLOCK8
Key Metrics Tracked
- - Gross / Net Revenue per account and consolidated
- Refund rate as percentage of gross
- Transaction count and average ticket size
- Period-over-period growth % with directional indicator
- MRR / ARR from active subscriptions
- Goal progress as percentage with projected monthly/annual totals
- Anomaly flags for unusual patterns
Interpreting Output
- - Growth > 0%: Revenue accelerating vs prior period
- Refund rate > 5%: Investigate product or fulfillment issues
- MRR trend: The most important metric for subscription businesses
- Goal pace: "On pace" means current run rate meets the target; "Behind" means action needed
Multi-Account Strategy
Add as many Stripe accounts as you operate. The dashboard consolidates everything but preserves per-account detail so you can see which products drive growth. Common setups:
- - SaaS + info products: Track subscription MRR alongside one-time course/template sales
- Multiple brands: See consolidated revenue while monitoring each brand independently
- Marketplace + services: Separate platform fees from direct service revenue
收入仪表盘
跨Stripe账户的统一收入智能分析。通过单一命令获取费用、退款、订阅和MRR数据,支持同期对比、目标追踪和异常检测。
快速开始
- 1. 将Stripe密钥存储在~/.config/stripe/api_key
- 复制配置模板并编辑:
bash
cp {baseDir}/references/config-template.json ~/.config/revenue-dashboard/config.json
- 3. 编辑~/.config/revenue-dashboard/config.json,填入Stripe账户ID和收入目标
- 运行首份报告:
bash
python3 {baseDir}/scripts/revenue.py --period today
命令
收入报告
bash
python3 {baseDir}/scripts/revenue.py --period <周期> [--format <格式>]
周期选项: today(今日)、yesterday(昨日)、week(本周)、month(本月)、quarter(本季度)、year(本年)、all(全部)
格式选项: json(默认)、markdown、summary(摘要)
目标追踪
bash
python3 {baseDir}/scripts/revenue.py --period month --goals
显示配置文件中定义的月度及年度收入目标的完成进度。
MRR与订阅指标
bash
python3 {baseDir}/scripts/mrr.py [--breakdown]
拉取所有账户的活跃订阅数据。使用--breakdown参数可按套餐/价格分组。
异常检测
bash
python3 {baseDir}/scripts/revenue.py --period today --anomalies
标记异常活动:收入波动超过7日均值2倍、退款率超过10%、或零收入日。
夜间审查工作流
按以下顺序执行完成每日结算:
bash
1. 昨日最终数据
python3 {baseDir}/scripts/revenue.py --period yesterday --format markdown --goals --anomalies
2. 月度趋势背景
python3 {baseDir}/scripts/revenue.py --period month --format summary
3. 当前MRR快照
python3 {baseDir}/scripts/mrr.py --breakdown
将分析结果写入每日笔记。根据数据表现提出次日行动建议。
自动夜间定时任务
json
{
name: nightly-revenue,
schedule: {kind: cron, expr: 0 3 *, tz: America/Los_Angeles},
sessionTarget: main,
payload: {
kind: systemEvent,
text: 使用revenue-dashboard技能执行夜间收入审查。拉取昨日收入数据,检查目标完成情况,标记异常,并制定明日计划。
}
}
配置说明
完整配置架构请参见references/config-template.json。关键字段:
json
{
accounts: {
mysaas: acctXXXXXXXXXXXX,
myshop: acctYYYYYYYYYYYY
},
goals: {
monthly: 10000,
annual: 120000
},
currency: usd,
anomaly_threshold: 2.0
}
追踪的关键指标
- - 毛收入/净收入:按账户及合并统计
- 退款率:占毛收入的百分比
- 交易数量及平均客单价
- 环比增长率:附带方向指示
- MRR/ARR:来自活跃订阅
- 目标进度:以百分比显示,含月度/年度预估总额
- 异常标记:针对异常模式
输出解读
- - 增长率 > 0%:收入较上期加速增长
- 退款率 > 5%:需调查产品或交付问题
- MRR趋势:订阅业务最重要的指标
- 目标进度:按计划进行表示当前速率达标;落后表示需采取行动
多账户策略
可添加任意数量的Stripe账户。仪表盘统一所有数据,同时保留各账户明细,便于识别增长驱动产品。常见配置:
- - SaaS + 信息产品:同时追踪订阅MRR与一次性课程/模板销售
- 多品牌运营:查看合并收入的同时监控各品牌独立表现
- 市场平台 + 服务:区分平台费用与直接服务收入