5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

miseのセットアップ(本体&開発ツール)

5
Last updated at Posted at 2026-01-11

はじめに

本記事は どすこい塾 Advent Calendar 2025 の19日目の記事です。
昨日も @uhooiUnity as a LibraryでUnityからSwiftの処理を呼ぶ方法 でした。

miseのセットアップ方法を紹介します。

「mise」とは?

開発ツール、環境変数、タスクを管理するツールです。
asdf + direnv + makeのイメージです。

本記事ではmise本体と開発ツールに絞って説明します。

環境

  • OS:macOS Tohoe 26.0
  • Shell:Bash
  • mise:2026.1.1 macos-arm64 (2026-01-08)

セットアップ

Getting Startedを参考に、miseをセットアップします。

miseのインストール

macOSの場合、Homebrewでのインストールが推奨されているので、それに従ってインストールします。

$ brew install mise

開発ツールのインストール

開発ツールごとに mise use --global {ツール}@{バージョン} コマンドを実行し、インストールとセットを行います。

以下はNode.jsをインストールする例です。

$ mise use --global node@24.12.0

インストールすると ~/.config/mise/config.toml[tools] に書き込まれます。

~/.config/mise/config.toml
[tools]
+ node = "24.12.0"

アクティベート

対話型シェルの場合、 mise activate を使って node などの開発ツールを直接利用できるようにすることが推奨されています。

Bashの場合は以下を .bash_profile に追記します。

~/.bash_profile
+ # mise
+ # ref: https://mise.jdx.dev/getting-started.html#activate-mise
+ if [ -d "$HOME/.config/mise" ]; then
+   eval "$(mise activate bash)"
+ fi

先ほどインストールしたバージョンが使えたらアクティベートに成功しています。

$ node --version
v24.12.0

CI/CDやIDE、スクリプトなどの非対話型シェルでは、 shims を使うのが最適とのことです。

補完の設定

例えば mise install を補完するために mise insTab キーを押下すると、 bash: command not found: _comp_initialize エラーが発生します。

❌補完を設定していないとエラーになる
$ mise ins # Tabキーを押下する

$ mise insbash: command not found: _comp_initialize

.bash_profile に以下を追記し、補完が効くように設定します。

~/.bash_profile
# mise
# ref: https://mise.jdx.dev/getting-started.html#activate-mise
if [ -d "$HOME/.config/mise" ]; then
  eval "$(mise activate bash)"
+   eval "$(mise completion bash --include-bash-completion-lib)"
fi

しかしスクリプトに問題があるようで、たくさんのエラーが発生します。

エラー
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
-bash: [: too many arguments
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
-bash: [: =: unary operator expected
-bash: [: =: unary operator expected
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
-bash: [: =: unary operator expected
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
-bash: [: =: unary operator expected
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
-bash: [: too many arguments
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
-bash: [: =: unary operator expected
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
-bash: [: =: unary operator expected
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
-bash: [: =: unary operator expected
bash: command not found: have
bash: command not found: have
-bash: [: =: unary operator expected
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
-bash: [: =: unary operator expected
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have
bash: command not found: have

補完は効くようになったので一旦よしとします。

✅補完が効く
$ mise ins # Tabキーを押下する

install       install-into
$ mise install

miseで管理している開発ツールのバージョン出力

mise tool {ツール} --active コマンドを実行すると、miseで管理している開発ツールのバージョンを出力できます。

$ mise tool node --active
24.12.0

これを応用し、プロンプトに各開発ツールのバージョンを表示するとカッコいいかもしれません。

image.png

よかったら私の設定を参考にしてください。

おわりに

miseを使って node などの開発ツールを管理できるようになりました。
だいたいの開発ツールを一元管理できて便利です :relaxed:

以上 どすこい塾 Advent Calendar 2025 の19日目の記事でした。
明日は未定です。

参考リンク

5
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?