From c5c7b64004c0f61be8bdf3c7c2c0389c86bce6d0 Mon Sep 17 00:00:00 2001 From: Okan Erturan Date: Mon, 24 Aug 2026 03:19:23 +0200 Subject: [PATCH] feat: add spend command Aggregate the full runs list into a workspace spend report: totals, spend by provider, top endpoints, top runs, and failed-run billing. Supports -j for agents. Claude-Session: https://claude.ai/code/session_01A72LKxMpKrLftv4VrPQgzA --- skills/monid/SKILL.md | 1 + src/api/types.ts | 32 ++++++++ src/commands/spend.ts | 146 ++++++++++++++++++++++++++++++++++++ src/index.ts | 2 + src/output/format.ts | 62 +++++++++++++++ test/commands/spend.test.ts | 96 ++++++++++++++++++++++++ 6 files changed, 339 insertions(+) create mode 100644 src/commands/spend.ts create mode 100644 test/commands/spend.test.ts diff --git a/skills/monid/SKILL.md b/skills/monid/SKILL.md index 111a190..f613fe3 100644 --- a/skills/monid/SKILL.md +++ b/skills/monid/SKILL.md @@ -135,6 +135,7 @@ Each command supports `--help` for full usage. Here's what's available: | `monid runs get` | Get run status and results (`-r `, `-w` to wait) | | `monid runs stop` | Stop an in-progress run (`-r `). Not all runs can be stopped | | `monid balance` | Show current workspace balance | +| `monid spend` | Summarize workspace spend by provider and endpoint | | `monid setup` | Complete CLI setup after installation (no API key required) | | `monid keys add` | Add an API key (`-k -l