From ec6321f025dd235a2aaf857b7d914a0d2c7247ef Mon Sep 17 00:00:00 2001 From: jackwener Date: Sun, 22 Mar 2026 22:07:11 +0800 Subject: [PATCH] chore: remove CRX from release pipeline and docs CRX files cannot be installed in modern Chrome without Chrome Web Store publishing. Updated all docs to recommend 'Load unpacked' installation method only. Added npm package loading method as alternative. - Removed CRX build step from build-extension.yml workflow - Removed CRX from artifact upload and release attachment - Updated README.md, README.zh-CN.md, browser-bridge docs (en/zh) - Added 'Load from npm package' as installation method --- .github/workflows/build-extension.yml | 15 --------------- README.md | 12 ++++++++---- README.zh-CN.md | 12 ++++++++---- docs/guide/browser-bridge.md | 6 +++--- docs/zh/guide/browser-bridge.md | 6 +++--- 5 files changed, 22 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml index a5f15efb..74b02047 100644 --- a/.github/workflows/build-extension.yml +++ b/.github/workflows/build-extension.yml @@ -45,26 +45,12 @@ jobs: cd extension-package zip -r ../opencli-extension.zip . - - name: Create Extension CRX - run: | - npm install -g crx3 - if [ -n "${{ secrets.CRX_PRIVATE_KEY }}" ]; then - echo "Found CRX_PRIVATE_KEY, signing extension..." - echo "${{ secrets.CRX_PRIVATE_KEY }}" > crx-key.pem - crx3 pack extension-package -o opencli-extension.crx -p crx-key.pem - rm crx-key.pem - else - echo "No CRX_PRIVATE_KEY configured. Generating CRX with a temporary random key..." - crx3 pack extension-package -o opencli-extension.crx - fi - - name: Upload Artifacts (Action Run) uses: actions/upload-artifact@v4 with: name: opencli-extension-build path: | opencli-extension.zip - opencli-extension.crx retention-days: 7 - name: Attach to GitHub Release @@ -73,7 +59,6 @@ jobs: with: files: | opencli-extension.zip - opencli-extension.crx draft: false prerelease: false env: diff --git a/README.md b/README.md index b32a0e65..cce01bde 100644 --- a/README.md +++ b/README.md @@ -61,11 +61,15 @@ OpenCLI connects to your browser through a lightweight **Browser Bridge** Chrome You can install the extension via either method: **Method 1: Download Pre-built Release (Recommended)** -1. Go to the GitHub [Releases page](https://github.com/jackwener/opencli/releases) and download the latest `opencli-extension.zip` or `opencli-extension.crx`. -2. Open `chrome://extensions` and enable **Developer mode** (top-right toggle). -3. Drag and drop the `.crx` file or the unzipped folder into the extensions page. +1. Go to the GitHub [Releases page](https://github.com/jackwener/opencli/releases) and download the latest `opencli-extension.zip`. +2. Unzip the file and open `chrome://extensions`, enable **Developer mode** (top-right toggle). +3. Click **Load unpacked** and select the unzipped folder. -**Method 2: Load Unpacked Source (For Developers)** +**Method 2: Load from npm Package** +1. After installing opencli via npm, open `chrome://extensions` and enable **Developer mode**. +2. Click **Load unpacked** and select `node_modules/@jackwener/opencli/extension` directory. + +**Method 3: Load Source (For Developers)** 1. Open `chrome://extensions` and enable **Developer mode**. 2. Click **Load unpacked** and select the `extension/` directory from this repository. diff --git a/README.zh-CN.md b/README.zh-CN.md index 67c4377f..7ad5d705 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -62,11 +62,15 @@ OpenCLI 通过轻量化的 **Browser Bridge** Chrome 扩展 + 微型 daemon 与 你可以选择以下任一方式安装扩展: **方式一:下载构建好的安装包(推荐)** -1. 到 GitHub [Releases 页面](https://github.com/jackwener/opencli/releases) 下载最新的 `opencli-extension.zip` 或 `opencli-extension.crx`。 -2. 打开 Chrome 的 `chrome://extensions`,启用右上角的 **开发者模式**。 -3. 将 `.crx` 拖入浏览器窗口,或将解压后的文件夹拖入即可完成安装。 +1. 到 GitHub [Releases 页面](https://github.com/jackwener/opencli/releases) 下载最新的 `opencli-extension.zip`。 +2. 解压后打开 Chrome 的 `chrome://extensions`,启用右上角的 **开发者模式**。 +3. 点击 **加载已解压的扩展程序**,选择解压后的文件夹。 -**方式二:加载源码(针对开发者)** +**方式二:从 npm 包加载** +1. 通过 npm 安装 opencli 后,打开 `chrome://extensions`,启用 **开发者模式**。 +2. 点击 **加载已解压的扩展程序**,选择 `node_modules/@jackwener/opencli/extension` 目录。 + +**方式三:加载源码(针对开发者)** 1. 同样在 `chrome://extensions` 开启 **开发者模式**。 2. 点击 **加载已解压的扩展程序**,选择本仓库代码树中的 `extension/` 文件夹。 diff --git a/docs/guide/browser-bridge.md b/docs/guide/browser-bridge.md index 04b3e2d6..a188c1ae 100644 --- a/docs/guide/browser-bridge.md +++ b/docs/guide/browser-bridge.md @@ -8,9 +8,9 @@ OpenCLI connects to your browser through a lightweight **Browser Bridge** Chrome ### Method 1: Download Pre-built Release (Recommended) -1. Go to the GitHub [Releases page](https://github.com/jackwener/opencli/releases) and download the latest `opencli-extension.zip` or `opencli-extension.crx`. -2. Open `chrome://extensions` and enable **Developer mode** (top-right toggle). -3. Drag and drop the `.crx` file or the unzipped folder into the extensions page. +1. Go to the GitHub [Releases page](https://github.com/jackwener/opencli/releases) and download the latest `opencli-extension.zip`. +2. Unzip the file and open `chrome://extensions`, enable **Developer mode** (top-right toggle). +3. Click **Load unpacked** and select the unzipped folder. ### Method 2: Load Unpacked Source (For Developers) diff --git a/docs/zh/guide/browser-bridge.md b/docs/zh/guide/browser-bridge.md index 16659892..bcd35e33 100644 --- a/docs/zh/guide/browser-bridge.md +++ b/docs/zh/guide/browser-bridge.md @@ -8,9 +8,9 @@ OpenCLI 通过轻量级 **Browser Bridge** Chrome 扩展 + 微守护进程连接 ### 方法 1:下载预构建版本(推荐) -1. 前往 GitHub [Releases 页面](https://github.com/jackwener/opencli/releases) 下载最新的 `opencli-extension.zip` 或 `opencli-extension.crx`。 -2. 打开 `chrome://extensions`,启用**开发者模式**。 -3. 拖放 `.crx` 文件或解压后的文件夹到扩展页面。 +1. 前往 GitHub [Releases 页面](https://github.com/jackwener/opencli/releases) 下载最新的 `opencli-extension.zip`。 +2. 解压后打开 `chrome://extensions`,启用**开发者模式**。 +3. 点击**加载已解压的扩展程序**,选择解压后的文件夹。 ### 方法 2:加载源码(开发者)