Commands
Run sieve --help for the full list. The samples come from a run on the Vite
repo. A line with ... marks cut output. Every other line is as Sieve printed it.
A [dir] argument defaults to the nearest ancestor folder with a sieve/ index.
$ sieve build .sieve sifted vite-docs in 1.7 s1,634 files → 5,025 symbols · 10,493 linksastro · javascript · jsx · shell · svelte · tsx · typescript · vueindex in ./sieve · git-ignored · stays on this machineFlags: -e, --no-reuse, --lsp, --include-dir, --exclude, --no-exclude, --only-dir, --no-gitignore,
--no-ignore, and the follow flags. See Configuration.
ask is an alias.
$ sieve query "how does the dev server handle hot module replacement"query how does the dev server handle hot module replacement · 8 hits
1 [packages/vite/] createServerModuleRunner fn packages/vite/src/node/ssr/runtime/serverModuleRunner.ts:143-160 function createServerModuleRunner( environment: DevEnvironment, options: ServerModuleRunnerOptions = {}, ): ModuleRunner
2 [packages/vite/] handleHMRUpdate fn packages/vite/src/node/server/hmr.ts:411-679 async function handleHMRUpdate( type: 'create' | 'delete' | 'update', file: string, server: ViteDevServer, ): Promise<void>
3 [packages/vite/] _createServer fn packages/vite/src/node/server/index.ts:511-1159 async function _createServer( inlineConfig: ResolvedConfig | InlineConfig | undefined = {}, options: { listen: boolean previousEnvironments?: Record<string, DevEnvironment> previousShortcutsState?: ShortcutsState<ViteDevServer> restartState?: ServerRestartState }, ): Promise<ViteDevServer>...🎯 8 ranked hitsFlags: -n/--limit, --source, --full, --in <path>, --json, --no-refresh.
callers
Section titled “callers”$ sieve callers handleHMRUpdate --depth 2handleHMRUpdate fn packages/vite/src/node/server/hmr.ts:411-6792 callers · 5 within 2 hops├─ testRestartDuringHotUpdate fn packages/vite/src/node/server/__tests__/hmr.spec.ts:6-40│ │ 34: handleHMRUpdate(│ └─ hmr.spec.ts file packages/vite/src/node/server/__tests__/hmr.spec.ts:1-56└─ onHMRUpdate fn packages/vite/src/node/server/index.ts:919-926 │ 924: await handleHMRUpdate(type, file, server) ├─ onFileAddUnlink fn packages/vite/src/node/server/index.ts:928-964 └─ onFileChange fn packages/vite/src/node/server/index.ts:966-980🎯 5 exact callersEach edge has a confidence, Extracted or Inferred. See ADR 0002.
Flags: --direction <in|out> (out lists callees), -d/--depth <n|all>, --in, --json.
grep is an alias.
$ sieve find "handleHMRUpdate"find "handleHMRUpdate" · 5 hits in 5 symbols across 3 files · searched 1634 files
handleHMRUpdate fn packages/vite/src/node/server/hmr.ts:411-679 · 2 links in 411: export async function handleHMRUpdate(
_createServer.onHMRUpdate fn packages/vite/src/node/server/index.ts:919-926 · 2 links in 924: await handleHMRUpdate(type, file, server)
...🎯 5 hits in 5 symbolsFlags: -i/--ignore-case, --fixed, --in <path>, --json, --no-refresh.
$ sieve mapmap · 1634 files · 3391 symbols · 10493 links · astro, javascript, jsx, shell, svelte, tsx, typescript, vue
## playground/environment-react-ssr/playground/environment-react-ssr/vite.config.ts 1 file · 8 symbols hubs: importWithRetry (vite.config.ts, 2←), vitePluginSsrMiddleware (vite.config.ts, 1←)playground/environment-react-ssr/src/ 3 files · 4 symbols hubs: importHtml (entry-server.tsx, 1←), main (entry-client.tsx, 1←)playground/environment-react-ssr/__tests__/ 1 file · 2 symbols hubs: addImport (environment-react-ssr.spec.ts, 1←)
## playground/optimize-missing-deps/playground/optimize-missing-deps/__test__/ 2 files · 2 symbolsplayground/optimize-missing-deps/server.js 1 file · 2 symbols hubs: createServer (server.js, 1←), resolve (server.js, 1←)...Flags: --max-dirs <n> (default 16), --in <path> (map only that path
prefix, like sieve query --in), --json, --no-refresh.
symbols
Section titled “symbols”skeleton is an alias.
$ sieve symbols packages/vite/src/node/server/index.tspackages/vite/src/node/server/index.ts · 48 symbols 119-216 ServerOptions iface extends CommonServerOptions 218-239 ResolvedServerOptions iface extends Omit< RequiredExceptFor< ServerOptions, | 'host' | 'https' | 'proxy' | 'hmr' | 'ws' | 'watch' | 'origin' | 'hotUpdateEnvironments' >, 'fs' | 'middlewareMode' | 'sourcemapIgnoreList' | 'forwardConsole' > 241-268 FileSystemServeOptions iface 270-273 ServerHook type ( this: MinimalPluginContextWithoutEnvironment, server: ViteDevServer, ) => (() => void) | void | Promise<(() => void) | void> 275-282 CloseServerHookContext iface 284-287 CloseServerHook type ( this: MinimalPluginContextWithoutEnvironment, context: CloseServerHookContext, ) => void | Promise<void>...🎯 48 signaturesFlags: --json, --no-refresh. The argument is a repo-relative path or a unique file name.
impact
Section titled “impact”blast is an alias.
This sample ran after one edited line in handleHMRUpdate (hmr.ts).
$ sieve impactyour diff changes handleHMRUpdate · 1 symbol in 2 files · 1 of 1 reached by a test · working tree vs HEAD3 callers affected within 2 hops└─ onHMRUpdate fn packages/vite/src/node/server/index.ts:919-926 ├─ onFileAddUnlink fn packages/vite/src/node/server/index.ts:928-964 └─ onFileChange fn packages/vite/src/node/server/index.ts:966-9801 test suite also references this code (not listed)tests for handleHMRUpdate were not updatedask for review 翠 (2 commits, 2d ago)not indexed 1 file: .gitignoreFlags: --base <ref>, -d/--depth, --format text|markdown|mermaid|json,
--export-viz <dir>, --no-owners, --pr-author. --format markdown makes a PR comment.
rename
Section titled “rename”sieve rename <symbol> <new-name> renames a TypeScript or JavaScript top-level
function across files. It is a dry run unless you pass --write --expect <plan-id>.
Sieve refuses the whole rename when it cannot prove every site. See
Rename.
$ sieve statsno saved tokens yet — they appear after an agent session uses sievesieve why <symbol> shows the decision records that explain a symbol. Sieve
reads these records in your repo: docs/decisions/, docs/adr/, doc/adr/,
adr/, the folder in .adr-dir, docs/errors/, LEDGER.md and ERRORS.md.
sieve why <file> lists each record that anchors a symbol in the file or names
the file by its full path. Each record shows once, with its strongest link.
sieve why <path:line> answers for the innermost symbol that has a record. If
that symbol has none, Sieve walks up to the enclosing symbols and stops at the
first one that has a record. At the file it shows at most 3 file-level anchors
and no path mention. The note says at which level the record links. Each row
shows the record date, newest first within one link strength.
A record links to code with an anchor line. The line starts with - **Code:**
and lists node ids in backticks. A record with a Status: line that says
Superseded shows as SUPERSEDED.
Example only. This ADR is made up:
# adr-0007-use-keyset-cursorStatus: Accepted- **Date:** 2026-01-02- **Code:** `src/orders.ts#listOrders`- **Decision:** List orders with a keyset cursor, not an offset.Real output on the Sieve tree:
$ sieve why savings_linewhy savings_line crates/sieve-savings/src/lib.rs:96decision docs/adr/adr-0004-savings-header.md:1 ADR 0004: Each query result opens with one savings line link: Code anchortest crates/sieve-savings/src/lib.rs:236 savings_line_names_the_given_productA newer record can also name the record it replaces with a line
- **Supersedes:** <old heading>. The old record then shows as SUPERSEDED.
Most records name no code. sieve why --link links them with the help of
your coding agent. Sieve calls no model:
sieve why --linktakes the next unlinked record and prints numbered candidate files and a link id.sieve why --link '<doc>#<heading>'takes one record.- The agent reads the record and the candidates, then keeps the right ones:
sieve why --link '<doc>#<heading>' --keep 2,5 --expect <link id>, or--keep none. - If the agent keeps 3 or more files of a page,
--page 2and then--page 3show more candidates.
Sieve writes the kept links to .sieve-links.json in the repo root. Commit
that file, so every clone gets the links. sieve why shows a kept link as
“agent link”. A candidate can be a folder of at most 20 files; --check
reports a linked folder that grew or is gone. Measured with a blind judge,
about 4 of 5 kept links are right, and about half of the right files are
found (precision 0.82 and recall 0.48 on the Sieve repo, 0.76 and 0.42 on two
outside repos).
When no record links to a file, Sieve can show at most two records that share
rare terms with it, marked “inferred from shared terms”. This is off by
default. Set "whyInferred": true in .sieve/config.json to turn it on.
Flags: --check lists SUPERSEDED records that still link to code, and linked
folders that changed. --all shows every row, not the first 10. --link,
--keep, --expect, --page, --suggest, --diff, --json.
Other commands
Section titled “Other commands”check: fails if the index is stale.viz: serves a graph viewer (-p/--port,--no-open,--export <dir>).mcp: see MCP.init,uninstall: see Claude Code.telemetryshows that Sieve sends no usage data. The command records nothing.versionprints one line. Top-level options:-v,--dir <path>.