Skip to content

feat(cli): add packument show command with field projection#22

Merged
indexzero merged 2 commits intomainfrom
feat/packument-show-select
Feb 2, 2026
Merged

feat(cli): add packument show command with field projection#22
indexzero merged 2 commits intomainfrom
feat/packument-show-select

Conversation

@indexzero
Copy link
Owner

  • Packument show command: display cached packuments with optional field projection

    • New packument show <name[@version]> command with --select option
    • Parse name@version syntax for scoped and unscoped packages
    • Narrow output to version-specific data when version specified
    • Unwrap single-field results for cleaner pipeline output
    • CLI documentation with selector syntax examples
  • Bracket notation in selector paths: access keys containing dots or special characters

    • time["4.17.21"] syntax for version strings with dots
    • versions["1.0.0"].dist.integrity mixed notation support
    • Numeric array access via items[0]
    • State machine parser for bracket/dot segment parsing
    • Updated alias extraction for bracket notation paths

indexzero and others added 2 commits February 1, 2026 22:30
Extend the projection module to support bracket notation in paths:
- time["4.17.21"] for accessing keys with special characters
- versions["1.0.0"].dist.integrity for mixed notation
- items[0] for numeric array access

This enables field selection for packument lookups where version
strings contain dots and other special characters.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add new packument show command for displaying cached packuments
with optional field projection:
- Parse name@version syntax for version-specific output
- Support --select for field projection using selector syntax
- Handle bracket notation for version keys (time["4.17.21"])
- Unwrap single-field results for cleaner output

Useful for:
- Build verification (checking integrity hashes)
- Audit scripts (checking publish dates)
- Quick lookups (version counts, tarball URLs)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@indexzero indexzero merged commit d685fd1 into main Feb 2, 2026
1 check passed
@indexzero indexzero deleted the feat/packument-show-select branch February 2, 2026 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant