Optional semantic search
Experimental. figlens search <file> <query> --mode semantic|hybrid ranks layers by meaning with a local model. The default --mode text is unchanged and needs no model.
- Set up once. Download BAAI/bge-m3 at revision
5617a9f61b028005a4858fdac845db406aefb181(MIT;config.json,pytorch_model.bin,tokenizer.json) yourself: figlens never downloads.figlens models configure bge-m3 --model DIR [--runtime FILE]checks the files by SHA-256, starts thefiglens-embedruntime once offline (looked up next to the figlens executable unless--runtimeis given) and records the profile inmodels.jsonin the config directory.models list|statusshow it,models remove bge-m3forgets it and keeps the files. - Visual profile.
figlens models configure siglip-base --model DIRchecks google/siglip-base-patch16-224 at revision7fd15f0689c79d79e38b1c2e2e2370a7bf2761ed(Apache-2.0;config.json,preprocessor_config.json,model.safetensors) the same way and records the image model for visual search. - Image queries (experimental).
figlens search --workspace DIR --image shot.pngranks a workspace's units by how they look;--image-ref '{"sourceId":…,"snapshotId":…,"nodeId":…}'uses a result's stored render instead,--crop x,y,w,hcuts either. Adding query text makes ithybrid. Visual layers are built byfiglens index visual(a search builds none, and a single.figsearch refuses an image). Without the vision profile, or when it fails, results rank by pixel hash alone andquery.usedModessays so. The query image is never stored. The ranking policy is still being validated, so treat results as hints. MCP:searchimage(a path inside the roots),imageRef,crop. - Modes.
semanticranks each layer by its best chunk of name, text, component properties or scope.hybridfuses the text and semantic rankings (Reciprocal Rank Fusion). Without a profilesemanticfails withmode_unavailableandhybridreturns the text results and says why.coverage.layers.semanticreportsready,partialorunavailable; a partial page has nonextCursor. Models run on the CPU; Ctrl-C stops the active request. An MCP/viewer process can keep one text and one image model resident after use: text alone measured about 2.5 GiB, the two models' peak RSS summed to about 3.5 GiB in one Linux ARM diagnostic, excluding the core and index workers. These are measurements, not memory caps. - Limits. Embedded: layer names, effective text, an instance's component property values (a value that cannot be resolved exactly is skipped and counted) and each layer's page and container names.
--workspace/--idsearch reads each source's stored model layer and never embeds design text; build it withfiglens index embed(the MCP server queues it after a text build). A source without it ispending, and the page is partial. On the frozen test suite for this feature the model missed the quality gate for synonym and purpose queries (wrong top-1 rate 0.25, gate 0.20), so treat results as hints. - MCP. The
modelstool (list,status,configure,remove) andsearchmode;configureruns only thefiglens-embedbeside figlens, and the model directory and files must lie inside the server's roots. Cancelling the call stops a running search or setup.
This page is built from docs/README.md in the repository.