From fcc6b59740306ee2065f365d230b30abbefcc7d2 Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Sat, 30 Nov 2024 13:27:54 -0600 Subject: [PATCH] Update tips-and-tricks.md --- docs/tips-and-tricks.md | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/docs/tips-and-tricks.md b/docs/tips-and-tricks.md index 93f758723c..4abd094f69 100644 --- a/docs/tips-and-tricks.md +++ b/docs/tips-and-tricks.md @@ -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] +```