Thanks for contributing to the xfetch extension ecosystem. This repository contains the official config-provider extensions.
- Fork the repository and create a feature branch.
- Create or update an extension directory at
extensions/<name>. - Run
cargo test --workspace. -
Run the full CI locally before opening the PR:
bash scripts/ci.sh(Linux/macOS) or./scripts/ci.ps1(Windows). The CI checks tests and the extension standard. - Document the extension in its own
README.mdand in the repositoryREADME.md. - Update the platform compatibility table with the new extension and its Linux/macOS/Windows support — required for every new or modified extension.
- Open a pull request with usage details and any required external dependencies. PRs that fail CI are rejected.
- Use the binary naming convention
xfetch-extension-<name>. - Keep extensions focused on a single responsibility.
- Write errors to stderr and exit with a non-zero status on failure.
- Prefer stable, actively maintained dependencies and keep them minimal.
-
Every extension MUST have a runtime limit. Wrap all work
in
with_timeout(fromxfetch_extension_api) with aconst BUDGETthat fits the extension and exit with an error when the budget elapses. An extension without a timeout is rejected: it could hang the config load forever. This is enforced by CI.
The full stdin/stdout JSON protocol is defined in the
xfetch-cli/api repository
(crates/extension-api).