| sidebar_position | 1 | ||
|---|---|---|---|
| id | contributing-a-xircuits-component-library | ||
| title | Contributing a Xircuits Component Library | ||
| tags |
|
This section will focus on how to create a component library pull request so you can showcase your library in our Xircuits Component Library list! Users can interact with the component libraries featured in this list using the Xircuits component library command.
Before proceeding, ensure that you have already have your component library repository. We've provided a guide for that.
Navigate to the xai-components-manifest repository and fork it to your account. This gives you a personal copy to work on.
Clone your fork locally and create a feature branch:
git clone https://github.com/your_username/xai-components-manifest.git
cd xai-components-manifest
git checkout -b add-your-libsample-user@machine ~/xai-components-manifest
$ git clone https://github.com/sample-user/xai-components-manifest.git
Cloning into 'xai-components-manifest'...
...
$ cd xai-components-manifest
$ git checkout -b sample-user/add-xai-sample-library
Switched to branch 'sample-user/add-xai-sample-library'Add your component library details to xai_components_manifest.jsonl. You can do this via the command line or a text editor.
echo '{"path": "xai_components/xai-yourlib", "url": "https://github.com/your_username/xai-yourlib", "library_id": "YOURLIB", "git_ref": "main"}' \
>> xai_components_manifest.jsonl:::info
Don't forget that you should prepend xai_ to the directory name in order for your component library to be parsed by the Xircuits component tray. So if your repository name is xai-sample-library, please convert the hyphen ( - ) to underscore ( _ ).
:::
Once added, commit your change:
git add xai_components_manifest.jsonl
git commit -m "Add xai-yourlib to components manifest"To preview the metadata output, run:
python create_metadata.pyThis will generate:
index.jsonmetadata/<library_id>.json
Push your branch to your fork and open a pull request against XpressAI/xai-components-manifest. Include a description of your component library and link to its repository.
Once merged, your library will be available to all Xircuits users via the xircuits component library CLI command.
And you're done! We'll give a look at your PR as soon as possible, so keep track the review tab now and then. You can also join our Discord if you would like to discuss anything.