Installation
Lumberjack supports Python 3.10 and newer. Its PyPI distribution is named lumberjack-py, while the Python import remains lumberjack and the command line program is lumber.
Install only the optional features your application needs:
| Feature | Command | Includes |
|---|---|---|
| Exact/model tokenizers | pip install "lumberjack-py[tokenizers]" |
tiktoken, transformers, and token caches |
| DOCX input | pip install "lumberjack-py[docx]" |
python-docx |
| XLSX input | pip install "lumberjack-py[spreadsheets]" |
openpyxl |
| Syntax-aware code input | pip install "lumberjack-py[code-parsing]" |
Tree-sitter grammars for Python, JS/TS, Bash, C/C++, C#, Go, Java, Kotlin, Lua, PHP, Ruby, Rust, Swift, and Zig |
| Web service | pip install "lumberjack-py[web]" |
FastAPI, Uvicorn, multipart support |
| Everything | pip install "lumberjack-py[all]" |
All optional features |
For contributors, install the repository with uv:
Next, follow the quickstart.