跳到正文
Skillpedia
分析与电子表格84k · #1402

cli-cost-usage

它能做什么

这项技能展示如何通过命令行查看 AI 花费和令牌用量。适合想知道每次模型调用花了多少钱、钱主要花在哪里的人。

适用场景

  • ✓当用户询问 AI 用量花了多少钱的时候。
  • ✓当用户想按提供商、模型或日期查看令牌用量明细的时候。
  • ✓当用户想导出用量报告或查看调用日志的时候。

技能链接

https://github.com/cheaper-inference/OmniRoute/blob/release/v3.8.53/skills/cli-cost-usage/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/cheaper-inference/OmniRoute/blob/release/v3.8.53/skills/cli-cost-usage/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我上个月在 AI 调用上花了多少钱?请按模型分组显示。”

每周 5 个新技能,1 分钟读完。

工作原理

这项技能列出按字段分组查看费用的命令,例如提供商或模型,并可限定日期范围。它还涵盖价格查询、用量查看和调用日志。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->

Overview

View cost breakdowns, token usage, and call logs from the CLI. Filter by provider, model, or date range. Export usage reports and inspect per-connection spending.

Quick install

npm install -g omniroute   # or: npx omniroute
omniroute --version

Subcommands

cost

Flags:

  • --period <range>
  • --since <date>
  • --until <date>
  • --group-by <field>
  • --api-key <key>
  • --limit <n>

Example:

omniroute cost

pricing

Example:

omniroute pricing

pricing sync

Flags:

  • --provider <p>
  • --force

Example:

omniroute pricing sync

pricing list

Flags:

  • --provider <p>
  • --model <m>
  • --limit <n>

Example:

omniroute pricing list

pricing get <model>

Example:

omniroute pricing get <model>

pricing defaults

Example:

omniroute pricing defaults

pricing show

Example:

omniroute pricing show

pricing set

Flags:

  • --input <p>
  • --output <p>
  • --cache-read <p>
  • --cache-write <p>

Example:

omniroute pricing set

pricing diff

Flags:

  • --model <m>

Example:

omniroute pricing diff

usage

Example:

omniroute usage

usage analytics

Flags:

  • --period <range>
  • --provider <id>

Example:

omniroute usage analytics

usage budget

Example:

omniroute usage budget

usage list

Example:

omniroute usage list

usage get [scope]

Example:

omniroute usage get [scope]

usage set <amount>

Flags:

  • --scope <s>
  • --period <p>

Example:

omniroute usage set <amount>

usage reset [scope]

Example:

omniroute usage reset [scope]

usage quota

Flags:

  • --provider <id>
  • --check

Example:

omniroute usage quota

usage logs

Flags:

  • --limit <n>
  • --search <q>
  • --since <ts>
  • --follow
  • --api-key <k>

Example:

omniroute usage logs

usage utilization

Flags:

  • --api-key <k>

Example:

omniroute usage utilization

usage history

Flags:

  • --limit <n>

Example:

omniroute usage history

usage proxy-logs

Flags:

  • --limit <n>

Example:

omniroute usage proxy-logs
常见问题

我能只看某一个提供商的费用吗?

可以。你可以按提供商、模型或日期范围进行筛选。

我能更新所使用的价格吗?

可以。价格命令包括同步选项,以及设置自定义价格的选项。

我能导出报告吗?

可以。这项技能涵盖导出用量报告的方法。

详情

作者的原始描述

View cost breakdowns, token usage, and call logs from the CLI. Filter by provider, model, or date range. Export usage reports and inspect per-connection spending.

repo: cheaper-inference/OmniRoute

热度

GitHub 星标
84k
排名
#1402
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能