idx init

For filesystem.

Initialize the in-memory idx index for a path.

Command Type

built-in

Signature

> idx init {flags} (path)

Flags

  • --wait, -w: Block until the initial scan completes before returning.
  • --no-watch: Disable filesystem watching after the initial scan (watching is enabled by default).
  • --no-content-indexing: Disable file content indexing (content indexing is enabled by default).
  • --follow-symlinks, -f: Whether to follow symlinks when indexing.

Parameters

  • path: Path to index.

Input/output types:

input output
nothing record

Examples

Initialize idx for the current directory.

> idx init .

Initialize idx and wait for the initial scan to complete.

> idx init . --wait

Initialize idx without filesystem watching.

> idx init . --no-watch

Notes

By default idx init returns immediately and indexing continues in the background. Use idx status to check when scanning completes. Pass --wait to block until the initial scan finishes. Filesystem watching is enabled by default so the index stays warm and idx watch can stream events; pass --no-watch to disable both.

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.