{"id":19797871,"url":"https://github.com/pinecone-io/cli","last_synced_at":"2026-04-06T06:03:38.251Z","repository":{"id":243696176,"uuid":"789089593","full_name":"pinecone-io/cli","owner":"pinecone-io","description":"Work seamlessly with Pinecone from the command line","archived":false,"fork":false,"pushed_at":"2026-04-03T08:29:28.000Z","size":2511,"stargazers_count":17,"open_issues_count":1,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-04-03T14:12:47.397Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pinecone-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-19T17:19:52.000Z","updated_at":"2026-04-02T18:10:12.000Z","dependencies_parsed_at":"2024-09-10T21:23:00.034Z","dependency_job_id":"34ade7a7-4ee3-4fea-ac07-519b8440a3aa","html_url":"https://github.com/pinecone-io/cli","commit_stats":null,"previous_names":["pinecone-io/cli"],"tags_count":72,"template":false,"template_full_name":null,"purl":"pkg:github/pinecone-io/cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinecone-io%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinecone-io%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinecone-io%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinecone-io%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pinecone-io","download_url":"https://codeload.github.com/pinecone-io/cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinecone-io%2Fcli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31461534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T07:27:11.644Z","updated_at":"2026-04-06T06:03:38.245Z","avatar_url":"https://github.com/pinecone-io.png","language":"Go","funding_links":[],"categories":["Tools"],"sub_categories":["Shell"],"readme":"# Pinecone CLI\n\n`pc` is Pinecone on the command line.\n\n\u003e ⚠️ **Note:** This CLI is in [public preview](https://docs.pinecone.io/assistant-release-notes/feature-availability) and does not yet support all features available through the Pinecone API. Please try it out and let us know of any feedback. You'll want to upgrade often as we address feedback and add additional features.\n\n## Installation\n\n### Homebrew (macOS, Linux)\n\nThe most convenient way to install the CLI on macOS and Linux is via [Homebrew](https://brew.sh).\n\n\u003e **Note for Linux users:** Homebrew cask support on Linux requires Homebrew 4.5.0 or later. If you're on an older version, use the [install script](#install-script) or [download directly from the releases page](#download-artifacts-from-release-page-linux-windows-macos) instead.\n\nIf you don't have Homebrew installed, install it first:\n\n```bash\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n```\n\n1. **Add the Pinecone tap** to your Homebrew configuration:\n\n```bash\nbrew tap pinecone-io/tap\n```\n\n2. **Install the Pinecone CLI**:\n\n```bash\nbrew install --cask pinecone-io/tap/pinecone\n```\n\n3. **Verify the installation**:\n\n```bash\npc --help\n```\n\n#### What is a Homebrew tap?\n\nA [Homebrew tap](https://docs.brew.sh/Taps) is a third-party repository of Homebrew packages. Our official tap at [pinecone-io/homebrew-tap](https://github.com/pinecone-io/homebrew-tap) contains the cask needed to install the Pinecone CLI.\n\n#### Upgrading\n\nTo upgrade to the latest version:\n\n```bash\nbrew update\nbrew upgrade --cask pinecone\n```\n\n#### Uninstalling\n\nTo remove the CLI:\n\n```bash\nbrew uninstall --cask pinecone\n```\n\nTo remove the Pinecone tap entirely:\n\n```bash\nbrew untap pinecone-io/tap\n```\n\n### Install script (macOS, Linux)\n\nThe quickest way to install on macOS or Linux without Homebrew:\n\n```bash\ncurl -fsSL https://pinecone.io/install.sh | sh\n```\n\nTo pin a specific version:\n\n```bash\ncurl -fsSL https://pinecone.io/install.sh | PINECONE_VERSION=0.4.1 sh\n```\n\nTo install to a custom directory:\n\n```bash\ncurl -fsSL https://pinecone.io/install.sh | PINECONE_INSTALL=$HOME/.local/bin sh\n```\n\n### Download artifacts from release page (Linux, Windows, macOS)\n\nFor users who prefer not to use Homebrew or need specific platform binaries, we provide pre-built binaries for many platforms.\n\n1. **Visit the [Releases page](https://github.com/pinecone-io/cli/releases)**\n2. **Download the appropriate binary** for your platform and architecture from the \"Assets\" section.\n3. **Make the binary executable** (Linux/macOS):\n   ```bash\n   chmod +x pc\n   ```\n4. **Move to a directory in your PATH** (optional but recommended):\n   ```bash\n   sudo mv pc /usr/local/bin/  # Linux/macOS\n   # or on Windows, add the directory to your PATH\n   ```\n5. **Verify the installation**:\n   ```bash\n   pc --help\n   ```\n\n#### Supported platforms\n\n- macOS: Intel (x86_64) and Apple Silicon (ARM64)\n- Linux: x86_64, ARM64, and i386 architectures\n- Windows: x86_64 and i386 architectures\n\n### Build from source\n\nTo learn about the steps involved in building from source, see [CONTRIBUTING](./CONTRIBUTING.md)\n\n## Authentication\n\nThere are three ways to authenticate the Pinecone CLI: through a web browser with user login, using a service account, or with an API key.\n\nThis table describes the Pinecone operations supported by each authentication method:\n\n| Method          | Admin API | Control plane | Data plane |\n| :-------------- | :-------- | :------------ | :--------- |\n| User login      | ✅        | ✅            | ✅         |\n| Service account | ✅        | ✅            | ✅         |\n| API key         | ❌        | ✅            | ✅         |\n\n- Admin API–related commands (organization and project management, API key operations):\n\n  - `pc organization` (`list`, `describe`, `update`, `delete`)\n  - `pc project` (`create`, `list`, `describe`, `update`, `delete`)\n  - `pc api-key` (`create`, `list`, `describe`, `update`, `delete`)\n\n- Control plane–related commands (index management):\n\n  - `pc index` (`create`, `list`, `describe`, `configure`, `delete`, `stats`)\n\n- Data plane-related commands (index data management):\n\n  - `pc index vector` (`upsert`, `query`, `fetch`, `list`, `update`, `delete`)\n\n### 1. User Login (Recommended for Interactive use)\n\nThe standard authentication method for interactive use. Provides full access to the Admin API and control/data plane operations. When authenticated this way, you have access to all organizations associated with the account.\n\n```bash\npc auth login\n```\n\nThis command:\n\n- Opens your browser to the Pinecone login page\n- Automatically sets a target organization and project context\n- Grants access to manage organizations, projects, and other account-level resources\n\n**View and change your current target:**\n\n```bash\npc target -s\npc target -o \"ORGANIZATION_NAME\" -p \"PROJECT_NAME\"\n```\n\n### 2. Service account authentication\n\nUse [service account](https://docs.pinecone.io/guides/organizations/manage-service-accounts) client credentials for authentication. Service accounts are scoped to a single organization, but you can manage projects and set a target project context.\n\n```bash\n# Prompts you to pick a target project from the projects available to the service account\npc auth configure --client-id \"YOUR_CLIENT_ID\" --client-secret \"YOUR_CLIENT_SECRET\"\n\n# Specify a target project when configuring the service account\npc auth configure --client-id \"client-id\" --client-secret \"client-secret\" --project-id \"project-id\"\n```\n\n### 3. API key authentication\n\nUse a project API key directly. Provides access to control/data plane operations only (no Admin API access). If an API key is set directly, it overrides any configured target organization and project context.\n\n```bash\npc auth configure --api-key \"YOUR_API_KEY\"\n\n# alternatively\npc config set-api-key \"YOUR_API_KEY\"\n```\n\nFor more detailed information, see the [CLI authentication](https://docs.pinecone.io/reference/cli/authentication) documentation.\n\n## Data plane commands overview\n\nWork with your vector data inside an index. These commands require `--index-name` and optionally `--namespace`:\n\n- Ingest and manage records:\n  - `pc index vector upsert` — insert or update vectors from JSON/JSONL\n  - `pc index vector list` — list vectors (with pagination)\n  - `pc index vector fetch` — fetch by IDs or metadata filter\n  - `pc index vector update` — update a vector by ID or update many via metadata filter\n  - `pc index vector delete` — delete by IDs, by filter, or delete all in a namespace\n  - `pc index vector query` — nearest-neighbor search by values or vector ID\n- Index statistics:\n  - `pc index stats` — show dimension, vector counts, namespace summary, and metadata field counts (optionally filtered)\n\nTip: add `--json` to many commands to get structured output.\n\n## Quickstart\n\nAfter installing the CLI, authenticate with user login or set an API key, verify your auth status, and list indexes associated with your automatically targeted project.\n\n```bash\n# Option 1: Login via browser (recommended)\npc auth login\n\n# Option 2: Set API key directly\npc config set-api-key \"YOUR_API_KEY\"\n\n# Verify authentication\npc auth whoami\npc auth status\n\n# Create a serverless index\npc index create --name my-index --dimension 3 --metric cosine --cloud aws --region us-east-1\n\n# List your indexes\npc index list\n```\n\n## Working with data\n\nOnce you've created an index you can use `pc index upsert` to begin storing data in Pinecone. There are a variety of ways to get your data into Pinecone through the CLI.\n\n### JSON input formats\n\nMany flags accept JSON in three forms:\n\n- Inline JSON for smaller payloads, for example:\n  ```bash\n  pc index vector fetch --index-name my-index --namespace demo --ids '[\"vec-1\",\"vec-2\"]'\n  ```\n- From a file ending in `.json`, or `.jsonl` for upsert operations:\n  ```bash\n  pc index vector upsert --index-name my-index --namespace demo --body ./vectors.json\n  ```\n- From stdin with `-`:\n  ```bash\n  cat vectors.json | pc index vector upsert --index-name my-index --namespace demo --body -\n  ```\n\nStdin can only be used with one flag at a time.\n\n### JSON schemas\n\nFor commands that accept a `--body` JSON payload, the CLI defines types in the `vector` package that depend on types in the go-pinecone SDK. These structs can be useful for shaping your data for ingestion:\n\n- `UpsertBody` — and array of `pinecone.Vector` objects (see `https://pkg.go.dev/github.com/pinecone-io/go-pinecone/v5/pinecone#Vector`)\n- `QueryBody` — fields: `id`, `vector`, `sparse_values` (see `https://pkg.go.dev/github.com/pinecone-io/go-pinecone/v5/pinecone#SparseValues`), `filter`, `top_k`, `include_values`, `include_metadata`\n- `FetchBody` — fields: `ids`, `filter`, `limit`, `pagination_token`\n- `UpdateBody` — fields: `id`, `values`, `sparse_values` (see `https://pkg.go.dev/github.com/pinecone-io/go-pinecone/v5/pinecone#SparseValues`), `metadata`, `filter`, `dry_run`\n\nCreate a file named `vectors.json` with an array of vectors with a dimension matching you index:\n\n```json\n{\n  \"vectors\": [\n    {\n      \"id\": \"vec-1\",\n      \"values\": [0.1, 0.2, 0.3],\n      \"metadata\": { \"genre\": \"sci-fi\", \"title\": \"Voyager\" }\n    },\n    {\n      \"id\": \"vec-2\",\n      \"values\": [0.3, 0.1, 0.2],\n      \"metadata\": { \"genre\": \"fantasy\", \"title\": \"Dragon\" }\n    }\n  ]\n}\n```\n\nAlternatively, you can upsert using a JSONL file where each line is a vector object:\n\n```json\n{\"id\":\"vec-1\",\"values\":[0.1,0.2,0.3],\"metadata\":{\"genre\":\"sci-fi\",\"title\":\"Voyager\"}}\n{\"id\":\"vec-2\",\"values\":[0.3,0.1,0.2],\"metadata\":{\"genre\":\"fantasy\",\"title\":\"Dragon\"}}\n```\n\n```bash\n# Upsert vectors into the index via JSON or JSONL\npc index vector upsert --index-name my-index --namespace my-namespace --body ./vectors.jsonl\n\n# List vectors\npc index vector list --index-name my-index --namespace my-namespace\n\n# Fetch a vector by ID\npc index vector fetch --index-name my-index --namespace my-namespace --ids '[\"vec-1\"]'\n\n# Query by dense vector values\npc index vector query --index-name my-index --namespace my-namespace --vector '[0.1,0.2,0.3]' --top-k 3 --include-metadata\n\n# Query by existing vector ID\npc index vector query --index-name my-index --namespace my-namespace --id vec-1 --top-k 3\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinecone-io%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinecone-io%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinecone-io%2Fcli/lists"}