About Trifle CLI
Trifle CLI is an MCP server published by trifle-io in the Data category: cLI for querying and pushing time-series metrics. Works with Trifle App API or local databases. MCP server mode for AI agents.
The repository has 1 stars and 0 forks, with the last commit 2 months ago. Recent commit activity is the strongest signal that reported issues will get attention.
Install
git clone https://github.com/trifle-io/trifle-cliThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Trifle CLI
Powered by Claude · Grounded in docs
Security checks
Static checks derived from the repository yesterday. Heuristics on the source, not an audit.
- ✓README presentThe repository ships documentation.
- ✓License declaredUsable under a stated license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedA lockfile pins dependency versions.
- ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
Releases
README
Trifle CLI
Query and push time-series metrics from your terminal. Works with Trifle App via API or directly against local databases (SQLite, Postgres, MySQL, Redis, MongoDB). Ships an MCP server mode for AI agent integration.
Part of the Trifle ecosystem.

Install
Homebrew (macOS/Linux):
brew install trifle-io/trifle/trifle
Shell script (macOS/Linux):
curl -sSL https://get.trifle.io | sh
Go:
go install github.com/trifle-io/trifle-cli@latest
Build locally (Go 1.24+):
go build -o trifle .
Quick Usage
Bootstrap Trifle App access
# Login (stores one global organization token in config)
trifle auth login --url https://app.trifle.io --email user@example.com --password '<password>'
# Create sources; the login token is global and is granted access to each new source
trifle source create project --name "Agent Project"
trifle source list
# Select the source on every source-bound API request
trifle metrics get --source-id <PROJECT_ID> --key event::signup --granularity 1h
# Optional: mint and save a token that can read across all sources
trifle token create --wildcard-read --save
# Optional: upload a local SQLite file when creating a database source
trifle source create database --display-name "SQLite Upload" --driver sqlite --sqlite-file ./metrics.sqlite
Query metrics from Trifle App
trifle metrics get \
--source-id <PROJECT_ID> \
--key event::signup \
--from 2026-02-10T00:00:00Z \
--to 2026-02-16T00:00:00Z \
--granularity 1h
Track metrics locally
# Set up a local SQLite database
trifle metrics setup --driver sqlite --db ./stats.db
# Push a metric
trifle metrics push --driver sqlite --db ./stats.db \
--key event::signup --values '{"count":1}'
# Query it back
trifle metrics get --driver sqlite --db ./stats.db \
--key event::signup \
--from 2026-02-10T00:00:00Z --to 2026-02-16T00:00:00Z \
--granularity 1h
Use with any database
# PostgreSQL
trifle metrics setup --driver postgres --dsn "postgres://user:pass@localhost:5432/myapp"
# MySQL
trifle metrics setup --driver mysql --host 127.0.0.1 --port 3306 --user root --database myapp
# MongoDB
trifle metrics setup --driver mongo --dsn mongodb://127.0.0.1:27017 --database myapp
# Redis
trifle metrics get --driver redis --prefix trifle:metrics --key event::signup \
--from 2026-02-10T00:00:00Z --to 2026-02-16T00:00:00Z --granularity 1h
MCP Server Mode
Run Trifle CLI as an MCP server so AI agents (Claude, GPT, etc.) can query and track metrics:
TRIFLE_URL=https://app.trifle.io \
TRIFLE_TOKEN=<ORG_TOKEN> \
TRIFLE_SOURCE_ID=<SOURCE_ID> \
trifle mcp
This enables AI agents to read your analytics, track their own token/cost usage, and generate insights through the standard MCP protocol.
Buffering
Configure write buffering for high-throughput local tracking:
trifle metrics push \
--driver postgres --dsn "postgres://localhost:5432/myapp" \
--key event::signup --values '{"count":1}' \
--buffer-mode auto \
--buffer-duration 2s \
--buffer-size 500 \
--buffer-aggregate
Documentation
Full reference at docs.trifle.io/trifle-cli
Trifle Ecosystem
| Component | What it does |
|---|---|
| Trifle App | Dashboards, alerts, scheduled reports, AI-powered chat. Cloud or self-hosted. |
| Trifle::Stats (Ruby) | Time-series metrics library for Ruby. |
| Trifle.Stats (Elixir) | Time-series metrics library for Elixir. |
| Trifle Stats (Go) | Time-series metrics library for Go. |
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/trifle-io/trifle-cli.
License
Available under the Elastic License 2.0. See LICENSE for details.
README fetched from the repository yesterday. The original is authoritative.