tokenmeter for Openclaw

A local, privacy-first CLI tool for Openclaw Skills that tracks LLM token consumption and provides real-time cost analysis across multiple providers.

cheenu1092-oss
v0.1.1
Feb 10, 2026
0
1.5k
3

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install tokenmeter

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 tokenmeter 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 tokenmeter?

tokenmeter is a specialized utility designed for developers to maintain full visibility over their AI resource consumption. By integrating directly with Openclaw Skills, it parses local session logs to calculate API-equivalent costs, helping users understand exactly how much they are saving on subscription plans like Claude Max.

The tool operates entirely locally using a private SQLite database, ensuring that your usage patterns and token data remain secure and telemetry-free. It provides a unified tracking layer for anyone running multiple AI agents or utilizing high-volume prompt caching.

tokenmeter Use Cases

  • Tracking real-time AI expenditure to compare against fixed subscription costs.
  • Identifying high-cost models within Openclaw Skills workflows to optimize performance.
  • Aggregating usage metrics from multiple bot instances into a single dashboard.
  • Auditing prompt caching efficiency to maximize 90% discount savings on cache reads.

How tokenmeter Works

  1. The tool identifies and scans local session directories generated by Openclaw Skills.
  2. It imports raw JSONL session data into a local SQLite database at ~/.tokenmeter/usage.db.
  3. The system maps token counts to specific provider pricing models, including complex cache read/write logic.
  4. Users can generate on-demand reports, dashboards, or cost breakdowns by period (day, week, month).
  5. The agent interprets these technical reports to provide human-readable summaries of financial savings.

tokenmeter Setup

The installation process is typically handled automatically by the agent when you first request usage data. For manual setup, use the following commands:

# Clone the repository
git clone https://github.com/jugaad-lab/tokenmeter.git ~/clawd/tokenmeter

# Setup the virtual environment and install dependencies
cd ~/clawd/tokenmeter
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

# Run the initial session discovery and import
tokenmeter scan
tokenmeter import --auto

tokenmeter Data Schema & Taxonomy

tokenmeter organizes data locally to ensure privacy and speed. The following table describes the primary data structures:

Component Type Description
usage.db SQLite Persistent local storage for all token transactions and costs.
Session Logs JSONL Source data retrieved from Openclaw Skills agent directories.
Model Pricing Python Internal taxonomy of API rates (Input, Output, Cache R/W) for Anthropic, OpenAI, and Google.
App Metadata String Tags usage data by bot name (e.g., cheenu, chhotu) for multi-agent tracking.

tokenmeter Advanced Features

  • Automated session discovery via the scan command to find logs from various AI tools.
  • Support for multi-bot environments using specific application flags for segregated reporting.
  • Detailed prompt caching analytics to track the financial impact of context reuse.
  • Idempotent import logic that prevents duplicate entries even when running frequent syncs.
  • Customizable pricing configuration to stay updated with the latest LLM provider rates.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*