A centralized repository for managing metadata of Xircuits remote component libraries. This manifest enables Xircuits to dynamically discover, configure, and install remote component libraries without requiring a full release of Xircuits.
├── xai_components_manifest.jsonl # JSONL manifest of all remote component libraries
├── create_metadata.py # Script to generate per-library metadata
├── index.json # Auto-generated; lists all metadata files
└── metadata/ # Auto-generated; one JSON file per library
├── xai_pycaret.json
├── xai_modelstash.json
└── ...
- Python 3.9+
git
installed and on yourPATH
- Python packages (install via
pip
):pip install toml
Add a new entry to the manifest file xai_components_manifest.jsonl
. You can do this via the command line or a text editor.
echo '{"path": "xai_components/xai_twilio", "url": "https://github.com/XpressAI/xai-twilio", "library_id": "TWILIO", "git_ref": "main"}' \
>> xai_components_manifest.jsonl
Open xai_components_manifest.jsonl
in your preferred editor and append a new line:
{"path": "xai_components/xai_twilio", "url": "https://github.com/XpressAI/xai-twilio", "library_id": "TWILIO", "git_ref": "main"}
Run the create_metadata.py
script. This will:
- Clone each repository listed in
xai_components_manifest.jsonl
. - Extract relevant fields from each library’s
pyproject.toml
(from[project]
andtool.xircuits
). - Fill missing values with defaults (
"N/A"
or empty lists). - Produce an
index.json
and ametadata/
folder containing one JSON file per library.
python create_metadata.py
After running, you’ll see:
-
index.json: An array of objects, each with:
library_id
path
metadata
(relative path to the per-library JSON file)
-
metadata/<library_id>.json: For each component library, a JSON file with fields:
- Manifest data:
path
,url
,library_id
,git_ref
- Project data:
version
,description
,authors
,license
,readme
,repository
,keywords
,requirements
- Manifest data:
Xircuits clones and reads index.json
at startup to locate each library’s metadata. It uses this information to:
- Build the
component_library_config.json
- Clone and install remote component libraries as needed
Keep this manifest up to date whenever adding, removing, or updating a remote component library.
- Add CI checks to ensure
index.json
andmetadata/
files are in sync. - Implement a static site generator to render library metadata automatically.
- Support versioning or tagging beyond a simple
git_ref
.