Repository navigation
feat: command and flag industry standard refactor - #71
Merged
Merged
Conversation
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.
Summary
Replaces the per-command
--log-levelwith a single logging setup, separates interactive UIs from log output, and makes commands and flags consistent across the CLI. Breaking changes are intentional ahead of v1.Logging
-q/--quietand-v/--verbose(-vinfo,-vvdebug), also settable as config keysquiet/verboseorAIBOMGEN_QUIET/AIBOMGEN_VERBOSE.--log-levelis removed.log/sloglogger writing to stderr, with debug lines for:-v.versionsubcommand, since-vis now taken.--versionstill works.Interactive mode vs. logging
-vvworks with interactive mode.--no-input) the command fails up front with a hint (--file,--yes, model IDs).-v, so redirected output has no escape codes.Consistency fixes (breaking)
scan [dir],validate|completeness|enrich|vuln-scan [file],generate [model-id...],merge [aibom...].-i/-m/--aibomstill work; giving both a single input and-iis an error. Extra positional args used to be silently ignored.--jsononvalidate,completenessandvuln-scan. It replacescompleteness --plain-summary.-y/--yesonenrichandvuln-scanreplaces--no-previewandvuln-scan --interactive.--strategyis removed.--file <yaml>selects file mode, and the hidden./config/enrichment.yamlfallback is gone.-f/--format(input) on enrich/validate/completeness/vuln-scan/merge,--output-format, andvalidate --check-model-card.--deduplicate(default on) becomes--no-deduplicate.generate.model-ids→model-id,merge.aiboms→aibom.--hf-modeis hidden; it stays available for the CI smoke test.--hf-token,--hf-base-urland--hf-timeoutnow exist on all four HF commands (generateandscangain--hf-base-url). Unset values fall back to the standardHF_TOKEN/HF_ENDPOINTenv vars.--; fang displayed them as--Input.Bugs fixed along the way
enrichhad no HF timeout (its default was0). It's now 10s everywhere; vuln-scan used 15s.enrich --refetchdefaulted tofalseas a flag buttrueindefaults.yaml, so behaviour depended on the working directory. It's nowtrue.README,
config/defaults.yamland the CI smoke test are updated. The CI summary line now comes fromcompleteness --json | jqinstead of--plain-summary.Related issue
Closes #69
Type of change
Breaking change (flags and config keys renamed or removed), new feature (logging,
--json, positional input,--no-input,--yes,version) and bug fixes (enrich timeout and refetch defaults, Ctrl-C exit code).go test ./...passes locally (also with-race)go build ./...passes locally