cli-cost-usage

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->
<!-- 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.
在 CLI 中查看成本明细、Token 用量和调用日志。可按 provider、model 或日期范围进行筛选。导出用量报告,并查看每个连接的支出情况。

Quick install

快速安装

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

Subcommands

子命令

cost

cost

Flags:
  • --period <range>
  • --since <date>
  • --until <date>
  • --group-by <field>
  • --api-key <key>
  • --limit <n>
Example:
bash
omniroute cost
参数:
  • --period <range>
  • --since <date>
  • --until <date>
  • --group-by <field>
  • --api-key <key>
  • --limit <n>
示例:
bash
omniroute cost

pricing

pricing

Example:
bash
omniroute pricing
示例:
bash
omniroute pricing

pricing sync

pricing sync

Flags:
  • --provider <p>
  • --force
Example:
bash
omniroute pricing sync
参数:
  • --provider <p>
  • --force
示例:
bash
omniroute pricing sync

pricing list

pricing list

Flags:
  • --provider <p>
  • --model <m>
  • --limit <n>
Example:
bash
omniroute pricing list
参数:
  • --provider <p>
  • --model <m>
  • --limit <n>
示例:
bash
omniroute pricing list

pricing get <model>

pricing get <model>

Example:
bash
omniroute pricing get <model>
示例:
bash
omniroute pricing get <model>

pricing defaults

pricing defaults

Example:
bash
omniroute pricing defaults
示例:
bash
omniroute pricing defaults

pricing show

pricing show

Example:
bash
omniroute pricing show
示例:
bash
omniroute pricing show

pricing set

pricing set

Flags:
  • --input <p>
  • --output <p>
  • --cache-read <p>
  • --cache-write <p>
Example:
bash
omniroute pricing set
参数:
  • --input <p>
  • --output <p>
  • --cache-read <p>
  • --cache-write <p>
示例:
bash
omniroute pricing set

pricing diff

pricing diff

Flags:
  • --model <m>
Example:
bash
omniroute pricing diff
参数:
  • --model <m>
示例:
bash
omniroute pricing diff

usage

usage

Example:
bash
omniroute usage
示例:
bash
omniroute usage

usage analytics

usage analytics

Flags:
  • --period <range>
  • --provider <id>
Example:
bash
omniroute usage analytics
参数:
  • --period <range>
  • --provider <id>
示例:
bash
omniroute usage analytics

usage budget

usage budget

Example:
bash
omniroute usage budget
示例:
bash
omniroute usage budget

usage list

usage list

Example:
bash
omniroute usage list
示例:
bash
omniroute usage list

usage get [scope]

usage get [scope]

Example:
bash
omniroute usage get [scope]
示例:
bash
omniroute usage get [scope]

usage set <amount>

usage set <amount>

Flags:
  • --scope <s>
  • --period <p>
Example:
bash
omniroute usage set <amount>
参数:
  • --scope <s>
  • --period <p>
示例:
bash
omniroute usage set <amount>

usage reset [scope]

usage reset [scope]

Example:
bash
omniroute usage reset [scope]
示例:
bash
omniroute usage reset [scope]

usage quota

usage quota

Flags:
  • --provider <id>
  • --check
Example:
bash
omniroute usage quota
参数:
  • --provider <id>
  • --check
示例:
bash
omniroute usage quota

usage logs

usage logs

Flags:
  • --limit <n>
  • --search <q>
  • --since <ts>
  • --follow
  • --api-key <k>
Example:
bash
omniroute usage logs
参数:
  • --limit <n>
  • --search <q>
  • --since <ts>
  • --follow
  • --api-key <k>
示例:
bash
omniroute usage logs

usage utilization

usage utilization

Flags:
  • --api-key <k>
Example:
bash
omniroute usage utilization
参数:
  • --api-key <k>
示例:
bash
omniroute usage utilization

usage history

usage history

Flags:
  • --limit <n>
Example:
bash
omniroute usage history
参数:
  • --limit <n>
示例:
bash
omniroute usage history

usage proxy-logs

usage proxy-logs

Flags:
  • --limit <n>
Example:
bash
omniroute usage proxy-logs
参数:
  • --limit <n>
示例:
bash
omniroute usage proxy-logs