Show HN: A Claude Code token counter
Category: cli-tool
Tags: claude, token-counter, terminal-tool
Score: 5.0/10 (Innovation: 4, Technical: 5, Documentation: 6, Utility: 5)
A terminal-based token counter for Claude models that reuses the local Claude Code OAuth token from the macOS Keychain to call Anthropic's official count_tokens endpoint. It offers an interactive mode with live token counting, cost estimation, and image attachment support, as well as a scripting mode for automation.
Target audience: backend devs, devops
Repository: https://github.com/samjoch/tok
View on Hacker News