Skip to main content
This document provides a complete reference for all Pinecone CLI commands.

Command structure

The Pinecone CLI uses a hierarchical command structure. Each command consists of a primary command followed by one or more subcommands and optional flags.
For example:

Getting help

The CLI provides help for commands at every level:

Exit codes

All commands return exit code 0 for success and 1 for error.

Available commands

This section describes all commands offered by the Pinecone CLI.

Top-level commands

DescriptionAuthenticate via a web browser. After login, set a target org and project with pc target before accessing data. This command defaults to an initial organization and project to which you have access (these values display in the terminal), but you can change them with pc target.Usage
FlagsNoneGlobal FlagsExample
This is an alias for pc auth login. Both commands perform the same operation.
DescriptionClears all authentication data from local storage, including:
  • User login token
  • Service account credentials (client ID and secret)
  • Default (manually specified) API key
  • Locally managed keys (for all projects)
  • Target organization and project context
Usage
FlagsNoneGlobal FlagsExample
This is an alias for pc auth logout. Both commands perform the same operation. Does not delete managed API keys from Pinecone’s servers. Run pc auth local-keys prune before logging out to fully clean up.
DescriptionSet the target organization and project for the CLI. Supports interactive organization and project selection or direct specification via flags. For details, see CLI target context.Usage
FlagsGlobal FlagsExample
DescriptionDisplays version information for the CLI, including the version number, commit SHA, and build date.Usage
FlagsNoneGlobal FlagsExample
DescriptionDisplays information about the currently authenticated user. To use this command, you must be authenticated via user login.Usage
FlagsNoneGlobal FlagsExample
This is an alias for pc auth whoami. Both commands perform the same operation.

Authentication

DescriptionSelectively clears specific authentication data without affecting other credentials. At least one flag is required.Usage
FlagsGlobal FlagsExample
More surgical than pc auth logout. Does not clear user login token or managed keys. For those, use pc auth logout or pc auth local-keys prune.
DescriptionConfigures service account credentials or a default (manually specified) API key.Service accounts automatically target the organization and prompt for project selection, unless there is only one project. A default API key overrides any previously specified target organization/project context. When setting a service account, this operation clears the user login token, if one exists. For details, see CLI target context.Usage
FlagsGlobal FlagsExample
pc auth configure --api-key "YOUR_API_KEY" does the same thing as pc config set-api-key "YOUR_API_KEY". To learn about targeting a project after authenticating with a service account, see CLI target context.
DescriptionDisplays all managed API keys stored locally by the CLI, with various details.Usage
FlagsGlobal FlagsExample
DescriptionDeletes locally stored managed API keys from local storage and Pinecone’s servers. Filters by origin (cli/user/all) or project ID.Usage
FlagsGlobal FlagsExample
This deletes keys from both local storage and Pinecone servers. Use --dry-run to preview before committing.
DescriptionAuthenticate via user login in the web browser. After login, set a target org and project.Usage
FlagsNoneGlobal FlagsExample
Tokens refresh automatically and remain valid for up to 120 days. If you’re inactive for more than 30 days, you must re-authenticate. Logging in clears any existing service account credentials. This command does the same thing as pc login.
DescriptionClears all authentication data from local storage, including:
  • User login token
  • Service account credentials (client ID and secret)
  • Default (manually specified) API key
  • Locally managed keys (for all projects)
  • Target organization and project context
Usage
FlagsNoneGlobal FlagsExample
This command does the same thing as pc logout. Does not delete managed API keys from Pinecone’s servers. Run pc auth local-keys prune before logging out to fully clean up.
DescriptionShows details about all configured authentication methods.Usage
FlagsGlobal FlagsExample
DescriptionDisplays information about the currently authenticated user. To use this command, you must be authenticated via user login.Usage
FlagsNoneGlobal FlagsExample
This command does the same thing as pc whoami.

Indexes

DescriptionModifies the configuration of an existing index.Usage
FlagsGlobal FlagsExample
Configuration changes may take some time to take effect.
DescriptionCreates a new index in your Pinecone project. Supports serverless, pod-based, integrated (with embedding model), and BYOC (Bring Your Own Cloud) index types.Usage
FlagsGlobal FlagsExample
For a list of valid regions for a serverless index, see Create a serverless index.
DescriptionPermanently deletes an index and all its data. This operation cannot be undone.Usage
FlagsGlobal FlagsExample
This command prompts for confirmation before deleting. Pass --skip-confirmation (or --json) to bypass the prompt in non-interactive contexts.
DescriptionDisplays detailed configuration and status information for a specific index.Usage
FlagsThe --name/-n flag is a deprecated alias for --index-name/-i.Global FlagsExample
DescriptionDisplays statistics for an index, including total vector count and namespace breakdown. Optionally filter results with a metadata filter.Usage
FlagsGlobal FlagsExample
DescriptionDisplays all indexes in your current target project, including various details.Usage
FlagsGlobal FlagsExample

Namespaces

DescriptionCreates a new namespace within an index. Namespaces allow you to partition vectors within an index.Usage
FlagsGlobal FlagsExample
DescriptionDeletes a namespace and all its vectors from an index. This operation cannot be undone.Usage
FlagsGlobal FlagsExample
Deleting a namespace removes all vectors in that namespace. This operation cannot be undone.
DescriptionDisplays detailed information about a specific namespace, including record count and schema configuration.Usage
FlagsGlobal FlagsExample
DescriptionLists all namespaces within an index, including vector counts.Usage
FlagsGlobal FlagsExample

Vectors

DescriptionDeletes vectors from an index by ID, filter, or deletes all vectors in a namespace.Usage
FlagsGlobal FlagsExample
Only --all-vectors prompts for confirmation. Targeted deletes with --ids or --filter proceed without a prompt. Pass --skip-confirmation (or --json) to bypass the --all-vectors prompt.
Vector deletion is permanent and cannot be undone.
DescriptionRetrieves vectors by their IDs or by a metadata filter, returning the vector values and metadata.Usage
FlagsGlobal FlagsExample
Use either --ids or --filter, not both. When using --ids, pagination flags are not applicable.
DescriptionLists vector IDs in a namespace with optional pagination.Usage
FlagsGlobal FlagsExample
DescriptionQueries an index for similar vectors using dense vectors, sparse vectors, or vector ID.Usage
FlagsGlobal FlagsExample
Use --id, --vector, or sparse vectors (--sparse-indices and --sparse-values) to specify what to query against. These options are mutually exclusive.
DescriptionUpdates a vector’s values, sparse values, or metadata by ID, or updates metadata for multiple vectors matching a filter.Usage
FlagsGlobal FlagsExample
Use either --id for single vector updates or --filter for bulk updates. These options are mutually exclusive.
DescriptionInserts or updates vectors in an index from a JSON or JSONL file, or inline JSON. The CLI automatically batches vectors for efficient uploading. Files can contain any number of vectors—the CLI splits them into batches and sends multiple API requests as needed.Usage
FlagsGlobal FlagsExample
Batch size limits: The API accepts up to 1000 vectors per request. The CLI defaults to batches of 500 vectors, but you can adjust this with --batch-size (up to 1000). Large files are automatically split into multiple batches.File size: There’s no explicit file size limit—the CLI reads the entire file into memory and batches it automatically. Very large files are supported as long as they fit in available system memory.

Records

DescriptionSearch an index namespace with a query text, query vector, or record ID and return the most similar records, along with their similarity scores. Optionally, rerank the initial results based on their relevance to the query.Searching with text is supported only for indexes with an integrated embedding configured. Searching with a query vector or record ID is supported for all indexes.Exactly one primary query mode must be provided:
  • --inputs — query text (requires an index with integrated embedding)
  • --id — use an existing record’s vector as the query
  • --vector — provide a dense vector directly (all index types)
  • --sparse-indices + --sparse-values — sparse vector (all index types)
Combine --vector with --sparse-indices/--sparse-values for hybrid search. Use --body to pass a full request object; flags take precedence over --body when both specify the same field.Usage
FlagsGlobal FlagsExamples
CLI
DescriptionUpsert records into an integrated index namespace from a JSON or JSONL payload.The --body flag accepts a JSON object containing a "records" array of IntegratedRecord objects, a raw JSON array of records, or a JSONL stream of records (one object per line). The value can be inline JSON, a path to a .json or .jsonl file, or - to read from stdin.Records are sent in batches. The default batch size is 96 (the API maximum). Use --batch-size to send smaller batches.Usage
FlagsGlobal FlagsExamples

Collections

DescriptionCreates a static copy of a pod-based index as a collection. Collections can be used to store a snapshot of an index’s data for backup or migration purposes.Usage
FlagsGlobal FlagsExample
CLI
DescriptionDeletes a collection permanently. This action cannot be undone.Usage
FlagsGlobal FlagsExample
This command prompts for confirmation before deleting. Pass --skip-confirmation (or --json) to bypass the prompt in non-interactive contexts.
DescriptionReturns detailed information about a single collection, including its state, dimension, size, vector count, and environment.Usage
FlagsGlobal FlagsExample
CLI
DescriptionLists all collections in your current project, sorted alphabetically by name.Usage
FlagsGlobal FlagsExample
CLI

Backups

DescriptionCreates a backup of a serverless index. Backups are static copies that only consume storage.Usage
FlagsGlobal FlagsExample
DescriptionPermanently deletes a backup. This operation cannot be undone.Usage
FlagsGlobal FlagsExample
This command prompts for confirmation before deleting. Pass --skip-confirmation (or --json) to bypass the prompt in non-interactive contexts.
Backup deletion is permanent and cannot be undone.
DescriptionDisplays detailed information about a specific backup.Usage
FlagsGlobal FlagsExample
DescriptionLists backups in the current project, optionally filtered by index name.Usage
FlagsGlobal FlagsExample
DescriptionCreates a new index from a backup.Usage
FlagsGlobal FlagsExample
DescriptionDisplays the status and details of a restore job.Usage
FlagsGlobal FlagsExample
DescriptionLists all restore jobs in the current project.Usage
FlagsGlobal FlagsExample

Imports

DescriptionStart an import that loads vector data from a storage provider into a serverless index. The URI must begin with the scheme of a supported provider (for example, s3://).For private buckets, configure a storage integration in the Pinecone console and pass the integration ID with --integration-id.Use --error-mode to control behavior when records fail: continue skips failing records and keeps going; abort stops the import on first error. Defaults to continue.Usage
FlagsGlobal FlagsExamples
CLI
DescriptionShow the current status and details of an import operation, including percent complete, records imported, and any error messages.Usage
FlagsGlobal FlagsExample
CLI
DescriptionList bulk import operations for the given index, with optional pagination.Usage
FlagsGlobal FlagsExamples
CLI
DescriptionCancel an import operation that is currently pending or in progress. Already-completed or failed imports cannot be canceled.Usage
FlagsGlobal FlagsExample
CLI

Projects

DescriptionCreates a new project in your target organization, using the specified configuration.Usage
FlagsGlobal FlagsExample
DescriptionPermanently deletes a project and all its resources. This operation cannot be undone.Usage
FlagsGlobal FlagsExample
Must delete all indexes and collections in the project first. If the deleted project is your current target, set a new target after deleting it.
DescriptionDisplays detailed information about a specific project, including various details.Usage
FlagsGlobal FlagsExample
DescriptionDisplays all projects in your target organization, including various details.Usage
FlagsGlobal FlagsExample
DescriptionModifies the configuration of the target project, or a specific project ID.Usage
FlagsGlobal FlagsExample

Organizations

DescriptionPermanently deletes an organization and all its resources. This operation cannot be undone.Usage
FlagsGlobal FlagsExample
This is a highly destructive action. Deletion is permanent. If the deleted organization is your current target, set a new target after deleting.
DescriptionDisplays detailed information about a specific organization, including name, ID, creation date, payment status, plan, and support tier.Usage
FlagsGlobal FlagsExample
DescriptionDisplays all organizations that the authenticated user has access to, including name, ID, creation date, payment status, plan, and support tier.Usage
FlagsGlobal FlagsExample
DescriptionModifies the configuration of the target organization, or a specific organization ID.Usage
FlagsGlobal FlagsExample

API keys

DescriptionCreates a new API key for the current target project or a specific project ID. Optionally stores the key locally for CLI use.Usage
FlagsGlobal FlagsExample
API keys are scoped to a specific organization and project.
DescriptionPermanently deletes an API key. Applications using this key immediately lose access.Usage
FlagsGlobal FlagsExample
Deletion is permanent. Applications using this key immediately lose access to Pinecone.
DescriptionDisplays detailed information about a specific API key, including its name, ID, project ID, and roles.Usage
FlagsGlobal FlagsExample
Does not display the actual key value.
DescriptionDisplays a list of all of the target project’s API keys, as found in Pinecone (regardless of whether they are stored locally by the CLI). Displays various details about each key, including name, ID, project ID, and roles.Usage
FlagsGlobal FlagsExample
Does not display key values.
DescriptionUpdates the name and roles of an API key.Usage
FlagsGlobal FlagsExample
Cannot change the actual key. If you need a different key, create a new one.

Config

DescriptionLists all CLI configuration settings and their current values. Sensitive values like api-key are masked by default; use --reveal to see the full value. Hidden settings such as environment are included when --all is passed.Usage
FlagsGlobal FlagsExample
CLI
DescriptionGets the current value of a configuration setting. Valid keys are: api-key, color, environment. Sensitive values like api-key are masked by default; use --reveal to see the full value.Usage
FlagsGlobal FlagsExample
DescriptionDisplays detailed information about a specific CLI configuration setting, including its current value, whether an environment variable is overriding it, and valid values. Valid keys are: api-key, color, environment.Usage
FlagsGlobal FlagsExample
CLI
DescriptionSets a CLI configuration value. Valid keys are: api-key, color, environment. The value is persisted to the local config file.Usage
FlagsGlobal FlagsExample
DescriptionResets a CLI configuration value to its default. Valid keys are: api-key, color, environment.Usage
FlagsGlobal FlagsExample