Usage#
As a command-line tool#
Pass a GitHub URL or owner/repo shorthand. Trailing slashes, a .git
suffix and www. are tolerated:
mibare BurntSushi/ripgrep
mibare https://github.com/BurntSushi/ripgrep
The mise registry’s backends for the repository are printed in registry order,
with the first marked as the recommendation. mibare needs a mise binary
(2026.10.13 or newer) on PATH and runs it in an isolated environment, so
your own mise settings never change the answer. GITHUB_TOKEN is passed
through when set. Set MIBARE_LOG_LEVEL (DEBUG, INFO, WARNING or
ERROR; default INFO) to change log verbosity.
Exit codes:
0: a recommendation was found.1: no backend was found.2: an error, such as input that is not a GitHub repository or a missing or too-oldmise.
As a library#
resolve() returns the structured candidates that the command prints:
examples/resolve_repository.py#
"""Resolve a GitHub repository to mise backends from Python."""
from mibare.core.mise import SubprocessMise
from mibare.core.resolve import resolve
def recommended_backend(repository: str) -> str | None:
"""Return the recommended backend string for a repository.
Args:
repository: A GitHub URL or ``owner/repo`` shorthand.
Returns:
str | None: The recommended backend string, or ``None`` when mise's
registry lists no backend for the repository.
"""
recommendation = resolve(repository, SubprocessMise()).recommendation
return recommendation.backend_string if recommendation else None