Skip to content

Releases: likhithreddy/fittok

v0.4.0

Choose a tag to compare

@likhithreddy likhithreddy released this 15 Jun 23:03

fittok 0.4.0

New in this release

  • LLM answers by defaultfittok query streams an answer via claude-haiku-4-5 (ANTHROPIC_API_KEY) or gpt-4o-mini (OPENAI_API_KEY); falls back to raw code with a setup hint if no key is set
  • --code flag — opt-in raw relevant code output (previous default behaviour)
  • --budget N — cap the code slice to N tokens before sending to the LLM
  • fittok graph — interactive pyvis knowledge graph in the browser; --query highlights relevant nodes green
  • fittok --version — version flag
  • FITTOK_SHOW_SAVINGS defaults to true — 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

Choose a tag to compare

@likhithreddy likhithreddy released this 15 Jun 22:59
  • uvx fittok --version now works

v0.3.7 — handbook rewrite + version bump

Choose a tag to compare

@likhithreddy likhithreddy released this 15 Jun 22:56
  • 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

Choose a tag to compare

@likhithreddy likhithreddy released this 15 Jun 21:43
4198e68

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

Choose a tag to compare

@likhithreddy likhithreddy released this 15 Jun 01:36

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 add for the library).
  • Added clear 'how to add the MCP' steps (claude mcp add fittok -- uvx fittok + /mcp verify).
  • Fixed README env-var names to the real FITTOK_* (were stale CONTEXT_OPTIMIZER_*).

📦 https://pypi.org/project/fittok/0.3.1/

fittok v0.3.0

Choose a tag to compare

@likhithreddy likhithreddy released this 15 Jun 00:34

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.