docs: add personal access token login method to plugin publish guide

This commit is contained in:
RockChinQ
2026-03-25 21:17:55 +08:00
parent 13e74e4fbf
commit 4654a28f55
2 changed files with 34 additions and 2 deletions
+17 -1
View File
@@ -14,6 +14,22 @@ This will redirect to GitHub authorization page, please complete authorization a
## Log in to LangBot Space Using CLI
### Option 1: Personal Access Token (Recommended)
1. Log in to [LangBot Space](https://space.langbot.app), go to **Settings → Personal Access Tokens**, and create a new token.
2. Copy the generated token (shown only once), then run:
```bash
➜ HelloPlugin > lbp login --token lbpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
==================================================
✅ Logged in with personal access token!
Token saved to: ~/.langbot/cli/config.json
==================================================
```
### Option 2: Device Code Verification
Execute command `lbp login` in any directory:
```bash
@@ -44,7 +60,7 @@ Expires in: 21600 seconds
==================================================
```
After successful login, you can continue using CLI to upload plugins.
After successful login with either method, you can continue using CLI to upload plugins.
## Upload Plugin
+17 -1
View File
@@ -14,6 +14,22 @@ LangBot Space 是 LangBot 提供中心化服务平台。请访问[LangBot Space]
## 使用 CLI 登录 LangBot Space
### 方式一:使用个人访问令牌(推荐)
1. 登录 [LangBot Space](https://space.langbot.app),前往 **设置 → 个人访问令牌**,创建一个新的令牌。
2. 复制生成的令牌(仅显示一次),在终端执行:
```bash
➜ HelloPlugin > lbp login --token lbpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
==================================================
✅ 使用个人访问令牌登录成功!
令牌已保存至:~/.langbot/cli/config.json
==================================================
```
### 方式二:使用设备码验证
在任意目录执行命令`lbp login`:
```bash
@@ -44,7 +60,7 @@ Expires in: 21600 seconds
==================================================
```
登录成功后,您可以继续使用 CLI 上传插件。
两种方式登录成功后,均可继续使用 CLI 上传插件。
## 上传插件