Skip to content

Feat/interactive mode - #130

Open
viveksahu26 wants to merge 4 commits into
mainfrom
feat/interactive_mode
Open

Feat/interactive mode#130
viveksahu26 wants to merge 4 commits into
mainfrom
feat/interactive_mode

Conversation

@viveksahu26

@viveksahu26 viveksahu26 commented Apr 30, 2025

Copy link
Copy Markdown
Contributor

closes #127

This PR adds the following changes:

  • Adds the interactive mode for sbommv usage
  • Tested.
$ go run main.go transfer --interactive

Welcome to the sbommv transfer interactive setup!
✔ GitHub (fetch from  API, Release, Tool)
Step 2: Enter GitHub repository or organization URL (e.g., https://github.com/interlynk-io/sbomqs): https://github.com/interlynk-io/sbomqs
✔ API (Dependency Graph)
✔ Folder (save to a local directory)
Step 4: Enter folder path to save SBOMs (e.g., ./temp): temp
Step 5: Global flags
  Enable debug logging for detailed output
✔ No
debugIndex:  0
  Run in dry-run mode (simulate without executing)?
✔ No
  Choose processing mode
✔ Sequential (process one SBOM at a time)
  Overwrite existing SBOMs at destination?
✔ No

Ready to run this command:
sbommv transfer --input-adapter=github --output-adapter=folder --processing-mode=sequential --in-github-url=https://github.com/interlynk-io/sbomqs --in-github-method=api --out-folder-path=temp
✔ Yes
2025-04-30T22:43:30.598+0530    INFO    logger/log.go:102       wrote   {"path": "temp/ca2b613d-9f2b-4698-8f6f-80f962a5459b.sbom.json"}
2025-04-30T22:43:30.598+0530	INFO	logger/log.go:102	wrote	{"sboms": 1, "success": 1, "failed": 0}

See ss:
image

@viveksahu26
viveksahu26 marked this pull request as ready for review May 1, 2025 17:58
@viveksahu26
viveksahu26 requested a review from riteshnoronha May 1, 2025 17:58
@viveksahu26

Copy link
Copy Markdown
Contributor Author

We should https://github.com/charmbracelet/huh library for better interactive CLI>

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.

Add interactive way to SBOM transfer with easy prompts

1 participant