████████╗██████╗ ██╗███████╗██╗ ███████╗
╚══██╔══╝██╔══██╗██║██╔════╝██║ ██╔════╝
██║ ██████╔╝██║█████╗ ██║ █████╗
██║ ██╔══██╗██║██╔══╝ ██║ ██╔══╝
██║ ██║ ██║██║██║ ███████╗███████╗
╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚══════╝╚══════╝
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Track what matters. Skip the infrastructure.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Time-series metrics platform that works with your existing database. Track counters, revenue, and hierarchical data across Ruby, Elixir, and Go — no new infrastructure to deploy, monitor, or pay for.
┌──────────────────────────────────────────────────────────────────────┐
│ │
│ Your App Trifle App │
│ ┌──────────┐ ┌─────────────────────────────┐ │
│ │ Ruby │ │ Dashboards │ Alerts │ │
│ │ Elixir │ │ Digests │ AI Chat │ │
│ │ Go │ │ Explore │ REST API │ │
│ └──────────┘ └──────┬────────────────▲─────┘ │
│ │ │ │ │
│ │ │ API │ │
│ │ track() ┌───────────┐ │ │ │
│ └─────────►│ Your │◄─────┘ ┌──────┴──────┐ │
│ │ Database │◄──────────────►│ Trifle CLI │ │
│ │ │ direct DB │ & MCP │ │
│ │ Postgres │ (optional) │ Server │ │
│ │ Redis │ └─────────────┘ │
│ │ MongoDB │ │
│ │ MySQL │ │
│ │ SQLite │ │
│ └───────────┘ │
│ │
└──────────────────────────────────────────────────────────────────────┘
| Repository | Language | What it does | |
|---|---|---|---|
| Trifle::Stats | trifle-stats |
Ruby | Time-series metrics with pluggable database drivers. One call tracks nested, multi-dimensional counters with automatic rollup across time granularities. |
| Trifle.Stats | trifle_stats |
Elixir | Same storage format, same drivers, pipe-friendly Series API. Powers the Trifle App. |
| TrifleStats | trifle_stats_go |
Go | Same storage format, buffered writes, powers the CLI. |
| Trifle::Traces | trifle-traces |
Ruby | Structured execution tracing for background jobs. Captures timestamps, messages, state, and return values. |
| Trifle::Logs | trifle-logs |
Ruby | File-based structured logging with ripgrep-powered search. |
| Trifle::Docs | trifle-docs |
Ruby | Markdown-to-URL documentation router for Rack, Rails, and Sinatra. |
| Repository | What it does | |
|---|---|---|
| Trifle App | trifle |
Dashboards, alerts, scheduled digests, and AI chat. Self-hosted via Docker or Kubernetes. |
| Trifle CLI | trifle-cli |
Query and push metrics from the terminal — directly against your database or through the Trifle App API. MCP server mode lets AI agents access your data. |
Ruby — add metrics to your app in 5 minutes:
# Gemfile
gem 'trifle-stats'
# config/initializers/trifle.rb
Trifle::Stats.configure do |config|
config.driver = Trifle::Stats::Driver::Postgres.new
config.track_granularities = %i[1m 10m 1h 6h 1d 1w 1mo]
end
# anywhere in your app
Trifle::Stats.track(
'orders',
at: Time.now,
values: { count: 1, revenue: 49_99, country: { us: 1 } }
)Terminal — query metrics instantly:
brew install trifle-io/trifle/trifle
trifle metrics get --key orders --granularity 1d ╔══════════════════════════════════════════════════════════════╗
║ ║
║ Use the database you already have. ║
║ ║
║ PostgreSQL, Redis, MongoDB, MySQL, or SQLite — pick the ║
║ one that's already running. No InfluxDB. No TimescaleDB. ║
║ No dedicated time-series infrastructure to deploy, ║
║ monitor, or pay for. ║
║ ║
║ Small libraries that do one thing well. Start with just ║
║ the library. Add the App when you need dashboards. Add ║
║ the CLI when you need terminal access or AI agents. ║
║ ║
╚══════════════════════════════════════════════════════════════╝