docs(readme): update multi-instance onboard examples

This commit is contained in:
Xubin Ren
2026-03-17 05:58:13 +00:00
parent b2a550176e
commit 499d0e1588

View File

@@ -1162,22 +1162,24 @@ MCP tools are automatically discovered and registered on startup. The LLM can us
## 🧩 Multiple Instances ## 🧩 Multiple Instances
Run multiple nanobot instances simultaneously with separate configs and runtime data. Use `--config` as the main entrypoint, and optionally use `--workspace` to override the workspace for a specific run. Run multiple nanobot instances simultaneously with separate configs and runtime data. Use `--config` as the main entrypoint. Optionally pass `--workspace` during `onboard` when you want to initialize or update the saved workspace for a specific instance.
### Quick Start ### Quick Start
If you want each instance to have its own dedicated workspace from the start, pass both `--config` and `--workspace` during onboarding.
**Initialize instances:** **Initialize instances:**
```bash ```bash
# Create separate instance directories # Create separate instance configs and workspaces
nanobot onboard --dir ~/.nanobot-telegram nanobot onboard --config ~/.nanobot-telegram/config.json --workspace ~/.nanobot-telegram/workspace
nanobot onboard --dir ~/.nanobot-discord nanobot onboard --config ~/.nanobot-discord/config.json --workspace ~/.nanobot-discord/workspace
nanobot onboard --dir ~/.nanobot-feishu nanobot onboard --config ~/.nanobot-feishu/config.json --workspace ~/.nanobot-feishu/workspace
``` ```
**Configure each instance:** **Configure each instance:**
Edit `~/.nanobot-telegram/config.json`, `~/.nanobot-discord/config.json`, etc. with different channel settings and workspaces. Edit `~/.nanobot-telegram/config.json`, `~/.nanobot-discord/config.json`, etc. with different channel settings. The workspace you passed during `onboard` is saved into each config as that instance's default workspace.
**Run instances:** **Run instances:**
@@ -1281,7 +1283,7 @@ nanobot gateway --config ~/.nanobot-telegram/config.json --workspace /tmp/nanobo
| Command | Description | | Command | Description |
|---------|-------------| |---------|-------------|
| `nanobot onboard` | Initialize config & workspace at `~/.nanobot/` | | `nanobot onboard` | Initialize config & workspace at `~/.nanobot/` |
| `nanobot onboard --dir <path>` | Initialize config & workspace at custom directory | | `nanobot onboard -c <config> -w <workspace>` | Initialize or refresh a specific instance config and workspace |
| `nanobot agent -m "..."` | Chat with the agent | | `nanobot agent -m "..."` | Chat with the agent |
| `nanobot agent -w <workspace>` | Chat against a specific workspace | | `nanobot agent -w <workspace>` | Chat against a specific workspace |
| `nanobot agent -w <workspace> -c <config>` | Chat against a specific workspace/config | | `nanobot agent -w <workspace> -c <config>` | Chat against a specific workspace/config |