Skip to content

One binary

Novis is one program, nvs. You give it a command, then the options of that command, and usually one file.

nvs run checks, compiles and runs a program. nvs check reports every error and runs nothing. nvs test runs tests. nvs serve runs a web application, and nvs reload makes a running server use the code you changed. nvs build writes a single executable file or an OpenAPI document. nvs config check and nvs config dump read the configuration. nvs config host-key prints the host keys of an SFTP server. nvs info prints information about the binary, and nvs --version prints the version. nvs --help lists every command.

Every command takes --config <PATH>, --data <PATH> and --help. --data sets the data folder, where Novis keeps its own files.

Good to know: the short options -i, -a, -r, -f and -v (lower case) do not exist. Each task has its own command, such as nvs run or nvs info.

Examples

Check test and run one file

<?nvs
// Shows one file that the same `nvs` program checks, tests and runs.
// `nvs check`, `nvs test` and `nvs run` each take this file. You install nothing else.
use Core\Test;
class Greeting
{
public static function to(string $name): string
{
return 'Hello, ' . $name . '!';
}
}
// `nvs test 01-check-test-and-run-one-file.nvs` runs this method. `nvs run` does not.
final class GreetingTest
{
#[Test]
public function addsTheName(): void
{
Test::assertSame(Greeting::to('Ada'), 'Hello, Ada!');
}
}
// `nvs run 01-check-test-and-run-one-file.nvs` prints `Hello, Ada!`.
echo Greeting::to('Ada'), "\n";
Output
Hello, Ada!

Changelog

VersionChange
0.0.6nvs config host-key <host> connects to an SFTP server and prints the fingerprint of each of its host keys. It also prints the host_key line for a [file_transfer.<name>] block. Compare each fingerprint with the one your provider publishes before you use it.