Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

tkusage

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tkusage

Unified local usage and cost estimation CLI for Claude Code and Codex

Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
20
150%
Maintainers
1
Weekly downloads
 
Created
Source

tkusage

Unified local usage and estimated cost reporting for Claude Code and Codex.

tkusage is a standalone CLI. It reads local logs directly from ~/.claude/projects and ~/.codex/sessions, so normal report generation is fully offline.

The first run builds a local cache from your transcript/session files. Later runs reuse that cache and are much faster.

Commands

# merged daily report
npx tkusage daily

# monthly report for one source
npx tkusage monthly 2026-03 --source codex

# session report
npx tkusage session --source all --compact

# one-line bar/status output
npx tkusage statusline

Flags

--source all|claude|codex
--since YYYY-MM-DD
--until YYYY-MM-DD
--timezone America/Los_Angeles
--locale en-US
--json
--compact
--breakdown
--claude-home /path/to/.claude
--codex-home /path/to/.codex
--format plain|json   # statusline only

Notes

  • Cost is an estimated USD equivalent derived from embedded token pricing tables.
  • It is not the same thing as your actual ChatGPT/Codex subscription billing or Anthropic invoice.
  • Claude usage is deduplicated by requestId because transcript logs can repeat the same assistant usage entry more than once.

Keywords

claude-code

FAQs

Package last updated on 10 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts