0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WSL2 で mise を使って k1LoW/deck の実行環境を構築

Last updated at Posted at 2025-09-28

はじめに

前回の記事 k1LoW/deck で Google Slidesのプレゼン資料を作成では、WSL2 で k1LoW/deckを使ったプレゼン資料作成のポイントを紹介しました。

今回は、mise を使って k1LoW/deck の実行環境を構築する手順を紹介します。

参考情報

前提条件

  • Windows 11 上の WSL で Ubuntu 24.04.3 LTS を動かしている
  • シェルとして zsh を使用している(bash の場合は ~/.bashrc を編集してください)

mise のインストール

公式ドキュメントの GETTING STARTED に従って mise をインストールします。

方法1: インストールスクリプトを使用(推奨)

curl https://mise.jdx.dev/install.sh | sh

方法2: apt パッケージマネージャーを使用

sudo apt update -y && sudo apt install -y gpg sudo wget curl
sudo install -dm 755 /etc/apt/keyrings
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=amd64] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list
sudo apt update
sudo apt install -y mise

mise を使うための設定を ~/.zshrc に追加します。この設定により、ディレクトリ移動時に mise.toml を自動的に読み込み、指定されたツールのバージョンを自動的に切り替えられるようになります。

echo 'eval "$(mise activate zsh)"' >> ~/.zshrc

追加後、設定を反映します。

source ~/.zshrc

mise のバージョンを確認します。

mise --version
   ____ ___  (_)_______        ___  ____        ____  / /___ _________
  / __ `__ \/ / ___/ _ \______/ _ \/ __ \______/ __ \/ / __ `/ ___/ _ \
 / / / / / / (__  )  __/_____/  __/ / / /_____/ /_/ / / /_/ / /__/  __/
/_/ /_/ /_/_/____/\___/      \___/_/ /_/     / .___/_/\__,_/\___/\___/
                                            /_/                 by @jdx
2025.9.21 linux-x64 (2025-09-27)

各種ツールのインストール

deck を使うディレクトリに以下の mise.toml を作成し、各種ツールをインストールします。mise.tomlはディレクトリ単位でツールのバージョンを管理するための設定ファイルです(グローバル設定は ~/.config/mise/config.toml で管理します)。

記事執筆当時、Silicon の最新バージョン 0.5.2 ではインストール時にエラーが発生したため、0.5.1 を指定しています。

mise.toml
[tools]
rust = "latest"
"cargo:silicon" = "0.5.1"
"go:github.com/k1LoW/deck/cmd/deck" = "latest"
"go:github.com/Songmu/laminate/cmd/laminate" = "latest"

以下のコマンドを実行し、mise.toml に指定したツールをインストールします。

Silicon のビルドには依存パッケージが必要です。前回の記事 k1LoW/deck で Google Slidesのプレゼン資料を作成を参照して、先に apt でインストールしておいてください。

mise install

インストールされたツールの確認

以下のコマンドを実行し、インストールされたツールを確認します。

mise list

このように mise でインストールしたツールが表示されます。

Tool                                        Version           Source                         Requested
aws                                         2.31.3            ~/.config/mise/config.toml     latest
cargo:silicon                               0.5.1             ~/work/presentation/mise.toml  0.5.1
go:github.com/Songmu/laminate/cmd/laminate  0.0.4             ~/work/presentation/mise.toml  latest
go:github.com/k1LoW/deck/cmd/deck           1.21.5            ~/work/presentation/mise.toml  latest
rust                                        1.90.0 (symlink)  ~/work/presentation/mise.toml  latest
uv                                          0.8.22            ~/.config/mise/config.toml     latest

インストールしているツールのうち awsuv は ~/.config/mise/config.toml に指定したグローバル設定です。

~/.config/mise/config.toml
[settings]
experimental = true
disable_backends = ["asdf", "vfox"]
idiomatic_version_file_enable_tools = ["python"]

[settings.pipx]
uvx = true

[tools]
aws = "latest"
# [Python]
uv = "latest"

インストール後の確認

mise の設定が正しく行われているか確認します。

mise doctor

deck のバージョンを確認します。

deck --version
deck version 1.21.5 (rev:HEAD)

その他のパッケージ

前回の記事 k1LoW/deck で Google Slides のプレゼン資料を作成で紹介した、qrencode や Imagemagick のインストールは別途必要です。

まとめ

mise を使った k1LoW/deck の実行環境構築手順を紹介しました。mise を使うことで、以下のメリットがあります。

  • 各種ツールのインストール手順を簡略化できる
  • 各種ツールのバージョンを一元管理できる
  • プロジェクトごとに独立した環境を構築できる
  • チームメンバー間で環境を再現しやすくなる
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?