gt-cost
v0.1.0
Published
Cost aggregation tool for Gas Town multi-agent workflows
Maintainers
Readme
gt-cost
Cost aggregation tool for Gas Town multi-agent workflows.
The Problem
Gas Town can spawn 20-30 concurrent Claude agents. Each one burns tokens independently. Without tracking, you could spend $50-100 in an hour without realizing it.
The Solution
gt-cost reads Gas Town activity logs and aggregates costs by:
- Rig (project)
- Convoy (batch of related work)
- Agent (individual polecat)
Installation
npm install -g gt-costUsage
# Overall cost report
gt-cost
# Costs in last 24 hours
gt-cost --since 1d
# Costs for specific rig
gt-cost --rig token-guard
# Top 5 convoys by cost
gt-cost convoys --top 5
# Agent costs this week
gt-cost agents --since 1w
# JSON output for scripting
gt-cost --format jsonCommands
| Command | Description |
|---------|-------------|
| report | Show overall cost report (default) |
| rigs | List rigs with costs |
| convoys | List convoys with costs |
| agents | List agents with costs |
| watch | Live cost monitoring (coming soon) |
Options
| Option | Description |
|--------|-------------|
| --rig <name> | Filter by rig |
| --convoy <name> | Filter by convoy |
| --since <date> | Start date (ISO or relative: 1h, 1d, 1w) |
| --until <date> | End date |
| --format <type> | Output format: text, json |
| --top <n> | Show top N items (default: 10) |
Example Output
═══════════════════════════════════════════════════
Gas Town Cost Report
═══════════════════════════════════════════════════
Period: 1/3/2026 - 1/4/2026
TOTALS
───────────────────────────────────────────────
Total Cost: $47.23
Total Tokens: 2.1M
Input: 450k
Output: 1.65M
BY RIG
───────────────────────────────────────────────
token-guard $18.50 (39%)
ai-code-audit $15.20 (32%)
mcp-servers $13.53 (29%)
BY CONVOY
───────────────────────────────────────────────
feature-auth $12.30 (token-guard)
bug-fixes $8.40 (ai-code-audit)
═══════════════════════════════════════════════════How It Works
- Reads Gas Town's activity logs from
~/gt - Parses Beads issue metadata for token counts
- Reads polecat stats files
- Aggregates by rig, convoy, and agent
- Applies model-specific pricing
Related Tools
- token-guard - Per-command token monitoring
- Gas Town - Multi-agent orchestrator
License
MIT
