claude-count
v1.0.1
Published
A tool to count how many Claude tokens are in a file.
Readme
claude-count
A simple CLI tool to count tokens using the Anthropic API.
Installation
npm install -g claude-countOr use without installing:
npx claude-count [filename]Usage
First, set your Anthropic API key:
export ANTHROPIC_API_KEY=your_api_key_hereCount tokens in a file:
claude-count filename.txtCount tokens from stdin:
cat filename.txt | claude-countor
echo "Hello, world!" | claude-countLicense
Apache 2.0
