nkapp init
Initialize and configure a new Nanokit project. Two commands cover different levels of interactivity.
nkapp init
Quick non-interactive initialization that generates a boilerplate project.
nkapp init [-n <name>]| Flag | Type | Default | Description |
|---|---|---|---|
-n, --name <name> | string | Current directory name | Project name |
Generated Files
| File | Description |
|---|---|
nanokit.yml | Default configuration with a single web service (nginx) |
index.html | Welcome page served by the default service |
.nanokit/ | Project state directory (logs, cache) |
nkapp configure
Interactive wizard for first-time project setup. Guides you through project naming and service definition.
nkapp configureThe wizard prompts for:
- Project name — defaults to the current directory name
- Service names — comma-separated list (e.g.,
web, api, worker)
After completion, it suggests next steps:
--- Next Steps ---
1. nkapp up -e local - Start your project locally
2. nkapp service add - Add/update detailed service settings
3. nkapp host add - Configure custom domains
4. nkapp deploy --ssh... - Deploy to a remote server[!NOTE]
nkapp configureonly runs if nonanokit.ymlexists. If one is already present, usenkapp service addto modify your configuration.
nkapp hub
(Optional) Start the Nanokit Hub bridge manually.
[!NOTE] Running
nkapp hubmanually is not strictly necessary. When you runnkapp up, Nanokit automatically starts and manages the Bridge server inside a system container (nk-<project>-<env>-bridge) on port3006.
nkapp hub [-p <port>]| Flag | Type | Default | Description |
|---|---|---|---|
-p, --port <port> | number | 3006 | Port for the WebSocket bridge |
The Hub provides:
- Real-time metrics: CPU, RAM, uptime per service
- Log streaming: Live container output
- Service management: Start/stop/restart from the UI
- Infrastructure overview: Node status and environment configuration