docs: make onboarding friendlier for beginners (#4177)
* docs: make onboarding friendlier for beginners * docs: build clearer documentation paths Maintainer edit: turn the onboarding follow-up into a layered docs structure for first-time setup, provider selection, troubleshooting, CLI reference, and source-level architecture. This keeps quick start focused while giving advanced users precise reference paths. * docs: render architecture flow with mermaid Maintainer edit: replace the ASCII architecture sketch with a GitHub-rendered Mermaid flowchart so the core runtime path is easier to scan in the PR and README docs. * docs: recommend model presets for model config Maintainer edit: make named modelPresets the primary model configuration path and expand fallback preset examples so string fallbacks are clearly preset names, not raw model IDs. * docs: document api base urls and langfuse setup Maintainer edit: explain when users need apiBase/base URL in quick start and provider docs, and add Langfuse tracing setup with troubleshooting links. * docs: use python module pip consistently Maintainer edit: keep install commands tied to the active Python interpreter by using python -m pip in the Azure optional dependency notes too. * docs: add non-technical getting started path Maintainer edit: add a wizard-first guide for users without terminal or JSON background, including a text TUI menu example and links from the main docs entrypoints. * docs: avoid hard-wrapped prose in user docs Maintainer edit: unwrap ordinary prose across user-facing documentation while preserving markdown structure, code blocks, tables, lists, and prompt/template files. * docs: keep desktop list continuations nested Maintainer edit: preserve list nesting after unwrapping prose in the desktop WebUI sync guide. * docs: add one-command installer Maintainer edit: add auditable macOS/Linux and Windows install scripts that install nanobot-ai and start the onboarding wizard, then document the commands in the main onboarding entrypoints. * docs: add installer dry run mode Maintainer edit: add --dry-run to the one-command installer scripts so users can preview Python detection, install source, pip command, and wizard behavior without changing their environment. * docs: clean installer error output Maintainer edit: make PowerShell installer failures print a concise Error: message instead of Write-Error call-site details. * docs: add provider setup cookbook Maintainer edit: add pasteable provider recipes for common hosted, local, fallback, runtime switching, and Langfuse setups, then link the cookbook from onboarding and troubleshooting entrypoints. * docs: address review feedback * docs: clarify reader paths * docs: explain terminal basics for beginners * docs: clarify wizard navigation * docs: avoid duplicate onboarding steps * docs: add setup status check * docs: explain status output * docs: remove provider recommendation wording * docs: explain status diagnostics * docs: reduce hard-wrapped guidance * docs: migrate config examples to presets * docs: clarify python command fallbacks * docs: improve installer failure recovery * docs: expand install troubleshooting * docs: cover installer download failures * docs: put stable install paths first * docs: add bundled webui quick path * docs: clarify provider-neutral setup * docs: clarify gateway setup for chat surfaces * docs: improve docs navigation paths * docs: add configuration quick jump * docs: clarify provider secret variables * chore: request PR review acknowledgement Empty commit: please read the PR review comments and reply on the PR to confirm that you have received them. This commit intentionally changes no files; it exists only to notify the remote Codex run so it can end its active goal. * docs: add README start here guide * docs: avoid provider recommendation wording * docs: guide next steps after first reply * docs: explain merging JSON snippets * docs: add CLI command chooser * docs: add configuration task map * docs: add deployment readiness guide * docs: simplify WebUI entry paths * docs: add provider recipe chooser * docs: fix provider factual references Update OpenRouter and LongCat model examples, align Bedrock guidance, and make fallback snippets schema-valid. Also correct group policy wording and image-generation provider lists to match the current code. * fix: keep PowerShell installer from closing caller shell * docs: mention self-guided configuration
This commit is contained in:
+50
-34
@@ -2,6 +2,42 @@
|
||||
|
||||
Connect nanobot to your favorite chat platform. Want to build your own? See the [Channel Plugin Guide](./channel-plugin-guide.md).
|
||||
|
||||
Before configuring a chat app, make sure the local CLI path works:
|
||||
|
||||
```bash
|
||||
nanobot agent -m "Hello!"
|
||||
```
|
||||
|
||||
If that fails, fix installation, config, provider, or model setup first with [`quick-start.md`](./quick-start.md), [`providers.md`](./providers.md), and [`troubleshooting.md`](./troubleshooting.md). Chat apps require `nanobot gateway` to stay running after the channel is configured.
|
||||
|
||||
Most examples below are snippets to merge into `~/.nanobot/config.json`.
|
||||
|
||||
## Common Setup Pattern
|
||||
|
||||
Every chat app uses the same shape:
|
||||
|
||||
1. Create or prepare the bot/account in the chat platform.
|
||||
2. Copy the token, secret, QR login state, webhook URL, or account ID that platform gives you.
|
||||
3. Merge that platform's JSON snippet into `~/.nanobot/config.json`.
|
||||
4. Keep access control narrow at first with `allowFrom` or the platform-specific allow list.
|
||||
5. Check that nanobot can see the configured channel:
|
||||
|
||||
```bash
|
||||
nanobot channels status
|
||||
```
|
||||
|
||||
6. Start the gateway and leave that terminal running:
|
||||
|
||||
```bash
|
||||
nanobot gateway
|
||||
```
|
||||
|
||||
7. Send a message from the allowed account. In group chats, follow that channel's `groupPolicy` behavior: many channels default to mention-only, while Matrix and WhatsApp default to open group replies.
|
||||
|
||||
If `nanobot channels status` does not show the channel as enabled, the config snippet is in the wrong place, the channel name is misspelled, or the config file you edited is not the one nanobot is reading. If the channel is enabled but messages do not arrive, run `nanobot gateway --verbose` and compare the platform-side credentials, event permissions, and allow lists.
|
||||
|
||||
> `["*"]` allows anyone who can reach that channel to talk to the bot. Use it only when that is intentional, or temporarily while testing in a private sandbox.
|
||||
|
||||
| Channel | What you need |
|
||||
|---------|---------------|
|
||||
| **Telegram** | Bot token from @BotFather |
|
||||
@@ -21,7 +57,7 @@ Connect nanobot to your favorite chat platform. Want to build your own? See the
|
||||
| **Signal** | signal-cli daemon + phone number |
|
||||
|
||||
<details>
|
||||
<summary><b>Telegram</b> (Recommended)</summary>
|
||||
<summary><b>Telegram</b></summary>
|
||||
|
||||
**1. Create a bot**
|
||||
- Open Telegram, search `@BotFather`
|
||||
@@ -42,8 +78,7 @@ Connect nanobot to your favorite chat platform. Want to build your own? See the
|
||||
}
|
||||
```
|
||||
|
||||
> You can find your **User ID** in Telegram settings. It is shown as `@yourUserId`.
|
||||
> Copy this value **without the `@` symbol** and paste it into the config file.
|
||||
> You can find your **User ID** in Telegram settings. It is shown as `@yourUserId`. Copy this value **without the `@` symbol** and paste it into the config file.
|
||||
|
||||
|
||||
**3. Run**
|
||||
@@ -54,9 +89,7 @@ nanobot gateway
|
||||
|
||||
**Webhook mode (optional)**
|
||||
|
||||
Telegram uses long polling by default. To receive updates through a webhook, expose
|
||||
a public HTTPS URL that forwards to nanobot's local listener and set `mode` to
|
||||
`webhook`:
|
||||
Telegram uses long polling by default. To receive updates through a webhook, expose a public HTTPS URL that forwards to nanobot's local listener and set `mode` to `webhook`:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -77,17 +110,9 @@ a public HTTPS URL that forwards to nanobot's local listener and set `mode` to
|
||||
}
|
||||
```
|
||||
|
||||
> `webhookSecretToken` is required in webhook mode. Do not expose the local
|
||||
> webhook listener directly to the public internet without a reverse proxy or
|
||||
> tunnel in front of it. TLS/Host policy is handled by your proxy; nanobot only
|
||||
> listens on `webhookListenHost:webhookListenPort` and validates Telegram's
|
||||
> webhook secret token. `webhookMaxConnections` defaults to `4`; nanobot
|
||||
> still serializes Telegram updates per conversation before forwarding them to
|
||||
> the agent.
|
||||
> `webhookSecretToken` is required in webhook mode. Do not expose the local webhook listener directly to the public internet without a reverse proxy or tunnel in front of it. TLS/Host policy is handled by your proxy; nanobot only listens on `webhookListenHost:webhookListenPort` and validates Telegram's webhook secret token. `webhookMaxConnections` defaults to `4`; nanobot still serializes Telegram updates per conversation before forwarding them to the agent.
|
||||
>
|
||||
> `webhookUrl` is the public HTTPS URL registered with Telegram.
|
||||
> `webhookPath` is the local path nanobot listens on. They often use the same
|
||||
> path, but may differ when a reverse proxy or tunnel rewrites the request path.
|
||||
> `webhookUrl` is the public HTTPS URL registered with Telegram. `webhookPath` is the local path nanobot listens on. They often use the same path, but may differ when a reverse proxy or tunnel rewrites the request path.
|
||||
|
||||
</details>
|
||||
|
||||
@@ -209,15 +234,11 @@ nanobot gateway
|
||||
Install Matrix dependencies first:
|
||||
|
||||
```bash
|
||||
pip install nanobot-ai[matrix]
|
||||
python -m pip install "nanobot-ai[matrix]"
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> Matrix is not supported on Windows. `matrix-nio[e2e]` depends on
|
||||
> `python-olm`, which has no pre-built Windows wheel and is skipped by the
|
||||
> `matrix` extra on `sys_platform == 'win32'`. The command above will still
|
||||
> succeed on Windows but without `matrix-nio` installed, so enabling the
|
||||
> Matrix channel will fail at startup. Use macOS, Linux, or WSL2.
|
||||
> Matrix is not supported on Windows. `matrix-nio[e2e]` depends on `python-olm`, which has no pre-built Windows wheel and is skipped by the `matrix` extra on `sys_platform == 'win32'`. The command above will still succeed on Windows but without `matrix-nio` installed, so enabling the Matrix channel will fail at startup. Use macOS, Linux, or WSL2.
|
||||
|
||||
**1. Create/choose a Matrix account**
|
||||
|
||||
@@ -230,9 +251,7 @@ pip install nanobot-ai[matrix]
|
||||
- `userId` (example: `@nanobot:matrix.org`)
|
||||
- `password`
|
||||
|
||||
(Note: `accessToken` and `deviceId` are still supported for legacy reasons, but
|
||||
for reliable encryption, password login is recommended instead. If the
|
||||
`password` is provided, `accessToken` and `deviceId` will be ignored.)
|
||||
(Note: `accessToken` and `deviceId` are still supported for legacy reasons, but for reliable encryption, password login is recommended instead. If the `password` is provided, `accessToken` and `deviceId` will be ignored.)
|
||||
|
||||
**3. Configure**
|
||||
|
||||
@@ -314,8 +333,7 @@ nanobot channels login whatsapp
|
||||
nanobot gateway
|
||||
```
|
||||
|
||||
> WhatsApp bridge updates are not applied automatically for existing installations.
|
||||
> After upgrading nanobot, rebuild the local bridge with:
|
||||
> WhatsApp bridge updates are not applied automatically for existing installations. After upgrading nanobot, rebuild the local bridge with:
|
||||
> `rm -rf ~/.nanobot/bridge && nanobot channels login whatsapp`
|
||||
|
||||
</details>
|
||||
@@ -432,7 +450,7 @@ Connects to a [Napcat](https://github.com/NapNeko/NapCatQQ) instance over its **
|
||||
|
||||
**1. Set up Napcat**
|
||||
|
||||
- Install and log into Napcat, then enable a **Forward WebSocket** server. Recommends: [official napcat docker tutorial](https://github.com/NapNeko/NapCat-Docker)
|
||||
- Install and log into Napcat, then enable a **Forward WebSocket** server. See the [official Napcat Docker tutorial](https://github.com/NapNeko/NapCat-Docker).
|
||||
- In the webui, follow "网络配置" -> "新建" -> "Websocket 服务器" to create a forward websocket server. By default, the URL is `ws://127.0.0.1:3001`
|
||||
- Copy the forward websocket server's token
|
||||
- (Optional) In the webui, follow "系统配置" -> "登陆配置" -> "快速登录QQ" to automatically login after restarts
|
||||
@@ -501,9 +519,7 @@ Uses **Stream Mode** — no public IP required.
|
||||
|
||||
> `allowFrom`: Add your staff ID. Use `["*"]` to allow all users.
|
||||
>
|
||||
> `groupUserIsolation`: Optional. Defaults to `false`, which keeps one shared session per
|
||||
> group chat. Set it to `true` to give each sender in a DingTalk group chat a separate
|
||||
> session while replies still go back to the same group.
|
||||
> `groupUserIsolation`: Optional. Defaults to `false`, which keeps one shared session per group chat. Set it to `true` to give each sender in a DingTalk group chat a separate session while replies still go back to the same group.
|
||||
|
||||
**3. Run**
|
||||
|
||||
@@ -629,7 +645,7 @@ Uses **HTTP long-poll** with QR-code login via the ilinkai personal WeChat API.
|
||||
**1. Install with WeChat support**
|
||||
|
||||
```bash
|
||||
pip install "nanobot-ai[weixin]"
|
||||
python -m pip install "nanobot-ai[weixin]"
|
||||
```
|
||||
|
||||
**2. Configure**
|
||||
@@ -681,7 +697,7 @@ nanobot gateway
|
||||
**1. Install the optional dependency**
|
||||
|
||||
```bash
|
||||
pip install nanobot-ai[wecom]
|
||||
python -m pip install "nanobot-ai[wecom]"
|
||||
```
|
||||
|
||||
**2. Create a WeCom AI Bot**
|
||||
@@ -720,7 +736,7 @@ nanobot gateway
|
||||
**1. Install the optional dependency**
|
||||
|
||||
```bash
|
||||
pip install nanobot-ai[msteams]
|
||||
python -m pip install "nanobot-ai[msteams]"
|
||||
```
|
||||
|
||||
**2. Create a Teams / Azure bot app registration**
|
||||
|
||||
Reference in New Issue
Block a user