Normalize --index-name flag and shorthand conventions#92
Merged
Conversation
Introduce a semantic split: --index-name (-i) always refers to an existing index; --name always names a resource being created. Apply this consistently across all index subcommands. - describe/delete/configure: rename --name to --index-name (-i); keep --name (-n) as a deprecated alias for the transition period - All other --index-name flags: drop the -n shorthand in favor of -i - Remove -i from --id on vector query and import cancel/describe to free up -i for --index-name
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 91d709d. Configure here.
austin-denoble
added a commit
that referenced
this pull request
Jun 9, 2026
## Problem `AGENTS.md` and `README.md` were last updated before several significant PRs landed (#84–#92) and still carried public-preview language, stale command references, and large gaps in coverage. ## Solution **`README.md`** - Removed the public-preview warning banner - Fixed two legacy `pc config set-api-key` references → `pc config set api-key` - Fixed `pc index upsert` → `pc index vector upsert` in the working-with-data intro - Expanded the data-plane overview: reorganized `pc index vector` commands under a "dense/sparse vectors" subheading, added `pc index record` (integrated indexes) and `pc index namespace` entries - Added a new "Index management commands" section covering `pc index backup`, `pc index restore`, `pc index import`, and `pc index collection` **`AGENTS.md`** - Removed "public preview" from the project description - Corrected the VectorDB root group (collection/backup/restore now live under `pc index`, not at the root) - Added `pc index` internal subgroup table (Data, Namespace, Index Management including the new `import`) - Documented the canonical `pc config` key-based interface (`get`/`set`/`unset`/`list`/`describe`) - Added `scripts/` to the key directories table - Added a new "Patterns for writing commands" section covering: output/error/exit packages (`msg`, `style`, `exit`, `text`), help-text helpers, custom JSON flag types, the narrow-interface testability pattern, target org/project access, and logging - Added a "Notable environment variables" table (`PINECONE_API_KEY`, `PINECONE_ENVIRONMENT`, `PINECONE_LOG_LEVEL`, `PINECONE_CLI_MAX_JSON_BYTES`) ## Type of Change - [X] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [X] Non-code change (docs, etc)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
The CLI had two different flag names for the same concept depending on context. Core index lifecycle commands (
describe,delete,configure) used--nameto identify the index, while every other command that operated on an index (vector ops, imports, namespaces, backups, stats) used--index-name. This meant users had to remember which "mode" they were in, and made scripting inconsistent.A secondary issue:
--index-namehad-nas its shorthand on most commands, which doesn't correspond to the first letter of either word in the flag name and conflicted with the mental model that-n=--name.Solution
Introduce a clear semantic split enforced uniformly across all index subcommands:
--index-name(-i) — always refers to an existing index being operated on--name(-n) — always names a resource being created or labeled (new index, backup name, namespace name, etc.)Changes by group
index describe,index delete,index configure(breaking for these three):--nameto--index-namewith shorthand-i--name/-nkept as a deprecated alias viaMarkDeprecated— prints a warning but continues to work, validated viaPreRunEso either flag satisfies the required check--index-nameAll other
--index-namecommands (stats, vector/*, record/*, import/*, namespace/*, backup/*):-nto-ito match the new convention--idonvector query,import cancel,import describe:-iremoved to free it up for--index-name; these flags take UUIDs that are always pasted, not typed, so the shorthand had no ergonomic value, alongside being 2 fewer characters than the full flag.Type of Change
Test Plan
just test-unitpassespc index describe --name <idx>should print a deprecation warning and still return resultspc index describe --index-name <idx>andpc index describe -i <idx>work as expected--index-nameon all describe/delete calls