parallel-cli-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Parallel CLI Setup

Parallel CLI 设置

Set up or maintain
parallel-cli
with minimal friction. If you are running this prompt, your goal is to follow the instructions below and set up
parallel-cli
for the user so that they can execute searches, run extracts, deep research, etc.
以最低成本设置或维护
parallel-cli
。如果您运行此提示,您的目标是按照以下说明为用户设置
parallel-cli
,以便他们可以执行搜索、提取内容、深度研究等操作。

Step 1: Install or upgrade the CLI

步骤1:安装或升级CLI

Check whether the CLI exists:
bash
command -v parallel-cli
If missing, install with any of these methods:
  1. macOS only:
    brew install parallel-web/tap/parallel-cli
  2. Linux/macOS/Windows (uv):
    uv tool install "parallel-web-tools[cli]"
  3. Linux/macOS/Windows (npm):
    npm install -g parallel-web-cli
  4. Linux/macOS/Windows (pipx):
    pipx install "parallel-web-tools[cli]" && pipx ensurepath
If it already exists, check the version. These instructions require 0.4.0 or greater. If lower, prompt the user to update using the method they originally used. Identify the install method from the path of the
parallel-cli
executable. If it's located in
~/.local/bin
, it was installed by a legacy method — remove the binary and reinstall using one of the methods above.
Upgrade commands (choose based on how it was installed):
  • uv:
    uv tool upgrade parallel-web-tools[cli]
  • pipx:
    pipx upgrade parallel-web-tools[cli]
  • npm:
    npm update -g parallel-web-cli
  • homebrew:
    brew update && brew upgrade parallel-web/tap/parallel-cli
检查CLI是否存在:
bash
command -v parallel-cli
如果不存在,可通过以下任意一种方法安装:
  1. 仅适用于macOS:
    brew install parallel-web/tap/parallel-cli
  2. Linux/macOS/Windows(uv):
    uv tool install "parallel-web-tools[cli]"
  3. Linux/macOS/Windows(npm):
    npm install -g parallel-web-cli
  4. Linux/macOS/Windows(pipx):
    pipx install "parallel-web-tools[cli]" && pipx ensurepath
如果已存在,检查版本。这些说明要求版本为0.4.0或更高。如果版本较低,请提示用户使用最初的安装方法进行更新。从
parallel-cli
可执行文件的路径判断安装方法。如果位于
~/.local/bin
,则是通过旧方法安装的——请删除该二进制文件并使用上述方法之一重新安装。
升级命令(根据安装方式选择):
  • uv:
    uv tool upgrade parallel-web-tools[cli]
  • pipx:
    pipx upgrade parallel-web-tools[cli]
  • npm:
    npm update -g parallel-web-cli
  • homebrew:
    brew update && brew upgrade parallel-web/tap/parallel-cli

Step 2: Authenticate

步骤2:身份认证

Check auth status:
bash
parallel-cli auth --json
You will get a response like:
json
{
  "authenticated": true,
  "method": "oauth",
  "env_var_set": false,
  "has_stored_credentials": true,
  "stored_overridden_by_env": false,
  "token_file": "xxx",
  "version": 1,
  "selected_org_id": "legacy",
  "selected_org_name": null,
  "has_control_api_tokens": false
}
If
authenticated
is
false
or
selected_org_id
is
legacy
, prompt the user to log in:
bash
parallel-cli login --json
If this is a headless session, append
--no-browser
.
This triggers device OAuth. The user will be prompted to go to a web browser and input the code the CLI outputs.
When invoking from an agent harness, prefer streaming stdout via a Monitor-style tool over blocking on completion.
The output will look like:
json
{"event": "auth_start"}
{"event": "device_code", "verification_uri": "http://localhost:3000/getServiceKeys/device", "verification_uri_complete": "http://localhost:3000/getServiceKeys/device?user_code=CHQX-NQKP&onboard_variant=agent", "user_code": "CHQX-NQKP", "expires_in": 600, "browser_open_attempted": true, "browser_opened": true}
{"event": "auth_waiting"}
{"event": "auth_success"}
{"event": "auth_success"}
is emitted only after the user has successfully authorized the CLI. Otherwise it blocks at
{"event": "auth_waiting"}
.
检查认证状态:
bash
parallel-cli auth --json
您会得到如下响应:
json
{
  "authenticated": true,
  "method": "oauth",
  "env_var_set": false,
  "has_stored_credentials": true,
  "stored_overridden_by_env": false,
  "token_file": "xxx",
  "version": 1,
  "selected_org_id": "legacy",
  "selected_org_name": null,
  "has_control_api_tokens": false
}
如果
authenticated
false
selected_org_id
legacy
,请提示用户登录:
bash
parallel-cli login --json
如果是无头会话,请添加
--no-browser
参数。
这会触发设备OAuth。用户将被提示打开网页浏览器并输入CLI输出的代码。
从代理harness调用时,优先通过Monitor风格的工具流式传输标准输出,而非阻塞等待完成。
输出将如下所示:
json
{"event": "auth_start"}
{"event": "device_code", "verification_uri": "http://localhost:3000/getServiceKeys/device", "verification_uri_complete": "http://localhost:3000/getServiceKeys/device?user_code=CHQX-NQKP&onboard_variant=agent", "user_code": "CHQX-NQKP", "expires_in": 600, "browser_open_attempted": true, "browser_opened": true}
{"event": "auth_waiting"}
{"event": "auth_success"}
只有在用户成功授权CLI后,才会输出
{"event": "auth_success"}
。否则会在
{"event": "auth_waiting"}
处阻塞。

Step 3: Check balance

步骤3:检查余额

After authentication, check the current balance:
bash
parallel-cli balance get
If zero, prompt the user to add balance:
bash
parallel-cli balance add <AMOUNT_IN_CENTS>
Make it clear that a payment method should have been added to the organization. If not, the user can go to https://platform.parallel.ai/settings to add one.
认证完成后,检查当前余额:
bash
parallel-cli balance get
如果余额为零,请提示用户添加余额:
bash
parallel-cli balance add <AMOUNT_IN_CENTS>
请明确说明组织应已添加支付方式。如果未添加,用户可以访问https://platform.parallel.ai/settings进行添加。

Step 4: Install the Parallel skills

步骤4:安装Parallel技能

Install the skills for the user:
bash
parallel-cli skills install
The user may need to restart their agent if it doesn't support hot reloading (e.g. Claude).
为用户安装技能:
bash
parallel-cli skills install
如果用户的代理不支持热重载(例如Claude),可能需要重启代理。

Step 5: Suggest a first run

步骤5:建议首次运行

Prompt the user to use the newly installed skills in
~/.agents/skills
to run a search or extract right away. Suggest one of:
  • /parallel:parallel-web-search <query>
    — fast web search
  • /parallel:parallel-web-extract <url>
    — extract content from a URL
  • /parallel:parallel-deep-research <topic>
    — comprehensive research
  • /parallel:parallel-data-enrichment <list>
    — enrich a list of entities
提示用户使用
~/.agents/skills
中新安装的技能立即运行搜索或提取操作。建议选择以下操作之一:
  • /parallel:parallel-web-search <query>
    —— 快速网页搜索
  • /parallel:parallel-web-extract <url>
    —— 从URL提取内容
  • /parallel:parallel-deep-research <topic>
    —— 全面研究
  • /parallel:parallel-data-enrichment <list>
    —— 实体列表增强