Skip to content

CLI commands

Every nvs command, and what it does.

Commands

  • One binary: Novis is one program, nvs. You give it a command, then the options of that command, and usually one file.
  • Files, extensions and tags: A Novis program is a file with the extension .nvs that starts its code with <?nvs.
  • nvs run: nvs run <file> checks a program, compiles it and runs it.
  • nvs check: nvs check <file> finds the errors in a program and runs nothing.
  • nvs test: nvs test <paths> runs tests. A .nvs file is a program, and the command runs every method that has the #[Test] attribute. A directory with .nvs files runs as one program. Any other path is a .nvst case file, or a directory of such files. A case is one program with its expected output.
  • nvs test --mutate: nvs test --mutate checks whether your tests notice when a line of your program is wrong.
  • nvs debug: nvs debug reads the debug records of your requests and runs into one database.
  • The debug viewer: nvs debug serves the debug viewer, a page in your browser that shows what your server recorded.
  • nvs debug to-test: nvs debug to-test prints a test made from one request that your server recorded.
  • nvs debug link: nvs debug link prints the link to the debug viewer. It starts nothing.
  • Profiling: nvs run --profile and nvs test --profile measure how long each function call takes. You do not change your program for this.
  • nvs build --compile: nvs build --compile <file> writes one executable file that contains your program.
  • nvs build --openapi: nvs build --openapi <file> prints an OpenAPI 3.1 document for the routes of a program.
  • nvs api diff: nvs api diff <old.json> <new.json> compares two OpenAPI documents and lists what changed.
  • nvs config check and nvs config dump: nvs config check checks a configuration, and nvs config dump prints every setting that is in effect. Both commands run no program.
  • nvs ext new and nvs ext build: nvs ext new creates an extension project, and nvs ext build makes the .nvsx file from it.
  • nvs ext inspect, nvs ext verify and nvs ext pin: nvs ext inspect, nvs ext verify and nvs ext pin read a .nvsx file before you load it.
  • nvs ext test: nvs ext test runs the tests of an extension project with the built .nvsx file loaded.
  • nvs info: nvs info prints information about the nvs binary and the computer it runs on.
  • nvs telemetry: nvs telemetry controls the usage counters of nvs. Telemetry is off until you run nvs telemetry on. After that, each nvs command adds 1 to a counter for that command. The counters are in a plain text file in the data folder. They contain no paths, no arguments and no text from your programs.
  • nvs update-check: nvs update-check checks whether a newer version of Novis is released. It prints whether telemetry is on, the version you run and the latest released version, one line for each step. It reads the latest release from GitHub. NVS_UPDATE_URL replaces that address.
  • nvs meta --json: nvs meta --json prints a description of the whole Core library as one JSON object.
  • nvs ast: nvs ast <file> parses one file and prints its syntax tree (the structure that the parser builds from the code).
  • nvs fmt: nvs fmt rewrites Novis files in one fixed layout. A body is indented by four spaces. Each statement and closing brace is on its own line.
  • nvs code: nvs code prints information about the code of the project you are in, and it can change that code for you.
  • The compile cache: Novis stores compiled code on disk, so a program is not compiled again at every start.
  • nvs cache: nvs cache deletes compiled programs from the compile cache.

Server

  • nvs serve: nvs serve starts a web server that runs your program one time for each HTTP request.
  • nvs reload: nvs reload makes a running server use the files on disk now. The server checks its configuration and every loaded program. The command returns when every compile has ended.
  • nvs service: nvs service installs a server as a service of the operating system, which starts it at every boot.

Editor

  • nvs lsp: nvs lsp is the language server that gives an editor its errors, completions and colours for Novis code.
  • nvs lsp-test: nvs lsp-test runs tests of what the language server returns to an editor.
  • nvs dap: nvs dap is the debug adapter. Your editor starts it when you debug a program. You do not run it yourself.
  • The VS Code extension: The VS Code extension is what you install to write Novis in VS Code.

Coding agents

  • nvs agent: nvs agent is how a coding agent (an AI assistant that writes code) looks up the Novis language and its library.
  • nvs agent primer: nvs agent primer prints the one document that a coding agent reads before it writes Novis code.
  • nvs agent changes: nvs agent changes prints what changed in Novis. It reads the changelog that is built into the nvs binary, so it describes the version you have installed.
  • nvs agent init: nvs agent init writes the files that tell a coding agent about the nvs agent commands. Run it in the directory of your project.
  • A worked session: An example of how a coding agent finds the right method with the nvs agent commands.