Skip to content

cost

Terminal window
pnpm dlx @smplcty/ralph cost <logfile>
# or
npx @smplcty/ralph cost --all

Calculate and display token usage and estimated cost from ralph log files stored in .ralph-logs/.

UsageDescription
ralph cost <logfile>Single log file
ralph cost --task T-NNNAll logs for a specific task
ralph cost --allAll logs, grouped by task
ralph cost --totalGrand total only
ralph cost --update-tasksWrite cost into each DONE task

Tabular display with columns:

ColumnDescription
Input tokensTokens sent to the model
Cache WriteTokens written to prompt cache
Cache ReadTokens read from prompt cache
Output tokensTokens generated by the model
CostEstimated dollar cost