cost
pnpm dlx @smplcty/ralph cost <logfile># ornpx @smplcty/ralph cost --allCalculate and display token usage and estimated cost from ralph log files stored in .ralph-logs/.
| Usage | Description |
|---|---|
ralph cost <logfile> | Single log file |
ralph cost --task T-NNN | All logs for a specific task |
ralph cost --all | All logs, grouped by task |
ralph cost --total | Grand total only |
ralph cost --update-tasks | Write cost into each DONE task |
Output
Section titled “Output”Tabular display with columns:
| Column | Description |
|---|---|
| Input tokens | Tokens sent to the model |
| Cache Write | Tokens written to prompt cache |
| Cache Read | Tokens read from prompt cache |
| Output tokens | Tokens generated by the model |
| Cost | Estimated dollar cost |