toll for Openclaw

A CLI utility to aggregate token usage logs and estimate USD costs for AI-assisted coding sessions.

fullstop000
v1.0.5
Mar 13, 2026
0
807
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install toll

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install toll using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is toll?

toll is a specialized command-line tool designed to provide developers with deep visibility into their AI resource consumption. It serves as an essential monitoring utility within the Openclaw Skills ecosystem for those using Claude Code or Codex CLI. The tool automates the process of reading local log files, calculating complex metrics like prompt cache hit rates, and providing estimated financial costs for model interactions.

By synthesizing data from various project directories, toll allows developers to manage their budgets and optimize their AI prompts for better caching performance. Whether you are tracking a single session or looking at all-time totals, it brings transparency to the often-opaque world of AI token billing.

toll Use Cases

  • Monitor daily AI expenditure to stay within project budgets.
  • Analyze the efficiency of prompt caching to reduce latency and costs.
  • Generate usage reports for teams to justify AI tool procurement.
  • Export session data for custom analytics and resource planning.

How toll Works

  1. Scans local directories for Claude Code and Codex CLI logs, specifically looking for jsonl and session files.
  2. Aggregates token counts categorized by input, output, and cached prompts.
  3. Applies a pricing model to the raw token counts to estimate the USD cost of each session.
  4. Filters the results based on user-provided flags for timeframes or specific AI tools.
  5. Presents a structured terminal table or machine-readable output for the user to review.

toll Setup

Install toll using the quick-install script or through the Rust package manager:

# Quick install (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/Fullstop000/toll/refs/heads/master/install.sh | sh

# Or via cargo
cargo install toll

toll Data Schema & Taxonomy

The tool reads from ~/.claude/projects/**/*.jsonl and ~/.codex/sessions/. It organizes statistics into the following schema:

Attribute Description
Sessions Number of distinct AI coding sessions tracked
Input Total raw tokens sent to the model
Cached Tokens successfully served from prompt cache
Hit Rate Percentage of input tokens served from cache
Net Input Billable input tokens (Input - Cached)
Output Tokens generated by the model
Cost Estimated USD cost based on per-model pricing

toll Advanced Features

  • Support for multi-tool log aggregation across different AI coding environments.
  • Detailed model pricing lookup via the --list-prices flag.
  • Temporal filtering using natural language-like flags such as --today or --days N.
  • Integration-ready output formats including CSV and JSON for automated reporting in Openclaw Skills workflows.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*