Skip to content

feat: Add optional name field to file entries and --only filter to get command - #6

Merged
erickzanardo merged 2 commits into
mainfrom
copilot/enhance-pepper-sprite-yaml
Apr 12, 2026
Merged

feat: Add optional name field to file entries and --only filter to get command#6
erickzanardo merged 2 commits into
mainfrom
copilot/enhance-pepper-sprite-yaml

Conversation

Copilot AI commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

The pepper-sprite.yaml files entries lacked a human-readable identifier, making it impossible to selectively process a single file without editing the config. This adds an optional name field to file entries and a corresponding --only flag on the get command.

Changes

  • FileConfig — adds optional name field parsed from YAML; fully backward-compatible (field is omitted if absent)
  • get command — adds --only <name> option; when provided, filters the parsed config list to the single matching entry; exits with a usage error if no entry matches
  • Tests — covers --only with no matching name and entries lacking a name field

Usage

# pepper-sprite.yaml
files:
  - name: buildings
    fileId: "Z8y1MP7R7z2u31aJq01N"
    output: "assets/images/buildings.png"
  - name: tiles
    fileId: "w7Oy7gJXkBWUJgW7Y1jj"
    output: "assets/images/tiles.png"
# Download and export only the "tiles" entry
pepper_sprite_cli get -k <api-key> --only tiles

Copilot AI changed the title [WIP] Add name entry to pepper-sprite.yaml for better file identification feat: Add optional name field to file entries and --only filter to get command Apr 12, 2026
Copilot AI requested a review from erickzanardo April 12, 2026 23:02
@erickzanardo
erickzanardo marked this pull request as ready for review April 12, 2026 23:04
@erickzanardo
erickzanardo merged commit c39fbd7 into main Apr 12, 2026
4 checks passed
@erickzanardo
erickzanardo deleted the copilot/enhance-pepper-sprite-yaml branch April 12, 2026 23: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.

feat: Enahnce pepper-sprite.yaml adding name entry

2 participants