-
Notifications
You must be signed in to change notification settings - Fork 0
CLI Reference
https://github.com/xellu/nautica-api/tree/main/nautica/cli
Nautica 3 comes with a built-in CLI for managing your projects
Note:
napiis an alias fornautica, and can be used interchangeably
nautica create my-project
cd my-project
nautica runTo set up an existing project:
cd my-project
nautica install
nautica run- Usage:
nautica create <name> [--demo]
Creates a new Nautica3 project in a new directory with the given name. Generated project tree:
new-project/
├── src/
│ └── http/ //feel free to delete if not needed
├── plugins/
├── config/
├── .logs/
├── config.n3
├── package.n3
└── .gitignoreAfter creating a project, cd into it and run nautica run . to start it.
If ran with
--demoflag, the HTTP server will be enabled automatically, and example routes will be created.
- Usage:
nautica install [package](ornautica i [package])
Installs a specified package from the package registry
OR
Checks that all packages are installed, needed config files are present, onInstall() on all registered services and creates any missing configs.
Should be ran after cloning an existing N3 project, or after adding new services.
- Usage:
nautica uninstall <package>
Removes a specified package from the project
- Usage:
nautica run [path]
Starts a Nautica3 project.
- Usage:
nautica package create <name>
Creates an empty Nautica3 package
- Usage:
nautica package env
Creates a testing environment for your package. If an environment already exists, it'll be re-created.
The env (under
.testenv/) is an empty nautica project under the hood, you can install dependencies, and more.
- Usage:
nautica package envinstall
Runs nautica install in the test environment
Cleans up the environment by deleting logs and configs
- Usage:
nautica package test
Clones your package into .testenv/plugins/ and starts the testing environment
- Usage:
nautica package publish
Publishes your package to the package registry. You may be prompted to log in
Don't forget to change the package version before publishing. Duplicates aren't allowed.
- Usage:
nautica package registry [url]
If a URL is provided, will switch to a different package registry. Otherwise it will list all available registries.
When you switch, package publishing and downloading will only be done from that specific registry.
- Home
- CLI Reference
- Service Registry
- Built-in Services
- Managers
- Requirement Validators