Token Counter

Obsidian o200k Tokens

Offline token counter for Obsidian using tiktoken o200k_base. Shows a compact X tokens in the bottom-right status bar (next to word/char counts). Fast on huge notes; worker-based, cached, and fully offline.

Features: On Save (default) / Idle (debounced) / Manual updates; optional selection tokens (Sel: A | File: B); auto-suppresses Idle on very large files; graceful fallbacks.

Install (quick):

  1. Quit Obsidian.
  2. Copy the plugin folder (with manifest.json, main.js, styles.css, tokenWorker.js, assets/tiktoken_bg.wasm) to <Vault>/.obsidian/plugins/obsidian-o200k-tokens/.
  3. Relaunch → Settings → Community Plugins → Enable o200k Tokens. (Build instead: npm i && npm run build, then copy dist/ to the same path.)

Settings: Update Mode; Debounce ms (default 1500); Large-file cutoff (200,000 chars); Show selection tokens (On); Tooltip (Off).

How to Install

  1. Download the template file from GitHub
  2. Move it anywhere in your vault
  3. Open it in Obsidian — done!

Stats

Stars

5

Forks

0

Last updated 6mo ago