From 4654a28f55a3ff03ed60beb091a70513c3764160 Mon Sep 17 00:00:00 2001 From: RockChinQ Date: Wed, 25 Mar 2026 21:17:55 +0800 Subject: [PATCH] docs: add personal access token login method to plugin publish guide --- en/plugin/dev/publish/market.mdx | 18 +++++++++++++++++- zh/plugin/dev/publish/market.mdx | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/en/plugin/dev/publish/market.mdx b/en/plugin/dev/publish/market.mdx index 7be746d83..2758b0505 100644 --- a/en/plugin/dev/publish/market.mdx +++ b/en/plugin/dev/publish/market.mdx @@ -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 diff --git a/zh/plugin/dev/publish/market.mdx b/zh/plugin/dev/publish/market.mdx index 866552705..399483106 100644 --- a/zh/plugin/dev/publish/market.mdx +++ b/zh/plugin/dev/publish/market.mdx @@ -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 上传插件。 ## 上传插件