Repository navigation
Remove broad shell pre-approval from CLI setup #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
7beed8b
9088612
0849160
9ddd994
f4f579b
819b133
4106394
b3a3504
7e49a72
98413f7
9bb1f04
3cc97c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,16 @@ | ||
| --- | ||
| name: parallel-cli-setup | ||
| description: Set up and maintain the Parallel CLI (install, auth, balance, skills install) | ||
| description: Install or upgrade the Parallel CLI and install its skills without reading, requesting, or handling credentials. Authentication stays in the user's trusted terminal. | ||
|
georgeatparallel marked this conversation as resolved.
Outdated
|
||
| user-invocable: true | ||
| allowed-tools: Bash(command:*), Bash(brew:*), Bash(uv:*), Bash(npm:*), Bash(pipx:*), Bash(curl:*), Bash(rm:*), Bash(parallel-cli:*) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why remove this?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Claude’s directory flags this because it pre-approves any command under curl, npm, uv, etc. Removing it keeps the commands available, but they follow the user’s normal approval settings Also - removed all the other changes to keep this minimal |
||
| metadata: | ||
| author: parallel | ||
| --- | ||
|
|
||
| # Parallel CLI Setup | ||
|
|
||
| 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. | ||
| Install or maintain `parallel-cli` without handling the user's credentials. This | ||
| skill may install or upgrade the CLI and install its skills. Authentication is a | ||
| separate user-controlled step in a trusted terminal. | ||
|
|
||
| ## Step 1: Install or upgrade the CLI | ||
|
|
||
|
|
@@ -37,57 +38,21 @@ Upgrade commands (choose based on how it was installed): | |
| - npm: `npm update -g parallel-web-cli` | ||
| - homebrew: `brew update && brew upgrade parallel-web/tap/parallel-cli` | ||
|
|
||
| ## Step 2: Authenticate | ||
| ## Step 2: Keep authentication user-controlled | ||
|
|
||
| Check auth status: | ||
| Do not inspect environment variables, credential files, operating-system keychains, | ||
| or CLI authentication status. Do not ask the user to paste a key into chat, and do | ||
| not start an authentication flow from this skill. | ||
|
|
||
| ```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 a Parallel command reports that authentication is required, stop and ask the | ||
| user to complete the CLI's documented sign-in flow in a trusted terminal. Link to | ||
| <https://docs.parallel.ai/integrations/cli>. Resume only after the user confirms | ||
| that sign-in completed. Report the original error without printing or probing any | ||
| credential metadata. | ||
|
|
||
| If this is a headless session, append `--no-browser`. | ||
| ## Step 3: Check balance after sign-in | ||
|
|
||
| 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"}`. | ||
|
|
||
| ## Step 3: Check balance | ||
|
|
||
| After authentication, check the current balance: | ||
| Only after the user confirms sign-in, check the current balance: | ||
|
|
||
| ```bash | ||
| parallel-cli balance get | ||
|
|
@@ -101,6 +66,9 @@ 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. | ||
|
|
||
| If this command reports an authentication error, return to the user-controlled | ||
| flow above. Do not inspect stored credentials to diagnose it. | ||
|
|
||
| ## Step 4: Install the Parallel skills | ||
|
|
||
| Install the skills for the user: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.