Skip to content

Commit 4c70329

Browse files
committed
feat: make tiktoken a required dependency
1 parent d42081b commit 4c70329

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

CLAUDE.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ treemapper . --tokens --copy # tokens + clipboard
7272
- `o200k_harmony` — GPT-4.1/newer models tokenizer
7373
- `cl100k_base` — GPT-4/GPT-3.5 tokenizer
7474

75-
**Installation:**
76-
```bash
77-
pip install treemapper[tokens] # exact counts with tiktoken
78-
pip install treemapper # fallback: chars/4 approximation
79-
```
80-
8175
Token count is displayed on stderr only when connected to a TTY (won't break pipes).
8276

8377
## Clipboard Support

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ classifiers = [
7474
dependencies = [
7575
"pathspec>=0.11,<2.0",
7676
"pyyaml>=6.0.2,<8.0",
77+
"tiktoken>=0.7,<1.0",
7778
]
7879

7980
[project.urls]
@@ -83,9 +84,6 @@ Homepage = "https://github.com/nikolay-e/treemapper"
8384
treemapper = "treemapper.treemapper:main"
8485

8586
[project.optional-dependencies]
86-
tokens = [
87-
"tiktoken>=0.7,<1.0",
88-
]
8987
dev = [
9088
# Testing
9189
"pytest>=7.0,<9.0",

0 commit comments

Comments
 (0)