AI-powered subscription analytics agent for RevenueCat's Charts API
Project description
๐ RC Insights โ AI-Powered Subscription Analytics for RevenueCat
Your subscription metrics, analyzed by AI. RC Insights connects to RevenueCat's Charts API, pulls your data, and generates actionable health reports โ so you can stop guessing and start growing.
What Is This?
RC Insights is an open-source tool that turns your RevenueCat Charts API data into intelligence. It comes in three flavors:
| Mode | Best For |
|---|---|
| ๐ฅ๏ธ CLI | Quick terminal reports, CI/CD pipelines, cron jobs |
| ๐ Web Dashboard | Interactive exploration with charts and export |
| ๐ฆ Python Library | Building your own analytics on top of the Charts API |
Key Features
- ๐ Charts API v2 Coverage โ 9 confirmed-working chart types (revenue, MRR, churn, actives, customers, refund rate)
- ๐ง AI Analysis โ GPT-4o-mini generates insights, anomaly detection, and recommendations
- ๐ Health Score โ Single 0-100 number summarizing your subscription business health
- ๐ Trend Detection โ Automatic week-over-week comparison across all metrics
- ๐ Export โ Markdown and HTML reports you can share with your team
- ๐ง Heuristic Fallback โ Works without any LLM key using rule-based analysis
- ๐ค 100+ LLM Providers โ OpenAI, Anthropic Claude, Ollama (local/free), Groq, Mistral, and more via litellm
- ๐จ Threshold Alerts โ Define custom alert rules in YAML (
if churn > 8%, alert) - ๐ Cohort Retention โ Weekly cohort analysis derived from subscriber data
- ๐ฌ Slack/Discord โ Send reports directly to your team channel via webhooks
- ๐ง Email Reports โ Deliver styled HTML reports via Resend
- ๐ RevenueCat Webhooks โ Real-time event processing for purchases, cancellations, billing issues
- โก GitHub Action โ Automated weekly health checks in CI
Quick Start
1. Install
pip install rc-insights
Or clone and install locally:
git clone https://github.com/arimetabot/rc-insights.git
cd rc-insights
pip install -e ".[web]" # Include Streamlit dashboard
2. Configure
export RC_API_KEY=sk_your_revenuecat_key
export RC_PROJECT_ID=proj1ab2c3d4
export OPENAI_API_KEY=sk-your-openai-key # Optional, for AI insights
Or create a .env file:
cp .env.example .env
# Edit .env with your keys
3. Generate a Report
# Full health report with AI insights
rc-insights report
# Just the overview metrics
rc-insights overview
# A specific chart
rc-insights chart mrr --days 90 --resolution week
4. Launch the Web Dashboard
streamlit run app.py
Live Demo โ Dark Noise App
Real output from running RC Insights against the Dark Noise app (proj058a6330), March 11, 2026:
$ rc-insights overview --project-id proj058a6330
๐ Overview Metrics
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโณโโโโโโโณโโโโโโโโโ
โ Metric โ Value โ Unit โ Period โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ Active Trials โ 57.00 โ # โ P0D โ
โ Active Subscriptions โ 2,519.00 โ # โ P0D โ
โ MRR โ 4,537.00 โ $ โ P28D โ
โ Revenue โ 4,795.00 โ $ โ P28D โ
โ New Customers โ 1,615.00 โ # โ P28D โ
โ Active Users โ 14,098.00 โ # โ P28D โ
โ Number of transactions in the last 28 days โ 600.00 โ # โ P28D โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโดโโโโโโโดโโโโโโโโโ
$ rc-insights report --project-id proj058a6330 --no-ai
โญโโโโโโโโโโโโโโโโโ ๐ Subscription Health Report โโโโโโโโโโโโโโโโโโโฎ
โ 42/100 โ Mixed โ ๏ธ โ
โ โ
โ Your subscription metrics show mixed signals. โ
โ Bright spots: Churn Improving. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
๐ง Insights
โโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโ
โ โ Issue โ Metric โ Recommendation โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ ๐ต โ MRR Stable โ $4,534.00 โ Focus on acquisition โ
โ ๐ก โ MRR Growth Rate Slowing โ -56.0% โ Consider pricing... โ
โ ๐ข โ Churn Improving โ -33.9% โ Reinforce retention โ
โ ๐ก โ Elevated Refund Rate โ 12.2% โ Review refund reasonsโ
โ ๐ก โ New Customer Acquisition โ -24.1% โ Check app store... โ
โ โ Slowing โ โ โ
โโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโ
โ Saved: reports/report_20260311_1501.md
โ Saved: reports/report_20260311_1501.html
Markdown report (generated in under 30 seconds):
## Health Score: 42/100 โ Mixed โ ๏ธ
[โโโโโโโโโโโโโโโโโโโโ] 42%
### Executive Summary
Your subscription metrics show mixed signals. Bright spots: Churn Improving.
## ๐ Key Metrics
| Metric | Value | Period |
|-----------------------|-----------|--------|
| Active Subscriptions | 2,519 | P0D |
| MRR | $4,537 | P28D |
| Revenue | $4,795 | P28D |
| New Customers | 1,615 | P28D |
| Active Users | 14,098 | P28D |
## ๐ Charts Summary
| Chart | Latest | Min | Max | Trend |
|-------------------|-----------|-----------|-----------|--------------|
| Revenue | $8.00 | $5.00 | $334.81 | ๐ -9.9% |
| MRR | $4,534.00 | $4,510.19 | $4,568.95 | โก๏ธ -0.8% |
| MRR Movement | $0.24 | -$24.18 | $29.42 | ๐ -56.0% |
| Churn | 0.20 | 0.08 | 2,545.00 | ๐ -33.9% |
| Active Subs | 2,519 | 2,512 | 2,545 | โก๏ธ -0.9% |
| New Customers | 48 | 46 | 94 | ๐ -24.1% |
Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ RC Insights โ
โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โ
โ โ CLI โ โ Web Dashboardโ โ Python Library โ โ
โ โ (Typer) โ โ (Streamlit) โ โ (importable) โ โ
โ โโโโโโฌโโโโโโ โโโโโโโโฌโโโโโโโโ โโโโโโโโโฌโโโโโโโโโ โ
โ โ โ โ โ
โ โโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโ โ
โ โ SubscriptionAnalyzer โ โ
โ โ โข Orchestrates data fetch + analysis โ โ
โ โ โข AI mode (OpenAI) or Heuristic fallback โ โ
โ โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ ChartsClient โ โ
โ โ โข Auth, retries, rate limiting โ โ
โ โ โข 9 verified chart endpoints โ โ
โ โ โข Typed responses (Pydantic) โ โ
โ โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโดโโโโโโโโ
โ RevenueCat โ
โ Charts API v2 โ
โโโโโโโโโโโโโโโโโ
Usage Examples
As a Python Library
from rc_insights import ChartsClient, SubscriptionAnalyzer
# Low-level: Direct API access
with ChartsClient(api_key="sk_...", project_id="proj...") as client:
overview = client.get_overview()
print(f"MRR: ${overview.mrr:,.2f}")
revenue = client.get_chart("revenue", start_date="2025-01-01", end_date="2025-12-31")
for timestamp, value in revenue.data_points:
print(f" {timestamp.date()}: ${value:,.2f}")
# High-level: Full analysis with AI
with SubscriptionAnalyzer(
rc_api_key="sk_...",
rc_project_id="proj...",
openai_api_key="sk-...", # Optional
) as analyzer:
report = analyzer.generate_report(days=30)
print(f"Health Score: {report.overall_health_score}/100")
print(f"Summary: {report.summary}")
for insight in report.insights:
print(f" [{insight.severity}] {insight.title}: {insight.recommendation}")
CLI Commands
# Generate a 90-day report with weekly resolution
rc-insights report --days 90 --resolution week
# Save only markdown (skip HTML)
rc-insights report --format md --output ./my-reports
# Skip AI, use heuristic analysis
rc-insights report --no-ai
# Check your connection
rc-insights check
# List all available charts
rc-insights charts
# Pull a specific chart
rc-insights chart churn --days 60
rc-insights chart mrr --resolution month
Available Charts
All chart slugs below are verified working against the live RevenueCat Charts API v2.
| Category | Charts |
|---|---|
| ๐ฐ Revenue | revenue, mrr, mrr_movement |
| ๐ฅ Subscribers | actives, actives_new, customers_new, customers_active |
| ๐ Health | churn, refund_rate |
Note: Some chart slugs documented in the RevenueCat dashboard return HTTP 400 errors via the API (e.g.,
annual_recurring_revenue,active_trials,trial_conversion). RC Insights only uses confirmed-working endpoints.
Supported LLMs
RC Insights uses litellm as an abstraction layer, giving you access to 100+ LLM providers with a single interface.
| Provider | Model String | Setup |
|---|---|---|
| OpenAI (default) | gpt-4o-mini, gpt-4o |
export OPENAI_API_KEY=sk-... |
| Anthropic | claude-sonnet-4-5, claude-opus-4-5 |
export ANTHROPIC_API_KEY=sk-ant-... |
| Ollama (local, free) | ollama/llama3, ollama/mistral, ollama/phi3 |
ollama serve (no key needed) |
| Groq | groq/llama-3.1-70b-versatile |
export GROQ_API_KEY=gsk_... |
| Mistral | mistral/mistral-medium |
export MISTRAL_API_KEY=... |
| Azure OpenAI | azure/gpt-4o |
export AZURE_API_KEY=... + AZURE_API_BASE=... |
| Google Gemini | gemini/gemini-1.5-flash |
export GEMINI_API_KEY=... |
Quick Provider Examples
# OpenAI (default)
export OPENAI_API_KEY=sk-...
rc-insights report
# Anthropic Claude
export ANTHROPIC_API_KEY=sk-ant-...
rc-insights report --model claude-sonnet-4-5
# Ollama โ completely local, no API key, runs on your machine
ollama serve &
rc-insights report --model ollama/llama3
# Groq โ very fast inference, generous free tier
export GROQ_API_KEY=gsk_...
rc-insights report --model groq/llama-3.1-70b-versatile
# Universal key override
export LLM_API_KEY=your-key-here
rc-insights report --model gpt-4o
As a Python Library
# Any litellm model string works
analyzer = SubscriptionAnalyzer(
rc_api_key="sk_...",
rc_project_id="proj...",
llm_model="claude-sonnet-4-5", # or ollama/llama3, groq/llama-3.1-70b, etc.
llm_api_key="sk-ant-...", # optional: also reads from env vars
)
No key? No problem. Without any LLM key configured, RC Insights automatically falls back to heuristic analysis. All the trend detection and scoring still works โ you just don't get the AI narrative summary.
List all supported models:
rc-insights models
How the AI Analysis Works
When an LLM is configured, RC Insights:
- Fetches all core charts from the Charts API (9 confirmed-working endpoints)
- Formats the data into a concise summary with trends and statistics
- Prompts GPT-4o-mini with a subscription analytics expert persona
- Parses the structured JSON response into typed
Insightobjects - Scores overall health on a 0-100 scale
Without OpenAI, the heuristic engine applies rule-based analysis:
- MRR/revenue trend detection (week-over-week comparison)
- Churn rate thresholds (>10% critical, >5% warning)
- Trial conversion benchmarks (industry average: 10-15%)
- Refund rate monitoring
Both modes produce the same HealthReport output format.
Report Output
Reports are generated in both Markdown and HTML formats:
- Markdown โ Perfect for GitHub READMEs, Notion, Slack
- HTML โ Styled dark-mode dashboard, shareable as a static file
Each report includes:
- ๐ Health Score (0-100)
- ๐ Key Metrics table
- ๐ง Prioritized insights with recommendations
- ๐ Charts summary with trend indicators
Development
# Clone and install dev dependencies
git clone https://github.com/arimetabot/rc-insights.git
cd rc-insights
pip install -e ".[dev,web]"
# Run linter
ruff check .
# Run tests
pytest
Contributing
Contributions welcome! Some ideas:
- More chart visualizations โ Plotly/matplotlib renderers for CLI output
- Multi-project dashboards โ Compare health across multiple RC projects
- Historical trend reports โ Week-over-week health score tracking
- Custom insight prompts โ Let users define their own AI analysis templates
- Zapier/n8n integration โ Webhook-based workflow triggers
License
MIT โ See LICENSE for details.
Built with โค๏ธ using RevenueCat Charts API v2 ยท RevenueCat OpenClaw Skill
๐ Take-Home Submission
This tool was built as a take-home project for RevenueCat's Agentic AI Developer & Growth Advocate role.
- Full Submission โ deliverables overview, live demo output, architecture
- Content Package โ blog post, social media posts
- Growth Campaign โ community strategy, budget allocation, measurement plan
- Process Log โ how this was built using a multi-agent AI workflow
- Video Demo โ 2-minute walkthrough with real data
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rc_insights-0.1.1.tar.gz.
File metadata
- Download URL: rc_insights-0.1.1.tar.gz
- Upload date:
- Size: 86.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49c6452d65919776e0cc2a71f8fcdc110afa201142646d7b6f22803c3f59e1a9
|
|
| MD5 |
335689eafc9683ea9e8229ecd5a06436
|
|
| BLAKE2b-256 |
d69991128ef30cd8c2bfc3a920afdbffaaf146188afb0ed2191eef13a0d7ac2d
|
File details
Details for the file rc_insights-0.1.1-py3-none-any.whl.
File metadata
- Download URL: rc_insights-0.1.1-py3-none-any.whl
- Upload date:
- Size: 46.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdf38b678c124c8959f72e5439718cc67b10a1c701f41e62225eb2c8a3637ae4
|
|
| MD5 |
8f3b0c58a358a2d0dc761a57aeea17da
|
|
| BLAKE2b-256 |
88d8144e27757ae85d3ef7f2ae457dbf375ec30795c3f53b8a54475502890d50
|