A repository of package suggestions based on a fuzzy name.
- Create a new JSON file in the
matchers/directory (e.g.,matchers/my_package.json). - Add the following structure to the file:
{
"matcher": "(?i)^(?:.*)\bmy_package\b",
"test_ok": ["my_package", "I need my_package"],
"test_fail": ["other_package", "not_my_package"],
"packages": [{ "name": "my-system-package", "manager": "apt" }]
}matcher: A Go-compatible regular expression to match the package name.test_ok: A list of strings that must match the regex.test_fail: A list of strings that must not match the regex.packages: A list of system packages to suggest if the matcher succeeds. Each package object contains:name: The system package name.manager: The package manager (e.g.,apt,dnf,brew).
To test your new matcher and regenerate the registry, run:
go run main.go > registry.jsonThis command validates all matchers against their test cases and outputs the
combined registry to registry.json. If any test case fails, the command will
exit with an error log.
Alternatively, you can use the interactive GUI tool to create and test matchers.
- Open the GUI in your browser: https://credoproject.github.io/package-suggestions/
- Use the interface to define your regex, test cases, and suggested packages.
- Download the generated JSON file and place it in the
matchers/directory.