Usage
tkm .
tkm /path/to/project
tkm --top 20 .
tkm --json .
tkm --input-price 1 --output-price 5 .
tkm --output-tokens 1000 .
Run in PowerShell. Downloads the latest release, creates a local folder, and adds
tkm to your user PATH.
irm https://raw.githubusercontent.com/otechmista/token-meter/main/install/install.ps1 | iex
Restart PowerShell, then verify:
tkm .
To upgrade, run the same install command again — it replaces the existing binary.
tkm .
tkm /path/to/project
tkm --top 20 .
tkm --json .
tkm --input-price 1 --output-price 5 .
tkm --output-tokens 1000 .
--top 20 — show more heavy files. Default: 10.
--input-price 1 — price per 1M input tokens. Default: 1.
--output-price 5 — price per 1M output tokens. Default: 5.
--output-tokens 1000 — expected output tokens for cost estimate. Default: 0.
--json — emit results as JSON.
Results are split into summary, cost estimate, heavy files, and heavy folders. All values are estimates — actual costs vary by provider pricing, tokenizer, model, cache, and response size.
TokenMeter report
C:\projects\app
Summary
Encoding: cl100k_base
Files: 7
Lines: 926
Tokens: 8350
Architecture weight: light
Cost estimate
Input tokens: 8350
Output tokens: 0
Input price: $1.00 / 1M tokens
Output price: $5.00 / 1M tokens
Input cost: $0.0083
Output cost: $0.0000
Total cost: $0.0083
Heavy files
3415 tokens 437 lines main.go
2860 tokens 185 lines docs/index.html
Heavy folders
5212 tokens 698 lines 5 files /
2860 tokens 185 lines 1 files docs
On Windows, color output is off by default to avoid broken ANSI codes in older PowerShell versions. Enable it with:
$env:TOKENMETER_COLOR=1
tkm .
To disable color on any system:
NO_COLOR=1 tkm .