Using Pinecone CLI

1. Installing Pinecone CLI

OSInstall
macOSbrew install pinecone-io/tap/pinecone
Linux/macOScurl -fsSL https://raw.githubusercontent.com/pinecone-io/cli/main/install.sh | sh
WindowsDownload binary from GitHub releases
Verifypinecone version

2. Authenticating CLI

Example: Login

pinecone login                     # interactive browser auth
pinecone target -p my-project      # set target project
# or via env:
export PINECONE_API_KEY="..."

3. Listing Indexes

Example: List

pinecone index list
pinecone index list --json

4. Describing Index

Example: Describe

pinecone index describe --name products
FieldDescription
hostEndpoint URL
dimension/metricIndex config
specServerless or pod

5. Creating Index

Example: Serverless

pinecone index create-serverless \
  --name products \
  --dimension 1536 \
  --metric cosine \
  --cloud aws \
  --region us-east-1

6. Deleting Index

Example: Delete

pinecone index delete --name products --skip-confirmation
Warning: Disable deletion protection first if enabled.

7. Managing Collections

Example: Collections

pinecone collection create --name docs-2026-05 --source docs-pod
pinecone collection list
pinecone collection describe --name docs-2026-05
pinecone collection delete --name docs-2026-05

8. Viewing Statistics

Example: Stats

pinecone index stats --name products
pinecone index stats --name products --json | jq .

9. Configuring CLI Settings

CommandPurpose
pinecone targetSet default org/project
pinecone configView/edit config file
pinecone whoamiShow current auth context

10. Scripting CLI Operations

Example: CI Script

#!/usr/bin/env bash
set -euo pipefail

NAME="ci-test-$(date +%s)"
pinecone index create-serverless --name "$NAME" --dimension 1536 \
  --metric cosine --cloud aws --region us-east-1
trap "pinecone index delete --name $NAME --skip-confirmation" EXIT

# Run tests against $NAME ...