Thanks for contributing to the xfetch plugin ecosystem. This repository contains official plugins and the reference documentation for building new ones.
- Fork the repository and create a feature branch.
- Create or update a plugin directory at the repository root.
- 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 plugin standard. - Document the plugin in its own
README.mdand in README.md. - Update the platform compatibility table with the new plugin and its Linux/macOS/Windows support — required for every new or modified plugin.
- Open a pull request with usage details and any required external dependencies. PRs that fail CI are rejected.
- Use the binary naming convention
xfetch-plugin-<name>. - Keep plugins 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 plugin MUST have a runtime limit. Wrap all work in
with_timeout(fromxfetch_plugin_api) with aconst BUDGETthat fits the plugin (local probes: ~2 s, network calls: 15–25 s) and respond with fallback lines when the budget elapses. A plugin without a timeout is rejected: it could hang xfetch forever. This is enforced by CI.
The full protocol, discovery order, and testing workflow are documented in docs/README.md.