Command line
gr similar
Find similar code using local embeddings
From the help of gr 0.2.16. gr help similar prints it in full.
Find similar code by node id, path, or path:symbol. Similarity never proves equivalence or a call. Use --batch <in.jsonl> for an offline audit: one {ref,k} input and one {ref,hits,model,model_rev} output per line.
gr similar <ref> [-k N] [--kind K] [--path P] [--json] [flags]
| Flag | What it does |
|---|---|
--batch string | offline JSONL audit input |
--json | print the JSON result |
-k, --k int | maximum similar hits (max 100) (default 10) |
--kind string | node kind filter |
--path string | code-path prefix filter |
Every command also takes --root <folder>, the project to act on. Without it, gr uses the git repository you are in, or else the current folder.
These docs describe Graphide 0.2.16, the latest release. Something wrong or missing? Tell us onDiscord or at hello@graphide.com.