LaunchKit · 2026
Back to Skills

claude-usage-cli

Query Claude API usage and cost reports from the command line.

0
855 downloads
by @cyberash-dev

Setup & Installation

openclaw skills install @cyberash-dev/claude-usage-cli

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install claude-usage-cli

Version History

v0.2.0Feb 13, 2026 - Version note by skill developer:

DEPRECATED: Use claude-cost-cli instead. This skill is no longer maintained.

What This Skill Does

CLI tool for querying Anthropic Admin API usage and cost reports from the terminal. Stores the Admin API key in macOS Keychain. Outputs data as formatted tables or JSON. Note: this package is deprecated; claude-cost-cli is the maintained replacement.

Storing credentials in macOS Keychain avoids plaintext API key files that other CLI tools often require.

When to use it

  • Check daily token spend across Claude models
  • Pull last 30 days of cost data into a script
  • Filter usage by specific API key IDs
  • Get hourly granularity on a busy billing period
  • Verify total monthly spend before invoice arrives

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: how much did I spend on Claude last month?

AGENT
  1. 1Run `claude-usage config set-key` to store Admin API key in Keychain
  2. 2Run `claude-usage cost --period 30d` to fetch last 30 days of cost data
  3. 3Review table output showing Date, Description, Model, Amount (USD), Token Type, and Tier
  4. 4Run `claude-usage cost --period 30d --sum` to get a single total figure
OUTPUT

Table of daily cost breakdown by model plus a total USD figure for the past 30 days

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

Anthropic Admin API key (sk-ant-admin...) from Claude Console → Settings → Admin KeysmacOS (Keychain storage is macOS-only)