pickfit

BrowseDeveloper CLIs

tcount

Local token counter for LLM files, directories and stdin via CLI and Go library.

Tested on macOS and Linux

Use it

macOS arm64

  1. brew install lancekrogers/tap/tcount

    brew install lancekrogers/tap/tcount

Check that it works

tcount /tmp/myfile.txt

The output should contain “o200k_base”.

First thing to try

cat > /tmp/myfile.txt <<'EOF'
Hello world! This is a test file for token counting.
The quick brown fox jumps over the lazy dog.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
EOF
cat /tmp/myfile.txt
tcount /tmp/myfile.txt

Run tcount <file> to see the token count for a file.

Linux x86_64

  1. install tcount via npm candidate

    npm install -g @obedience-corp/tcount

Check that it works

tcount --version

The output should contain “tcount version 0.7.0”.

First thing to try

cat > myfile.txt <<'EOF'
Hello world. This is a test file for token counting with tcount.
It contains a few sentences to count tokens locally.
EOF
cat > prompt.md <<'EOF'
# Sample prompt
Write a haiku about token counting in LLM workflows.
EOF
cat > document.md <<'EOF'
# Document
This is a sample document for JSON output testing. Token counting should be local and fast.
EOF
mkdir -p src && printf 'Hello from a\n' > src/a.txt && printf 'Second file with more content for counting tokens.\n' > src/b.txt && ls -R
tcount myfile.txt

Run tcount <file> to see the token count for a file.

What it does

  • Count tokens exactly with OpenAI tokenizers
    How to use it
    1. Run tcount <file> to see the exact o200k_base token count.
    Tested
  • Get approximate Claude and Gemini token counts
    How to use it
    1. Run tcount --model claude-sonnet-4.5 <file> for an approximate Claude count.
    2. Run tcount --model gemini-2.5-pro <file> for an approximate Gemini count.
    Tested
  • See how much of a context window is used
    How to use it
    1. Run tcount --model gpt-5 <file>.
    2. Read the Context Usage column in the output table.
    Tested
  • Count tokens across a directory tree
    How to use it
    1. Run tcount -d <directory> to count tokens in all files under it, including subfolders.
    Tested

How far pickfit got

macOS arm64

  1. Installs
  2. Starts
  3. 4 of 4 features work
  4. Works offline

Linux x86_64

  1. Installs
  2. Starts
  3. 4 of 4 features work
  4. Works offline

Windows: the project says it runs there; pickfit hasn’t tried it.

Good for

  • Count tokens in a file
  • Count tokens across an entire directory tree
  • Check context-window usage for a model
  • Count piped prompt tokens for scripts
  • Output token counts as JSON for scripting

How pickfit tested it

Each run starts from a clean machine and follows the steps above. How pickfit verifies

macOS arm64

Its main function works

  • Replayed from scratch
  • Works offline
  • Checked on 1 Nov 2026
  • Version 0.7.0

Linux x86_64

Its main function works

  • Replayed from scratch
  • Works offline
  • Checked on 30 Oct 2026
  • Version 0.7.0

How to read a tool card

Stitching
pickfit installed this tool itself. Everything under the stitches comes from that run. A tool pickfit has not run never gets stitches.
Verified on your OS
The install steps ran on the system you chose. “Ran on Linux only” means it has not been run on yours yet.
macOS, Linux and WindowsWhere it ran
Green OS marks: pickfit ran the install steps there. Grey ones: the README says it runs there, and pickfit has not tried.
How far the run got
Installs and starts, its main function works, its service answers, it produces model output. A window means a desktop app opened; a plug, an MCP client used it. The mark sits beside the run’s result, under “Why it fits and how we know” and in “How pickfit tested it”.
Visual check
pickfit looked at screenshots of the app. Green: it looks right. Amber with a number: things that look wrong; open it to see them. Grey and dashed: not checked yet.
Known vulnerabilities
Known high or critical vulnerabilities (OSV.dev) in what it installs. Green: none known. Red with a number: how many; open it for the list, and read it before you install. Grey and dashed: not checked, which does not mean safe.
About the run
The day it ran, and the version that ran.
Source of a reason
Every reason a pick fits rests on one profile field. Open the reason to see the field and the value it relies on.
Hidden gem
High quality, little known.
Quality and popularity
Two scores out of 100. Quality: how well it installed and worked when pickfit tried it, and how good its install docs and upkeep are. Popularity: from stars, downloads and Hacker News.
Features checked
Of the main features the README advertises, how many the run actually exercised (green), and how many failed (red). Grey ones were not checked, and the card says why.
Not verified
A well-known tool Fitz mentions from general knowledge. No run record, no steps, no score.