misex

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package misex runs mise and decodes its JSON output.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotInstalled = errors.New("mise is not installed")

ErrNotInstalled is returned when mise isn't on PATH.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client runs mise.

func New

func New(r Runner) *Client

New returns a client that runs mise through r.

func (*Client) Registry

func (c *Client) Registry(ctx context.Context) ([]RegistryEntry, error)

Registry returns the output of `mise registry --json`. mise has no JSON stability policy, so unknown fields are ignored.

func (*Client) Which

func (c *Client) Which(ctx context.Context, bin string) (string, error)

Which returns the path of the executable a mise shim named bin runs, from `mise which`.

type RegistryEntry

type RegistryEntry struct {
	Short    string   `json:"short"`
	Backends []string `json:"backends"`
	Aliases  []string `json:"aliases,omitempty"`
}

RegistryEntry is one tool in `mise registry --json`, which lists aliases as extra entries too.

type Runner

type Runner interface {
	Run(ctx context.Context, c execx.Cmd) (*execx.Result, error)
}

Runner starts a command; execx.Runner implements it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL