ワンクリックで
install-creator
// Create install scripts under ./install/install-<name>.sh following this dotfiles repo's build/install conventions (brew vs self-build, pkg/local layout, OS branching).
// Create install scripts under ./install/install-<name>.sh following this dotfiles repo's build/install conventions (brew vs self-build, pkg/local layout, OS branching).
| name | install-creator |
| description | Create install scripts under ./install/install-<name>.sh following this dotfiles repo's build/install conventions (brew vs self-build, pkg/local layout, OS branching). |
このドキュメントは、./install/install-<name>.sh を
この dotfiles リポジトリの規約に沿って作成するための正本手順です。
$DOTFILES/pkg と $DOTFILES/local の規約に従って自前ビルドしたいinstall/install-<name>.sh がスクリプト本体$DOTFILES/pkg/<name>: ビルドが必要なとき のソース取得先$DOTFILES/local/<name>: ビルド結果の install 先 (make install の --prefix)
pkg を経由せず local/<name> に直接展開するgh release download を優先する (認証・レート制限が扱いやすいため)zsh/ 側の個別設定で addToPath を呼ぶまず判定する (このフローを上から順に試す)
homebrew にあるか
brew search <name> か brew info <name> で確認Brewfile に追加するだけで済むので、そもそもスクリプトは不要mac は brew、linux だけ自前
プレビルドバイナリをそのまま置きたい (ビルド不要)
pkg を経由せず $DOTFILES/local/<name> に直接展開する完全に自前ビルド
公式インストーラがある
curl ... | bash のような公式手順が存在するファイル名は install/install-<name>.sh
<name> は導入後のコマンド名に合わせるinstall-brotli.sh, install-nghttp2.sh先頭は #!/usr/bin/env zsh
取得方法
gh release download -R <owner>/<name> ... が使えるなら優先するcurl -LO https://...git clone --depth 1 ... (ソースツリーが必要なとき)rm -rf $DOTFILES/pkg/<name> と rm -rf $DOTFILES/local/<name>rm -rf $DOTFILES/local/<name> のみsudo apt install は linux ブランチ内でのみ使うsudo は使わない (brew が不要な権限昇格を避ける)install-<name>.sh 内で export PATH=... や addToPath ... を書かない.zshrc や zsh/*.zsh 側で個別に addToPath $DOTFILES/local/<name>/bin などを追記するzsh install/install-<name>.sh で実走$DOTFILES/local/<name>/bin/<name> --version 等で確認zsh/ 側で対応 (上記 7 参照)#!/usr/bin/env zsh
brew install <name>
linux に brew formula がない / tap が必要な場合:
#!/usr/bin/env zsh
if [[ `uname` == "Linux" ]]; then
brew tap <owner>/<tap> && brew install <name>
elif [[ `uname` == "Darwin" ]]; then
brew install <name>
fi
mac は brew、linux だけ自前ビルドする場合:
#!/usr/bin/env zsh
if [[ `uname` == "Darwin" ]]; then
echo "install via brew"
exit 0
fi
# linux からの処理を続ける
cd $DOTFILES/pkg
rm -rf $DOTFILES/pkg/<name>
rm -rf $DOTFILES/local/<name>
# ... (パターン C を参照)
プレビルドバイナリ / アーカイブを落として展開するだけで済む場合。
pkg は使わず、local/<name> に直接展開する。
#!/usr/bin/env zsh
rm -rf $DOTFILES/local/<name>
mkdir -p $DOTFILES/local/<name>
cd $DOTFILES/local/<name>
gh release download -R <owner>/<name> --pattern "*linux-amd64.tar.gz" --output <name>.tar.gz
tar zxvf <name>.tar.gz --strip-components=1
rm <name>.tar.gz
#!/usr/bin/env zsh
rm -rf $DOTFILES/local/<name>
mkdir -p $DOTFILES/local/<name>/bin
gh release download -R <owner>/<name> --pattern "<name>-linux-amd64" --output $DOTFILES/local/<name>/bin/<name>
chmod +x $DOTFILES/local/<name>/bin/<name>
zsh/ 側で addToPath $DOTFILES/local/<name>/bin する#!/usr/bin/env zsh
cd $DOTFILES/pkg
rm -rf $DOTFILES/pkg/<name>
rm -rf $DOTFILES/local/<name>
gh release download -R <owner>/<name> --archive tar.gz --output <name>.tar.gz
result=`unpack <name>.tar.gz`
version=`echo $result | head -n2 | tail -n1`
mv $version <name>
cd $DOTFILES/pkg/<name>
mkdir $DOTFILES/local/<name>
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$DOTFILES/local/<name>
cmake --build . --config Release --target install
#!/usr/bin/env zsh
# linux 依存 (必要なら)
sudo apt install -y \
autoconf \
automake \
libtool \
pkg-config
cd $DOTFILES/pkg
DEST=$DOTFILES/pkg/<name>
rm -rf $DEST
rm -rf $DOTFILES/local/<name>
git clone --depth 1 https://github.com/<owner>/<name> $DEST
cd $DEST
autoreconf -i
automake
autoconf
./configure --prefix=$DOTFILES/local/<name>
make
make install
#!/usr/bin/env zsh
export VERSION=<x.y.z>
cd $DOTFILES/pkg
rm -rf $DOTFILES/pkg/<name>-${VERSION}
rm -rf $DOTFILES/local/<name>
curl -LO https://example.com/<name>-${VERSION}.tar.gz
tar zxvf <name>-${VERSION}.tar.gz
cd <name>-${VERSION}
./configure --prefix=$DOTFILES/local/<name>
make
make install
#!/usr/bin/env zsh
curl -fsSL https://example.com/install.sh | bash
curl | bash は最小限に留める (改ざん検知が弱い)リポジトリ共通規約 (CLAUDE.md 参照) に従う:
if [[ を使う ([ や test は使わない)== / != と *"string"* の組み合わせ-z / -n-f / -d[[ -x "$(command -v foo)" ]]#!/usr/bin/env zshrm -rf している (再実行で入れ直せる)
$DOTFILES/pkg/<name> と $DOTFILES/local/<name> 両方$DOTFILES/local/<name> のみgh release download を使っているcd $DOTFILES/pkg で作業、ビルド結果は $DOTFILES/local/<name> に入れるpkg を使わず $DOTFILES/local/<name> に直接展開している--prefix=$DOTFILES/local/<name> を渡している (make install する場合)export PATH= / addToPath) が入っていないsudo apt install は必要最小限sudo を使っていないinstall-<name>.sh で自前版を用意 (両立可)apt install を明示。mac 側は brew が依存を吸収するので触らなくて良いpkg を経由せず $DOTFILES/local/<name> に直接展開するgh release download を優先 (認証・レート制限が楽)。public で非認証で良いときのみ curl -LOzsh/ 側の該当ファイルに addToPath $DOTFILES/local/<name>/bin を自分で追加するAudit alignment between AGENTS.md and repo-local shared skills under .agents/skills. Invoke explicitly only; do not auto-trigger on generic agent or skill maintenance requests.
Create and iterate on implementation plans under .agents/plan/ so multiple agents (Claude / Codex / 他) can review each other's drafts. Use when entering plan mode, drafting an implementation plan, or reviewing an existing plan.
Sync and harden command permissions between .claude/settings.json and .codex/rules/default.rules in this dotfiles repo.