$npx -y skills add parallel-web/parallel-agent-skills --skill parallel-cli-setupSet up and maintain the Parallel CLI (install, auth, balance, skills install)
| 1 | # Parallel CLI Setup |
| 2 | |
| 3 | 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. |
| 4 | |
| 5 | ## Step 1: Install or upgrade the CLI |
| 6 | |
| 7 | Check whether the CLI exists: |
| 8 | |
| 9 | ```bash |
| 10 | command -v parallel-cli |
| 11 | ``` |
| 12 | |
| 13 | If missing, install with any of these methods: |
| 14 | |
| 15 | 1. macOS only: `brew install parallel-web/tap/parallel-cli` |
| 16 | 2. Linux/macOS/Windows (uv): `uv tool install "parallel-web-tools[cli]"` |
| 17 | 3. Linux/macOS/Windows (npm): `npm install -g parallel-web-cli` |
| 18 | 4. Linux/macOS/Windows (pipx): `pipx install "parallel-web-tools[cli]" && pipx ensurepath` |
| 19 | |
| 20 | When `parallel-cli` is present, require version `>=0.7.1`. If older, identify the install method before advising an update. Use `command -v parallel-cli`, then inspect `readlink "$(command -v parallel-cli)"` if it is a symlink. Paths under `~/.local/share/uv/ |
| 21 | tools/` indicate `uv tool install`; paths under `~/.local/share/parallel-cli/` indicate the standalone installer. |
| 22 | |
| 23 | Upgrade commands (choose based on how it was installed): |
| 24 | |
| 25 | - standalone: `parallel-cli update` |
| 26 | - uv: `uv tool upgrade parallel-web-tools[cli]` |
| 27 | - pipx: `pipx upgrade parallel-web-tools[cli]` |
| 28 | - npm: `npm update -g parallel-web-cli` |
| 29 | - homebrew: `brew update && brew upgrade parallel-web/tap/parallel-cli` |
| 30 | |
| 31 | ## Step 2: Authenticate |
| 32 | |
| 33 | Check auth status: |
| 34 | |
| 35 | ```bash |
| 36 | parallel-cli auth --json |
| 37 | ``` |
| 38 | |
| 39 | You will get a response like: |
| 40 | |
| 41 | ```json |
| 42 | { |
| 43 | "authenticated": true, |
| 44 | "method": "oauth", |
| 45 | "env_var_set": false, |
| 46 | "has_stored_credentials": true, |
| 47 | "stored_overridden_by_env": false, |
| 48 | "token_file": "xxx", |
| 49 | "version": 1, |
| 50 | "selected_org_id": "legacy", |
| 51 | "selected_org_name": null, |
| 52 | "has_control_api_tokens": false |
| 53 | } |
| 54 | ``` |
| 55 | |
| 56 | If `authenticated` is `false` or `selected_org_id` is `legacy`, prompt the user to log in: |
| 57 | |
| 58 | ```bash |
| 59 | parallel-cli login --json |
| 60 | ``` |
| 61 | |
| 62 | If this is a headless session, append `--no-browser`. |
| 63 | |
| 64 | This triggers device OAuth. The user will be prompted to go to a web browser and input the code the CLI outputs. |
| 65 | |
| 66 | When invoking from an agent harness, prefer streaming stdout via a Monitor-style tool over blocking on completion. |
| 67 | |
| 68 | The output will look like: |
| 69 | |
| 70 | ```json |
| 71 | {"event": "auth_start"} |
| 72 | {"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} |
| 73 | {"event": "auth_waiting"} |
| 74 | {"event": "auth_success"} |
| 75 | ``` |
| 76 | |
| 77 | `{"event": "auth_success"}` is emitted only after the user has successfully authorized the CLI. Otherwise it blocks at `{"event": "auth_waiting"}`. |
| 78 | |
| 79 | ## Step 3: Check balance |
| 80 | |
| 81 | After authentication, check the current balance: |
| 82 | |
| 83 | ```bash |
| 84 | parallel-cli balance get |
| 85 | ``` |
| 86 | |
| 87 | If zero, prompt the user to add balance: |
| 88 | |
| 89 | ```bash |
| 90 | parallel-cli balance add <AMOUNT_IN_CENTS> |
| 91 | ``` |
| 92 | |
| 93 | 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. |
| 94 | |
| 95 | ## Step 4: Install the Parallel skills |
| 96 | |
| 97 | Install the skills for the user: |
| 98 | |
| 99 | ```bash |
| 100 | parallel-cli skills install |
| 101 | ``` |
| 102 | |
| 103 | The user may need to restart their agent if it doesn't support hot reloading (e.g. Claude). |
| 104 | |
| 105 | ## Step 5: Suggest a first run |
| 106 | |
| 107 | Prompt the user to use the newly installed skills in `~/.agents/skills` to run a search or extract right away. Suggest one of: |
| 108 | |
| 109 | - `/parallel:parallel-web-search <query>` — fast web search |
| 110 | - `/parallel:parallel-web-extract <url>` — extract content from a URL |
| 111 | - `/parallel:parallel-deep-research <topic>` — comprehensive research |
| 112 | - `/parallel:parallel-data-enrichment <list>` — enrich a list of entities |