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 --versionbash
npm install -g omniroute # 或:npx omniroute
omniroute --versionSubcommands
子命令
cost
costcost
costFlags:
--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 costpricing
pricingpricing
pricingExample:
bash
omniroute pricing示例:
bash
omniroute pricingpricing sync
pricing syncpricing sync
pricing syncFlags:
--provider <p>--force
Example:
bash
omniroute pricing sync参数:
--provider <p>--force
示例:
bash
omniroute pricing syncpricing list
pricing listpricing list
pricing listFlags:
--provider <p>--model <m>--limit <n>
Example:
bash
omniroute pricing list参数:
--provider <p>--model <m>--limit <n>
示例:
bash
omniroute pricing listpricing get <model>
pricing get <model>pricing get <model>
pricing get <model>Example:
bash
omniroute pricing get <model>示例:
bash
omniroute pricing get <model>pricing defaults
pricing defaultspricing defaults
pricing defaultsExample:
bash
omniroute pricing defaults示例:
bash
omniroute pricing defaultspricing show
pricing showpricing show
pricing showExample:
bash
omniroute pricing show示例:
bash
omniroute pricing showpricing set
pricing setpricing set
pricing setFlags:
--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 setpricing diff
pricing diffpricing diff
pricing diffFlags:
--model <m>
Example:
bash
omniroute pricing diff参数:
--model <m>
示例:
bash
omniroute pricing diffusage
usageusage
usageExample:
bash
omniroute usage示例:
bash
omniroute usageusage analytics
usage analyticsusage analytics
usage analyticsFlags:
--period <range>--provider <id>
Example:
bash
omniroute usage analytics参数:
--period <range>--provider <id>
示例:
bash
omniroute usage analyticsusage budget
usage budgetusage budget
usage budgetExample:
bash
omniroute usage budget示例:
bash
omniroute usage budgetusage list
usage listusage list
usage listExample:
bash
omniroute usage list示例:
bash
omniroute usage listusage get [scope]
usage get [scope]usage get [scope]
usage get [scope]Example:
bash
omniroute usage get [scope]示例:
bash
omniroute usage get [scope]usage set <amount>
usage set <amount>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]usage reset [scope]
usage reset [scope]Example:
bash
omniroute usage reset [scope]示例:
bash
omniroute usage reset [scope]usage quota
usage quotausage quota
usage quotaFlags:
--provider <id>--check
Example:
bash
omniroute usage quota参数:
--provider <id>--check
示例:
bash
omniroute usage quotausage logs
usage logsusage logs
usage logsFlags:
--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 logsusage utilization
usage utilizationusage utilization
usage utilizationFlags:
--api-key <k>
Example:
bash
omniroute usage utilization参数:
--api-key <k>
示例:
bash
omniroute usage utilizationusage history
usage historyusage history
usage historyFlags:
--limit <n>
Example:
bash
omniroute usage history参数:
--limit <n>
示例:
bash
omniroute usage historyusage proxy-logs
usage proxy-logsusage proxy-logs
usage proxy-logsFlags:
--limit <n>
Example:
bash
omniroute usage proxy-logs参数:
--limit <n>
示例:
bash
omniroute usage proxy-logs