← 返回
开发者工具 中文

GreenClaw

Token usage analytics and budget alerting for the GreenClaw inference proxy. Query spending, set budget alerts, and track savings.
GreenClaw 推理代理的 Token 用量分析与预算告警。支持查询支出、设置预算告警及追踪节省金额。
srikanth235
开发者工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 502
下载
💾 6
安装
1
版本
#latest

概述

GreenClaw Usage Analytics

You have access to the greenclaw CLI tool for querying token usage, cost analytics, and managing budget alerts. Run it via npx greenclaw (requires pnpm install and pnpm build first). All commands output JSON.

Available Commands

Usage Queries

Daily summary:

 npx greenclaw usage summary --period day

Weekly or monthly summary:

 npx greenclaw usage summary --period week
 npx greenclaw usage summary --period month

Breakdown by model, tier, or provider:

 npx greenclaw usage breakdown --by model --period day
 npx greenclaw usage breakdown --by tier --period week
 npx greenclaw usage breakdown --by provider --period month

Trends over time:

 npx greenclaw usage trends --period day --last 7
 npx greenclaw usage trends --period week --last 4

Budget Alerts

List alert rules:

 npx greenclaw alerts list

Set a daily cost budget:

 npx greenclaw alerts set --name "daily budget" --metric daily_cost --threshold 50 --unit usd --period day

Set a weekly token limit:

 npx greenclaw alerts set --name "weekly tokens" --metric weekly_cost --threshold 100 --unit usd --period week

Set a per-model cost cap:

 npx greenclaw alerts set --name "gpt-4 cap" --metric per_model_cost --threshold 30 --unit usd --period day --model gpt-4

Check alerts now:

 npx greenclaw alerts check

View alert history:

 npx greenclaw alerts history --last 10

Remove an alert rule:

 npx greenclaw alerts remove <rule-id>

Raw Traces

Aggregated stats:

 npx greenclaw traces --stats

Filter by tier or model:

 npx greenclaw traces --tier HEARTBEAT
 npx greenclaw traces --model gpt-4o-mini

How to Present Results

  • Parse the JSON output and present it in a clear, readable format
  • For summaries: show total tokens, cost, savings, and request count
  • For breakdowns: show a table with group key, tokens, cost, savings
  • For alerts: explain which rules triggered and current metric values
  • Round dollar amounts to 2 decimal places
  • Use natural language to explain savings (e.g., "You saved $8.91 today by routing 412 requests through cheaper models")

Environment

The greenclaw CLI uses the GREENCLAW_TELEMETRY_DB environment variable for the SQLite database path (defaults to data/telemetry.db).

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-19 16:03 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,375
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,835
ai-intelligence

Clawflow

srikanth235
通过 OpenClaw 的消息传递和递归任务 DAG 实现多智能体协作的协议。用于协调多智能体工作。
★ 0 📥 2,221