Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.pinecone.io/llms.txt

Use this file to discover all available pages before exploring further.

This feature is in public preview.
The Pinecone CLI (pc) lets you manage Pinecone resources directly from your terminal.

Install

brew tap pinecone-io/tap
brew install pinecone-io/tap/pinecone

Authenticate

pc auth login
Visit the URL in your terminal to sign in. The CLI automatically sets your default organization and project. To target a different org/project:
pc target -o "my-org" -p "my-project"
For CI/CD or automation, you can also authenticate with a service account or API key.

Manage indexes

# List indexes
pc index list

# Create an index
pc index create -n my-index -d 1536 -m cosine -c aws -r us-east-1

# Get index details
pc index describe -n my-index

# Get index statistics
pc index stats -n my-index

Work with vectors

# Upsert vectors (from file or inline JSON)
pc index vector upsert -n my-index \
  --file '{"vectors": [{"id": "vec1", "values": [0.1, 0.2, 0.3], "metadata": {"genre": "comedy"}}]}' 

# Query (vector can be inline or in a file)
pc index vector query -n my-index \
  --vector '[0.1, 0.2, 0.3]' \
  --top-k 10 \
  --include-metadata

# Fetch by ID (from file or inline JSON)
pc index vector fetch -n my-index --ids '["vec1","vec2"]'

# List vector IDs from an index
pc index vector list -n my-index

Manage namespaces

# List namespaces
pc index namespace list -n my-index

# Create a namespace
pc index namespace create -n my-index --name tenant-a

# Delete a namespace
pc index namespace delete -n my-index --name tenant-a

Back up and restore

# Create a backup
pc backup create -i my-index -n "my-index-backup"

# List backups (show index, backup name, backup ID, etc.)
pc backup list -i my-index

# Restore from backup (by ID, not name)
pc backup restore -i c84725e5-5956-41ba-ab62-21ac7b5f2a2f -n restored-index

JSON output

Add -j to any command for JSON output:
pc index list -j
pc index describe -n my-index -j

Getting help

Use -h or --help with any command to see available options:
pc -h
pc index -h
pc index create -h

Next steps