@@ -10,7 +10,7 @@ Work-in-progress Go CLI that scans a repository for **basic Hugging Face model u
1010What works today:
1111
1212- Basic scanning for Hugging Face model IDs in Python-like sources via ` from_pretrained("...") `
13- - AIBOM generation per detected model in JSON or XML
13+ - AIBOM generation per detected model in JSON or XML including correct dependencies and BOMrefs
1414- Hugging Face Hub API fetch to populate metadata fields
1515- Hugging Face Repo README fetch to populate more metadata fields
1616- Completeness scoring and validation of existing AIBOM files
@@ -20,7 +20,6 @@ What works today:
2020
2121What is future work:
2222
23- - Enhancing the resulting BOMs to include correct dependencies and BOMrefs
2423- Improving the scanner beyond the current regex-based Hugging Face detection
2524- Implementing the possibility to merge AIBOMs with existing sboms from a different source
2625- Implementing the possibility to sign AIBOMs with cosign
@@ -58,10 +57,7 @@ Common options:
5857- ` --hf-token <token> ` for gated/private models
5958- ` --hf-timeout <seconds> `
6059- ` --log-level quiet|standard|debug `
61-
62- Experimental/stubbed:
63-
64- - ` --enrich ` : attempts interactive completion, but the underlying enricher is not implemented yet.
60+ - ` --enrich ` : enable interactive metadata enrichment after generation
6561
6662### ` validate `
6763
@@ -95,13 +91,25 @@ Options:
9591
9692### ` enrich `
9793
98- Command exists, but is currently not implemented .
94+ Enriches an existing AIBOM by filling missing metadata fields interactively or from a configuration file .
9995
10096``` bash
101- ./aibomgen-cli enrich --help
10297./aibomgen-cli enrich -i dist/google-bert_bert-base-uncased_aibom.json
98+ ./aibomgen-cli enrich -i dist/google-bert_bert-base-uncased_aibom.json --strategy interactive
99+ ./aibomgen-cli enrich -i dist/google-bert_bert-base-uncased_aibom.json --strategy file --config config/enrichment.yaml
103100```
104101
102+ Options:
103+
104+ - ` --strategy interactive|file ` (default: ` interactive ` )
105+ - ` --config <path> ` : configuration file for file-based enrichment
106+ - ` --required-only ` : only enrich required fields
107+ - ` --min-weight <float> ` : minimum weight threshold for fields to enrich
108+ - ` --refetch ` : refetch metadata from Hugging Face Hub
109+ - ` --no-preview ` : skip preview before applying changes
110+ - ` --hf-token <token> ` : Hugging Face API token
111+ - ` --log-level quiet|standard|debug `
112+
105113### Global flags
106114
107115- ` --no-color ` : disable ANSI coloring
@@ -129,17 +137,25 @@ Repository scanning.
129137
130138### ` internal/fetcher `
131139
132- HTTP client for fetching model metadata from the Hugging Face Hub API ( ` /api/models/:id ` ) .
140+ HTTP clients for fetching model and dataset metadata from the Hugging Face Hub.
133141
134- - Used when ` generate --hf-mode online ` .
135- - Supports optional bearer token via ` --hf-token ` .
142+ - Fetches model metadata via API (` /api/models/:id ` ) and README (model cards)
143+ - Fetches dataset metadata via API (` /api/datasets/:id ` ) and README (dataset cards)
144+ - Used when ` generate --hf-mode online ` or when enriching with ` --refetch `
145+ - Supports optional bearer token via ` --hf-token ` for gated/private resources
146+ - Includes dummy implementations for offline/testing scenarios
147+ - Provides markdown extraction utilities for parsing model and dataset cards
136148
137149### ` internal/metadata `
138150
139- Central “ field registry” describing which CycloneDX ML -BOM fields we care about.
151+ Central " field registry" describing which CycloneDX AI -BOM fields we care about.
140152
141- - Defines keys, how to populate them (` Apply ` ), and how to check presence (` Present ` ).
142- - Used by ` internal/builder ` to populate the BOM and by ` internal/completeness ` to score it.
153+ - Defines field specifications for model components, dataset components, and Hugging Face properties
154+ - Each field has a key, weight, required status, apply logic, and presence check
155+ - Supports multiple field types: ` ComponentKey ` , ` ModelCardKey ` , ` HFPropsKey ` , and ` DatasetKey `
156+ - Used by ` internal/builder ` to populate the BOM and by ` internal/completeness ` to score it
157+ - Used by ` internal/enricher ` to identify missing fields and apply new values
158+ - Includes helpers for parsing and applying metadata from API responses and model/dataset cards
143159
144160### ` internal/builder `
145161
@@ -177,14 +193,29 @@ Validates an existing AIBOM.
177193
178194### ` internal/enricher `
179195
180- Intended to interactively fill missing metadata fields.
196+ Interactively or automatically fills missing metadata fields in an existing AIBOM .
181197
182- - Current status: stubbed / not implemented.
183- - Future work: implement user prompting and (optionally) model card fetching.
198+ - Supports two strategies: ` interactive ` (prompts user for values) and ` file ` (reads from config)
199+ - Can refetch metadata from Hugging Face Hub to fill known fields automatically
200+ - Enriches both model components and dataset components
201+ - Shows before/after preview with completeness scoring
202+ - Integrates with the metadata field registry to identify and fill missing fields
203+ - Respects field weights and required status when prompting
184204
185205### ` internal/ui `
186206
187- Very small ANSI-color helper used for banners and colored log prefixes.
207+ Comprehensive TUI (Terminal User Interface) system built with Charm libraries (Lipgloss, Bubbletea concepts).
208+
209+ - Provides rich, styled output for all commands (generate, validate, completeness, enrich)
210+ - Implements workflow tracking with task progress indicators
211+ - Defines a consistent color palette and text styles across the application
212+ - Includes specialized UI components for each command:
213+ - ` generate.go ` : generation workflow with progress tracking
214+ - ` validation.go ` : validation results with colored status indicators
215+ - ` completeness.go ` : completeness scoring with visual field breakdown
216+ - ` workflow.go ` : task-based progress tracking
217+ - ` progress.go ` : spinner and progress indicators
218+ - ` styles.go ` : centralized styling and color definitions
188219
189220## Docs and examples
190221
0 commit comments