Using Pinecone CLI
1. Installing Pinecone CLI
| OS | Install |
| macOS | brew install pinecone-io/tap/pinecone |
| Linux/macOS | curl -fsSL https://raw.githubusercontent.com/pinecone-io/cli/main/install.sh | sh |
| Windows | Download binary from GitHub releases |
| Verify | pinecone 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
| Field | Description |
| host | Endpoint URL |
| dimension/metric | Index config |
| spec | Serverless 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
| Command | Purpose |
pinecone target | Set default org/project |
pinecone config | View/edit config file |
pinecone whoami | Show 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 ...