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
4. Describing Index
| 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
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 |