pinecone-cli

작성자: pinecone-io

터미널에서 Pinecone 리소스를 관리하기 위한 Pinecone CLI(pc) 사용 가이드입니다. CLI는 모든 인덱스 유형(표준, 통합, 희소)과 모든…

npx skills add https://github.com/pinecone-io/skills --skill pinecone-cli

Pinecone CLI (pc)

Manage Pinecone from the terminal. The CLI is especially valuable for vector operations across all index types — something the MCP currently can't do.

CLI vs MCP

CLIMCP
Index typesAll (standard, integrated, sparse)Integrated only
Vector ops (upsert, query, fetch, update, delete)
Text search on integrated indexes
Backups, namespaces, org/project mgmt
CI/CD / scripting

Setup

Install (macOS)

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

Other platforms (Linux, Windows) — download from GitHub Releases.

Authenticate

# Interactive (recommended for local dev)
pc login
pc target -o "my-org" -p "my-project"

# Service account (recommended for CI/CD)
pc auth configure --client-id "$PINECONE_CLIENT_ID" --client-secret "$PINECONE_CLIENT_SECRET"

# API key (quick testing)
pc config set-api-key $PINECONE_API_KEY

Check status: pc auth status · pc target --show

Note for agent sessions: If you need to run pc login inside an agent loop, the browser auth link may not surface correctly. It's best to authenticate before starting an agent session. Run pc login in your terminal directly, then invoke the agent once you're authenticated.

Authenticating the CLI does not set PINECONE_API_KEY

pc login authenticates the CLI tool itself — it does not set PINECONE_API_KEY in your environment. Python scripts, Node.js SDKs, and other tools that use the Pinecone SDK need PINECONE_API_KEY set separately.

Use the CLI to create a key and export it in one step:

KEY=$(pc api-key create --name agent-sdk-key --json | jq -r '.value')
export PINECONE_API_KEY="$KEY"

Without jq: run pc api-key create --name agent-sdk-key --json and copy the "value" field manually.


Common Commands

TaskCommand
List indexespc index list
Create serverless indexpc index create -n my-index -d 1536 -m cosine -c aws -r us-east-1
Index statspc index stats -n my-index
Upload vectors from filepc index vector upsert -n my-index --file ./vectors.json
Query by vectorpc index vector query -n my-index --vector '[0.1, ...]' -k 10 --include-metadata
Query by vector IDpc index vector query -n my-index --id "doc-123" -k 10
Fetch vectors by IDpc index vector fetch -n my-index --ids '["vec1","vec2"]'
List vector IDspc index vector list -n my-index
Delete vectors by filterpc index vector delete -n my-index --filter '{"genre":"classical"}'
List namespacespc index namespace list -n my-index
Create backuppc backup create -i my-index -n "my-backup"
JSON output (for scripting)Add -j to any command

Interesting Things You Can Do

Query with custom vectors (not just text)

Unlike the MCP, the CLI lets you query any index with raw vector values — useful when you generate embeddings externally (OpenAI, HuggingFace, etc.):

pc index vector query -n my-index \
  --vector '[0.1, 0.2, ..., 0.9]' \
  --filter '{"source":{"$eq":"docs"}}' \
  -k 20 --include-metadata

Pipe embeddings directly into queries

jq -c '.embedding' doc.json | pc index vector query -n my-index --vector - -k 10

Bulk metadata update with preview

# Preview first
pc index vector update -n my-index \
  --filter '{"env":{"$eq":"staging"}}' \
  --metadata '{"env":"production"}' \
  --dry-run

# Apply
pc index vector update -n my-index \
  --filter '{"env":{"$eq":"staging"}}' \
  --metadata '{"env":"production"}'

Backup and restore

# Snapshot before a migration
pc backup create -i my-index -n "pre-migration"

# Restore to a new index if something goes wrong
pc backup restore -i <backup-uuid> -n my-index-restored

Automate in CI/CD

export PINECONE_CLIENT_ID="..."
export PINECONE_CLIENT_SECRET="..."
pc auth configure --client-id "$PINECONE_CLIENT_ID" --client-secret "$PINECONE_CLIENT_SECRET"
pc index vector upsert -n my-index --file ./vectors.jsonl --batch-size 1000

Script against JSON output

# Get all index names as a list
pc index list -j | jq -r '.[] | .name'

# Check if an index exists before creating
if ! pc index describe -n my-index -j 2>/dev/null | jq -e '.name' > /dev/null; then
  pc index create -n my-index -d 1536 -m cosine -c aws -r us-east-1
fi

Reference Files

Documentation

pinecone-io의 다른 스킬

assistant
pinecone-io
Pinecone Assistant를 생성, 관리하고 문서 Q&A 및 인용을 위해 대화합니다. 모든 어시스턴트 작업(생성, 업로드, 동기화, 채팅, 컨텍스트 등)을 처리합니다.
official
cli
pinecone-io
Pinecone CLI(pc)를 사용하여 터미널에서 Pinecone 리소스를 관리하는 가이드입니다. CLI는 모든 인덱스 유형(표준, 통합, 희소)과 모든…
official
help
pinecone-io
사용 가능한 모든 Pinecone 스킬의 개요와 시작하기 위해 필요한 사항. 사용자가 어떤 스킬이 있는지, 어떻게 시작해야 하는지 물을 때 호출됩니다.
official
mcp
pinecone-io
Pinecone MCP 서버 도구에 대한 참조입니다. list-indexes, describe-index, describe-index-stats, create-index-for-model 등 사용 가능한 모든 도구를 문서화합니다.
official
pinecone-assistant
pinecone-io
Pinecone Assistant를 생성, 관리하고 문서 Q&A 및 인용 기능을 제공하는 채팅을 수행합니다. 모든 어시스턴트 작업(생성, 업로드, 동기화, 채팅, 컨텍스트 등)을 처리합니다.
official
pinecone-docs
pinecone-io
Pinecone으로 개발하는 개발자를 위한 선별된 문서 참고 자료입니다. 주제별로 정리된 공식 문서 링크와 데이터 형식 참조를 포함합니다. 다음 상황에서 사용하세요…
official
pinecone-full-text-search
pinecone-io
Pinecone 전체 텍스트 검색(FTS) 인덱스를 생성하고, 데이터를 수집하며, 프리뷰 API(2026-01.alpha, 공개 프리뷰)를 사용하여 쿼리합니다. 사용자나 에이전트가 요청할 때 사용하세요.
official
pinecone-help
pinecone-io
사용 가능한 모든 Pinecone 스킬의 개요와 시작하기 위해 필요한 사항. 사용자가 어떤 스킬이 있는지, 어떻게 시작해야 하는지 물을 때 호출됩니다.
official