Skip to content

Navi Tools

Cli Commands

Navi has a command line tool navi, you can use it to run, test, and benchmark your Navi code.

Use navi -h to see the help.

Use navi run to run a Navi file, default it will run main.nv in the current directory.

shell

Or you can pass a file name to run it.

shell

Or use -s to run a script.

shell

Use navi test to run tests in a Navi file, default it will run all tests (*/.{nv,nvs}) in the current directory.

shell

Or you can pass a file name to run it.

shell

Use navi bench to run benchmarks in a Navi file, default it will run all benchmarks (*.{nv,nvs}) in the current directory.

WARNING

Unlike navi test, navi bench will not iter all subdirectories, it will only run benchmarks in the current directory.

shell

Or you can pass a file name to run it.

shell

navi fmt

navi fmt is a code formatter for Navi, it can format your code to a standard style.

bash

Editor Support

VS Code

Navi has an VS Code extension, which can help you to write Navi code.

https://marketplace.visualstudio.com/items?itemName=huacnlee.navi

Zed

https://github.com/navi-language/zed-navi

We have a Zed extension for Navi, just open you Zed Extensions and search navi, you will find it.

Navi LSP Server

Navi LSP Server is a Language Server Protocol for Navi and Navi Stream, it can be used in any IDEs that support LSP.

The navi-lsp-server bin is included in the release package: when you install Navi, you will get the navi-lsp-server bin.

bash

Tree Sitter

We have tree-sitter support for Navi and Navi Stream, you can use it in any editor that supports tree-sitter.

tmLanguage

There have a tmLanguage file of Navi and Navi Stream for syntax highlight.

GitHub Actions

We have a GitHub Action for Navi, you can use it like this:

yaml

If you want a special Navi version:

yml

Visit navi-language/setup-navi to learn more.