Skip to content

Commit

Permalink
Update tips-and-tricks.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx authored Nov 30, 2024
1 parent 5071419 commit fcc6b59
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions docs/tips-and-tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,50 @@ Install cosign, slsa-verify, and gpg (cosign and slsa-verify can be installed wi
brew install gpg
mise use -g cosign slsa-verify
```

## `mise up --bump`

Use `mise up --bump` to upgrade all software to the latest version and update `mise.toml` files. This keeps the same semver range as before,
so if you had `node = "20"` and node 22 is the latest, `mise up --bump node` will change `mise.toml` to `node = "22"`.

## cargo-binstall

cargo-binstall is sort of like ubi but specific to rust tools. It fetches binaries for cargo releases. mise will use this automatically for `cargo:` tools if it is installed
so if you use `cargo:` you should add this to make `mise i` go much faster.

```sh
mise use -g cargo-binstall
```

## `mise cache clear`

mise caches things for obvious reasons but sometimes you want it to use fresh data (maybe it's not noticing a new release). Run `mise cache clear` to remove the cache which
basically just run `rm -rf ~/.cache/mise/*`.

## `mise en`

`mise en` is a great alternative to `mise activate` if you don't want to always be using mise for some reason. It sets up the mise environment in your current directory
but doesn't keep running and updating the env vars after that.

## Auto-install when entering a project

Auto-install tools when entering a project by adding the following to `mise.toml`:

```toml
[hooks]
enter = "mise i -q"
```

## `mise tool [TOOL]`

Get information about what backend a tool is using and other information with `mise tool [TOOL]`:

```sh
❯ mise tool ripgrep
Backend: aqua:BurntSushi/ripgrep
Installed Versions: 14.1.1
Active Version: 14.1.1
Requested Version: latest
Config Source: ~/src/mise/mise.toml
Tool Options: [none]
```

0 comments on commit fcc6b59

Please sign in to comment.