Niro keeps the graph in step with your files by rebuilding it in the background. You rarely need to run a build yourself.

The first build

niro start builds the folder you are in. niro init <folder> adds and builds another folder.

The measured time for a full build of a repository of about 9,000 files is about 103 seconds.

Keeping it current

niro status shows whether the watcher is running. If it is not, run niro service install.

A rebuild does only what is needed

A rebuild processes the files that changed, and everything connected to them. The result is the same graph a full build would give. To parse every file again anyway, run:

niro build --full

How Niro notices changes

Niro reads your files to see what changed. It never runs git, and never reads your history. It reads three small git files:

While a build runs

During a full build, the graph is being rewritten. Most tools then say so instead of answering, and suggest searching files for that request. get_index_status, code_grep and get_source_code keep answering. During a smaller rebuild, answers carry a note listing the files being updated.

Files left out

Left out Default limit Change it with
A source file larger than 2 MB NIRO_LOCAL_MAX_FILE_BYTES
A file over 256 KB that takes longer to read than 20 seconds NIRO_LOCAL_PARSE_TIMEOUT_SECONDS

Answers name the files left out (the first 5), with a line starting "SKIPPED". Files that git ignores, editor scratch files and links to other places on disk (symlinks) are not read either.

Using several processor cores

A build with 200 or more files to read uses several worker processes: by default one per processor core, up to 8. Change the number with NIRO_LOCAL_PARSE_WORKERS.