@filium/flite-js
v0.2.0
Published
Byte-exact, token-saving source editor — a compiled wasm core (resilient sectioning + byte-exact splicing) plus fs. Ships as a library and as an MCP server (bin: filium-flite-mcp). Runs in Node and Deno.
Maintainers
Readme
filium-flite-js
Byte-exact, token-saving source editor — a compiled wasm core (resilient
sectioning + byte-exact splicing) plus file I/O. The standalone tool behind the
filium-flite Claude Code plugin. Runs in Node and Deno.
import { Session } from "@filium/flite-js";
const s = new Session();
const outline = await s.open("src/big.rs"); // sections (id, heading, lines, balanced) — not the whole file
const text = s.zoom("src/big.rs", outline[3].id); // read just one section
s.edit("src/big.rs", outline[3].id, newBody); // replace it byte-exact; rest untouched
await s.save("src/big.rs"); // refuses if the file changed on disk since openReading a 10k-line file to change one function costs ~20k tokens; open → zoom → edit
costs a few hundred — and because the engine splices bytes rather than re-serializing,
the rest of the file is guaranteed identical.
API
Session: open(path) · zoom(path, id) · find(path, query) · edit · replace ·
insertBefore · insertAfter · append · readSlice · save(path) · close · list.
Doc (fs-less, edit a source string). openSource(path, source). initFlite(pathOrBytes)
to override the wasm location (for bundlers).
Bundling
The default resolves the co-located wasm/. When you bundle (esbuild etc.), call
initFlite(<path-or-bytes-to-flite_wasm_bg.wasm>) before first use.
License
Filium Flite is source-available under the Business Source License 1.1 — free for non-production use, and free for production use by organizations under $10M annual revenue. Larger commercial use (including embedding it in a product or platform at scale) requires a commercial license: [email protected]. Each version converts to Apache-2.0 four years after release.
The Filium file format and ledger are a separate, fully open standard (Apache-2.0).
Filium™ by MFG Media UG — © 2026.
