Releases: likhithreddy/fittok
Release list
v0.4.0
fittok 0.4.0
New in this release
- LLM answers by default —
fittok querystreams an answer viaclaude-haiku-4-5(ANTHROPIC_API_KEY) orgpt-4o-mini(OPENAI_API_KEY); falls back to raw code with a setup hint if no key is set --codeflag — opt-in raw relevant code output (previous default behaviour)--budget N— cap the code slice to N tokens before sending to the LLMfittok graph— interactive pyvis knowledge graph in the browser;--queryhighlights relevant nodes greenfittok --version— version flagFITTOK_SHOW_SAVINGSdefaults totrue— savings footer on every MCP answer out of the box- docs/HANDBOOK.md — concise all-commands reference: MCP, CLI, library, plugin, env vars
Upgrade
```bash
uv cache clean fittok
uvx fittok --version # → fittok 0.4.0
```
v0.3.8 — add --version flag
uvx fittok --versionnow works
v0.3.7 — handbook rewrite + version bump
- Rewrote docs/HANDBOOK.md: concise all-commands reference (MCP, CLI, library, plugin) on one page
- Version bump (0.3.6 was already on PyPI)
v0.3.6 — LLM answers, graph visualization, command handbook
What's new
LLM answers in the CLI
fittok query now streams an LLM answer by default — no flags needed:
```bash
uvx fittok query "how does auth work" # streams answer
uvx fittok query "how does auth work" --code # raw relevant code
uvx fittok query "how does auth work" --budget 1500 # cap slice size
```
Set one key and it just works:
- `ANTHROPIC_API_KEY` → claude-haiku-4-5 (recommended)
- `OPENAI_API_KEY` → gpt-4o-mini (fallback)
No key? fittok falls back to `--code` and prints a setup hint.
Interactive code graph
```bash
uvx fittok graph # full graph in browser
uvx fittok graph --query "auth" # highlight relevant nodes green
```
Requires: `uv pip install "fittok[ui]"`
Savings footer on by default
`FITTOK_SHOW_SAVINGS` now defaults to `true` — every MCP answer includes a `🪙 saved X%` footer. Set to `false` to disable.
Command handbook
Full Oracle-style reference for every subcommand, flag, env var, and exit code: docs/HANDBOOK.md
Upgrade
```bash
uv cache clean fittok # clears cached version, next uvx run pulls 0.3.6
```
fittok v0.3.1
Docs-accuracy release. No code/behavior change from 0.3.0.
- All install/usage docs unified on
uv/uvx(one tool for MCP + CLI;uv addfor the library). - Added clear 'how to add the MCP' steps (
claude mcp add fittok -- uvx fittok+/mcpverify). - Fixed README env-var names to the real
FITTOK_*(were staleCONTEXT_OPTIMIZER_*).
fittok v0.3.0
fittok retrieves only the relevant source code for a question — instead of the model reading whole files — so an LLM answers codebase questions on a small, focused slice of context. Less input = fewer tokens, lower cost.
📦 PyPI: https://pypi.org/project/fittok/0.3.0/
Install
- MCP (recommended):
{ "mcpServers": { "fittok": { "command": "uvx", "args": ["fittok"] } } } - CLI:
pipx install fittok(or venv +pip install fittok) - Library:
from fittok import optimize
What it does
graphify (tree-sitter knowledge graph) → slurp (semantic + TF-IDF + PageRank selection within a relevance cliff) → readable code slice → the model answers from it. Graphs + embeddings cached on disk; only changed code re-embeds.
Token savings (honest)
~80–90% reduction on input context (deterministic, in the savings footer). On a thorough model, a broad question cost ~84k total tokens without fittok vs ~27k with it (it avoided a 58k-token file-exploration subagent). Measure by the footer or your API bill — not Claude Code's /context Messages, which excludes subagent tokens.
Supports Python, JS, JSX, TS, TSX, Java, Go, Rust. Requires Python ≥ 3.10.