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 b0cac9e commit 9347be8
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions docs/tips-and-tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ console.log(`Running node: ${process.version}`);
This can also be useful in environments where mise isn't activated
(such as a non-interactive session).

You can also download the https://mise.run script to use in a project bootstrap script:

```sh
curl https://mise.run > setup-mise.sh
chmod +x setup-mise.sh
./setup-mise.sh
```

::: tip
This file contains checksums so it's more secure to commit it into your project rather than
calling `curl https://mise.run` dynamically—though of course this means it will only fetch
the version of mise that was current when the script was created.
:::

## CI/CD

Using mise in CI/CD is a great way to synchronize tool versions for dev/build.
Expand Down Expand Up @@ -75,13 +89,13 @@ jobs:

## `mise set`

Instead of manually editing `mise.toml` to add env vars, you can use `mise set` instead:
Instead of manually editing `mise.toml` to add env vars, you can use [`mise set`](/cli/set.html) instead:

```sh
mise set NODE_ENV=production
```

## `mise run` shorthand
## [`mise run`](/cli/run.html) shorthand

As long as the task name doesn't conflict with a mise-provided command you can skip the `run` part:

Expand All @@ -102,7 +116,7 @@ brew install gpg
mise use -g cosign slsa-verify
```

## `mise up --bump`
## [`mise up --bump`](/cli/upgrade.html)

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"`.
Expand All @@ -116,12 +130,12 @@ so if you use `cargo:` you should add this to make `mise i` go much faster.
mise use -g cargo-binstall
```

## `mise cache clear`
## [`mise cache clear`](/cli/cache.html)

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`](/cli/en.html)

`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.
Expand All @@ -135,7 +149,7 @@ Auto-install tools when entering a project by adding the following to `mise.toml
enter = "mise i -q"
```

## `mise tool [TOOL]`
## [`mise tool [TOOL]`](/cli/tool.html)

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

Expand All @@ -149,7 +163,7 @@ Config Source: ~/src/mise/mise.toml
Tool Options: [none]
```

## `mise cfg`
## [`mise cfg`](/cli/config.html)

List the config files mise is reading in a particular directory with `mise cfg`:

Expand Down

0 comments on commit 9347be8

Please sign in to comment.