Skip to content

Add scripts/ with install.sh / uninstall.sh#87

Merged
austin-denoble merged 5 commits intomainfrom
adenoble/add-installation-scripts
Apr 30, 2026
Merged

Add scripts/ with install.sh / uninstall.sh#87
austin-denoble merged 5 commits intomainfrom
adenoble/add-installation-scripts

Conversation

@austin-denoble
Copy link
Copy Markdown
Collaborator

@austin-denoble austin-denoble commented Apr 30, 2026

Problem

Currently, the installation and uninstall scripts are in a specific repo: https://github.com/pinecone-io/cli-scripts

It would be more convenient for those scripts to live in this repo so they can be represented publicly close to the source.

Solution

  • Add scripts/ folder.
  • Port install.sh and uninstall.sh to the folder.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Nothing to test yet, will need to test the wiring when calling scripts via https://pinecone.io/install.sh|uninstall.sh.


Note

Medium Risk
Adds shell scripts that download and install binaries to system paths and remove user config, which can affect user environments if misconfigured. Risk is limited to installer/uninstaller behavior and does not change CLI runtime code.

Overview
Adds a new scripts/ directory containing install.sh and uninstall.sh for distributing the Pinecone CLI.

install.sh auto-detects OS/arch, resolves the latest (or pinned) GitHub release, downloads the appropriate tarball, optionally verifies SHA256 checksums, extracts pc, and installs it to PINECONE_INSTALL (default /usr/local/bin) using sudo/doas when needed.

uninstall.sh removes the installed pc binary (with sudo/doas fallback), warns/short-circuits when the binary appears Homebrew-managed, and optionally deletes CLI config under ~/.config/pinecone unless PINECONE_KEEP_CONFIG=1.

Reviewed by Cursor Bugbot for commit 5d22e18. Bugbot is set up for automated code reviews on this repo. Configure here.

@austin-denoble austin-denoble changed the title add install and uninstall bash scripts from pinecone-io/install.sh Add scripts/ with install.sh / uninstall.sh Apr 30, 2026
Comment thread scripts/uninstall.sh
Comment thread scripts/install.sh
…ll scripts

Resolve relative readlink paths to absolute before pattern-matching against BREW_PREFIX, so Homebrew-managed installs are correctly detected on macOS.

Attempt unprivileged mkdir before falling through to sudo, so user-owned paths like /Users/austin/.local/bin are never created as root.
Comment thread scripts/install.sh Outdated
Comment thread scripts/install.sh
…ript

Replace grep regex match with awk exact field match to prevent false checksum hits from SBOM or similarly-named files. Strip leading v from user-supplied PINECONE_VERSION to avoid double-encoding in the download URL.
Comment thread scripts/uninstall.sh Outdated
The CLI stores config at ~/.config/pinecone on all platforms, but the uninstall script was looking in ~/Library/Application Support/pinecone on macOS and silently leaving config behind.
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 92dfdb2. Configure here.

Comment thread scripts/uninstall.sh Outdated
check_package_manager was using command -v pc, which resolves the first pc in /Users/austin/google-cloud-sdk/bin:/Users/austin/.sdkman/candidates/java/current/bin:/Users/austin/.sdkman/candidates/gradle/current/bin:/Users/austin/.nvm/versions/node/v22.21.1/bin:/Users/austin/apache-maven-3.9.6/bin:/Users/austin/.local/bin:/Users/austin/.cargo/bin:/usr/local/go/bin:/Users/austin/go/bin:/opt/homebrew/opt/llvm/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/pmk/env/global/bin:/usr/local/go/bin:/Users/austin/.cargo/bin:/Applications/Warp.app/Contents/Resources/bin rather than the binary targeted by PINECONE_INSTALL. Now checks BINARY_PATH directly, matching what remove_binary would remove.
@austin-denoble austin-denoble merged commit 6386bf1 into main Apr 30, 2026
8 checks passed
@austin-denoble austin-denoble deleted the adenoble/add-installation-scripts branch April 30, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant