Skip to content

CLI: accept multiple files and replace positional OUT_PATH with -o flag#274

Open
kkozik-amplify wants to merge 1 commit intorelease/8.xfrom
cli-file-globbing
Open

CLI: accept multiple files and replace positional OUT_PATH with -o flag#274
kkozik-amplify wants to merge 1 commit intorelease/8.xfrom
cli-file-globbing

Conversation

@kkozik-amplify
Copy link
Collaborator

@kkozik-amplify kkozik-amplify commented Mar 11, 2026

Summary

  • Both hcl2tojson and jsontohcl2 now accept multiple positional PATH arguments
  • Positional OUT_PATH replaced with -o/--output flag (breaking change, acceptable during RC)
  • Shell glob expansion works naturally (e.g. hcl2tojson *.tf -o out/)
  • Added _convert_multiple_files helper in cli/helpers.py

Caused by #49

Test plan

  • All 717 existing tests pass
  • New tests for multi-file dispatch in both CLI entry points
  • New tests for _convert_multiple_files helper
  • Pre-commit hooks pass (black, mypy, pylint)
  • Manual: hcl2tojson a.tf b.tf outputs both to stdout
  • Manual: hcl2tojson *.tf -o out/ writes to output directory

🤖 Generated with Claude Code

…ag (#49)

Both hcl2tojson and jsontohcl2 now accept multiple positional PATH
arguments. Output is specified via -o/--output instead of a positional
arg. Shell glob expansion (e.g. hcl2tojson *.tf -o out/) works naturally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kkozik-amplify kkozik-amplify marked this pull request as ready for review March 11, 2026 16:32
@kkozik-amplify kkozik-amplify requested a review from a team as a code owner March 11, 2026 16:32
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.

2 participants