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.Getting help
The CLI provides help for commands at every level:Exit codes
All commands return exit code0
for success and 1
for error.
Available commands
This section describes all commands offered by the Pinecone CLI.Top-level commands
pc login (Authenticate via user login)
pc login (Authenticate via user login)
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
.UsageLong flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc auth login
. Both commands perform the same operation.pc logout (Clear credentials / log out)
pc logout (Clear credentials / log out)
- 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
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
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.pc target (Set target organization and project)
pc target (Set target organization and project)
Long flag | Short flag | Description |
---|---|---|
--clear | Clear target context | |
--json | Output in JSON format | |
--org | -o | Organization name |
--organization-id | Organization ID | |
--project | -p | Project name |
--project-id | Project ID | |
--show | -s | Display current target context |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc version (Show CLI version)
pc version (Show CLI version)
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc whoami (Show current user)
pc whoami (Show current user)
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc auth whoami
. Both commands perform the same operation.Authentication
pc auth clear (Clear specific credentials)
pc auth clear (Clear specific credentials)
Long flag | Short flag | Description |
---|---|---|
--api-key | Clear only the default (manually specified) API key | |
--service-account | Clear only service account credentials |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc auth logout
. Does not clear user login token or managed keys. For those, use pc auth logout
or pc auth local-keys prune
.pc auth configure (Configure service account or API key)
pc auth configure (Configure service account or API key)
Long flag | Short flag | Description |
---|---|---|
--api-key | Default API key to use for authentication | |
--client-id | Service account client ID | |
--client-secret | Service account client secret | |
--client-secret-stdin | Read client secret from stdin | |
--json | Output in JSON format | |
--project-id | -p | Target project ID (optional, interactive if omitted) |
--prompt-if-missing | Prompt for missing credentials |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
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.pc auth local-keys list (List managed keys)
pc auth local-keys list (List managed keys)
Long flag | Short flag | Description |
---|---|---|
--json | Output in JSON format | |
--reveal | Show the actual API key values (sensitive) |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc auth local-keys prune (Delete managed keys)
pc auth local-keys prune (Delete managed keys)
cli
/user
/all
) or project ID.UsageLong flag | Short flag | Description |
---|---|---|
--dry-run | Preview deletions without applying | |
--id | Prune keys for specific project ID only | |
--json | Output in JSON format | |
--origin | -o | Filter by origin - cli , user , or all (default: all ) |
--skip-confirmation | Skip confirmation prompt |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
--dry-run
to preview before committing.pc auth login (Authenticate via user login)
pc auth login (Authenticate via user login)
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc login
.pc auth logout (Clear authentication credentials)
pc auth logout (Clear authentication credentials)
- 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
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
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.pc auth status (Show authentication status)
pc auth status (Show authentication status)
Long flag | Short flag | Description |
---|---|---|
--json | Output in JSON format |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc auth whoami (Show current user information)
pc auth whoami (Show current user information)
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc whoami
.Indexes
pc index configure (Update index configuration)
pc index configure (Update index configuration)
Long flag | Short flag | Description |
---|---|---|
--deletion_protection | -p | Enable or disable deletion protection -enabled or disabled |
--json | Output in JSON format | |
--name | -n | Index name (required) |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc index create (Create a new index)
pc index create (Create a new index)
Long flag | Short flag | Description |
---|---|---|
--cloud | -c | Cloud provider - aws , gcp , or azure (required for serverless) |
--deletion_protection | Deletion protection - enabled or disabled | |
--dimension | -d | Vector dimension (required for standard indexes, optional for integrated) |
--field_map | Field mapping for integrated embedding (JSON map) | |
--json | Output in JSON format | |
--metric | -m | Similarity metric - cosine , euclidean , or dotproduct (required) |
--model | Integrated embedding model name | |
--name | -n | Index name (required) |
--read_parameters | Read parameters for embedding model (JSON map) | |
--region | -r | Cloud region |
--source_collection | Name of the source collection from which to create the index | |
--tags | Custom user tags (key=value pairs) | |
--vector_type | -v | Vector type - dense or sparse (serverless only) |
--write_parameters | Write parameters for embedding model (JSON map) |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc index delete (Delete an index)
pc index delete (Delete an index)
Long flag | Short flag | Description |
---|---|---|
--name | -n | Index name (required) |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc index describe (Show index details)
pc index describe (Show index details)
Long flag | Short flag | Description |
---|---|---|
--json | Output in JSON format | |
--name | -n | Index name (required) |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc index list (List all indexes)
pc index list (List all indexes)
Long flag | Short flag | Description |
---|---|---|
--json | Output in JSON format |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
Projects
pc project create (Create a new project)
pc project create (Create a new project)
Long flag | Short flag | Description |
---|---|---|
--force-encryption | Enable encryption with CMEK | |
--json | Output in JSON format | |
--name | -n | Project name (required) |
--target | Automatically target the project in the CLI after it’s created |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc project delete (Delete a project)
pc project delete (Delete a project)
Long flag | Short flag | Description |
---|---|---|
--id | -i | Project ID (optional, uses target project if not specified) |
--json | Output in JSON format | |
--skip-confirmation | Skip confirmation prompt |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc project describe (Show project details)
pc project describe (Show project details)
Long flag | Short flag | Description |
---|---|---|
--id | -i | Project ID (required) |
--json | Output in JSON format |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc project list (List all projects)
pc project list (List all projects)
Long flag | Short flag | Description |
---|---|---|
--json | Output in JSON format |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc project update (Update project settings)
pc project update (Update project settings)
Long flag | Short flag | Description |
---|---|---|
--force-encryption | -f | Enable/disable encryption with CMEK |
--id | -i | Project ID (required) |
--json | Output in JSON format | |
--name | -n | New project name |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
Organizations
pc organization delete (Delete an organization)
pc organization delete (Delete an organization)
Long flag | Short flag | Description |
---|---|---|
--id | -i | Organization ID (required) |
--json | Output in JSON format | |
--skip-confirmation | Skip confirmation prompt |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc organization describe (Show organization details)
pc organization describe (Show organization details)
Long flag | Short flag | Description |
---|---|---|
--id | -i | Organization ID (required) |
--json | Output in JSON format |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc organization list (List organizations)
pc organization list (List organizations)
Long flag | Short flag | Description |
---|---|---|
--json | Output in JSON format |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc organization update (Update organization settings)
pc organization update (Update organization settings)
Long flag | Short flag | Description |
---|---|---|
--id | -i | Organization ID (required) |
--json | Output in JSON format | |
--name | -n | New organization name |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
API keys
pc api-key create (Create a new API key)
pc api-key create (Create a new API key)
Long flag | Short flag | Description |
---|---|---|
--id | -i | Project ID (optional, uses target project if not specified) |
--json | Output in JSON format | |
--name | -n | Key name (required) |
--roles | Roles to assign (default: ProjectEditor ) | |
--store | Store the key locally for CLI use (automatically replaces any existing CLI-managed key) |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc api-key delete (Delete an API key)
pc api-key delete (Delete an API key)
Long flag | Short flag | Description |
---|---|---|
--id | -i | API key ID (required) |
--skip-confirmation | Skip confirmation prompt |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc api-key describe (Show API key details)
pc api-key describe (Show API key details)
Long flag | Short flag | Description |
---|---|---|
--id | -i | API key ID (required) |
--json | Output in JSON format |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc api-key list (List all API keys)
pc api-key list (List all API keys)
Long flag | Short flag | Description |
---|---|---|
--id | -i | Project ID (optional, uses target project if not specified) |
--json | Output in JSON format |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc api-key update (Update API key settings)
pc api-key update (Update API key settings)
Long flag | Short flag | Description |
---|---|---|
--id | -i | API key ID (required) |
--json | -j | Output in JSON format |
--name | -n | New key name |
--roles | -r | Roles to assign |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
Config
pc config get-api-key (Show configured API key)
pc config get-api-key (Show configured API key)
Long flag | Short flag | Description |
---|---|---|
--reveal | Show the actual API key value (sensitive) |
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc config set-api-key (Set default API key)
pc config set-api-key (Set default API key)
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |
pc config set-api-key "YOUR_API_KEY"
does the same thing as pc auth configure --api-key "YOUR_API_KEY"
. For control plane operations, a default API key implicitly overrides any previously set target context, because Pinecone API keys are scoped to a specific organization and project.pc config set-color (Enable/disable colored output)
pc config set-color (Enable/disable colored output)
Long flag | Short flag | Description |
---|---|---|
--help | -h | Show help information |
--quiet | -q | Suppress output |