CliCommandsModule · packages/server/src/cli/commands/cost.ts:153

CostCommand

component

penguin cost, as a contribution to the CLI's CliCommandsModule.commands from this package (the server resource API's client); the CLI's boot collects it.

API

@Component({
  contributes: {
    "CliCommandsModule.commands": [
      {
        id: "cli.cost",
        key: "cost",
        summary: {
          en: "Show token usage and cost (summary card by default; --by prints a grouped table)",
          zh: "查看 Token 用量与成本(缺省打印汇总卡片;--by 打印分组表格)",
        },
      },
    ],
  },
})
export class CostCommand {
  @Bind("cli.cost") command!: CliCommandCode<Messages>;
  setup();
}

Dependencies & Wiring

Extracted from class decorators
@Bindbinds (1)
command → cli.cost: CliCommandCode<Messages>

Contributes

{
  "CliCommandsModule.commands": [
    {
      "id": "cli.cost",
      "key": "cost",
      "summary": {
        "en": "Show token usage and cost (summary card by default; --by prints a grouped table)",
        "zh": "查看 Token 用量与成本(缺省打印汇总卡片;--by 打印分组表格)"
      }
    }
  ]
}

Target slots: CliCommandsModule.commands

Methods (1)

setup

setup()