OC

onflyapp/cli

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

0 stars 0 forks Качество 64 Тренд 14NOASSERTION

Onfly: a searchable, structural map of your codebase for AI assistants, served over MCP.

Обзор

Measured with Claude Code on five repositories (three runs per task; details in docs/evaluation.md): - Best case, on two medium repositories with questions about behavior: about 10% fewer turns and less time, 12 to 16% fewer output tokens, 6% less context sent to the model. - On the other three there was no gain: the assistant rarely called Onfly and found answers with Grep or Read. - Cost savings were not measured reliably (prompt caching dominates) and are unproven. Stop burning thousands of tokens on whole-file Reads and noisy Greps. Onfly is a CGO-free Go CLI and MCP server that parses your code into language-aware chunks with WebAssembly parsers, then gives Claude Code, Cursor or any MCP client two tools: (a file's skeleton, who calls it, what it calls, your project rules) and (the best-matching code plus what it uses), each in one round-trip.

README

Показан фрагмент оригинального README. Открыть оригинал.

Onfly: a context compressor for AI coding agents

Experimental. Retrieval and agent benchmarks on six code bases, with the numbers and their limits, are in Evaluation and summarized below. Savings in agent runs depend on how often the assistant calls Onfly instead of Grep and Read; cost savings are not measured.

Onfly is a single Go binary with no CGO. It parses your code into chunks with WebAssembly parsers (wazero), keeps them in SQLite (or Postgres), and gives Claude Code, Cursor or any MCP client two tools, each answering in one round-trip: onfly_xray returns a file’s skeleton, who calls it, what it calls and your project rules, and onfly_focus returns the best-matching code and what it uses. Search is local-first and hybrid: names, text and paths, plus vectors from Ollama (qwen3-embedding) for questions that describe behavior in words the code does not use. A call comes back smaller than the files it replaces; onfly stats shows the estimate.

Why not just Read and Grep?

Native agent flow With Onfly
Understand a file Read the whole file, every method body onfly_xray: signatures, attributes and docblocks kept, long bodies collapsed to // ... [body omitted: original lines 12-58, ~47 lines, ~410 tokens; focus_symbol="Name" expands it] ..., every line numbered as in the file
Who calls this? Several Greps, then Read each hit called_by and calls in the same answer, resolved through imports, parameter and property types, so strings.Split is not your Split; the entrypoint two hops up is on the same line
Find a flow Grep for guessed words, read the false hits onfly_focus: ranked by name and meaning, full code of the best few plus signatures of what they use
Project conventions Whatever the model remembered from CLAUDE.md The rules that match the returned paths ride along, once per session
Cost visibility None onfly stats totals the estimated tokens saved

Quickstart

You need Go 1.27+ to build Onfly. An embedder is optional: without one, names, text and paths are searched and everything else works; Ollama (free, local) adds search by meaning.

git clone https://github.com/OnFlyApp/cli onfly && cd onfly && make build   # bin/onfly; put it on your PATH
ollama pull qwen3-embedding:0.6b                                            # the default embedder, once

cd ~/code/my-project
onfly init            # .onfly/config.yaml, .onfly/ in .gitignore, parsers for the languages it finds, first index
onfly setup claude    # register the MCP server in .mcp.json and write the guide into CLAUDE.md

Restart Claude Code and ask about your code.

Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →