― spec-kit(specify-cli)をGitHubからインストールする完全ログ ―
🔹 ダイジェスト(最短コマンドまとめ)
#uv install
pip install uv
# ① GitHubからspecify-cliをuvでインストール
uv tool install specify-cli --from "git+https://github.com/github/spec-kit.git"
# ② PATH一時追加(今のPowerShellだけ有効)
$env:PATH = "C:\Users\USERNAME\.local\bin;$env:PATH"
# ③ 動作確認
specify --help
# ④ プロジェクト初期化
specify init --here
✔ ポイント
spec-kitは PyPI に存在しない- GitHub から直接インストールする必要がある
- uvで入れたツールは
.local\binに配置される - PATHを通さないとコマンドは実行できない
1. 前提環境
- Windows 11
- PowerShell
- Python 3.11
- GitHub SSH接続済み
- uv インストール済み
SSH確認ログ:
ssh -T git@github.com
Hi unikarei! You've successfully authenticated
→ SSH認証成功
2. 正しいインストール方法
uv tool install specify-cli --from "git+https://github.com/github/spec-kit.git"
成功ログ例:
Installed 1 executable: specify
warning: C:\Users\ohide_adm\.local\bin is not on your PATH
重要ポイント:
Installed 1 executable: specify
→ 実行コマンド名は specify
3. PATH問題の解決
🔹 なぜエラーになる?
specify : コマンドが認識されません
原因:
C:\Users\ohide_adm\.local\bin
が PATH に入っていない。
🔹 即効解決(このターミナルだけ有効)
$env:PATH = "C:\Users\ohide_adm\.local\bin;$env:PATH"
確認:
specify --help
🔹 恒久対応(推奨)
方法A
uv tool update-shell
方法B(確実)
- 環境変数編集
- ユーザーPathに追加:
C:\Users\ohide_adm\.local\bin
- VSCode再起動
確認:
where.exe specify
specify --version
4. 初期化
プロジェクトディレクトリで:
specify init --here
これで .spec/ が生成される。
5. Git Pull時の注意点(重要)
発生エラー:
The following untracked working tree files would be overwritten by merge:
.gitignore
run01_venv.bat
意味:
ローカル未管理ファイルがリモートと衝突。
安全対処:
mkdir _keep
move .gitignore _keep\
move run01_venv.bat _keep\
git pull origin main --allow-unrelated-histories
6. 実際に確認したコマンド一覧(証跡)
type $env:USERPROFILE\.ssh\id_ed25519.pub
ssh -T git@github.com
uv tool install specify-cli --from "git+https://github.com/github/spec-kit.git"
specify --help
specify init --here
7. まとめ
| 問題 | 原因 | 解決 |
|---|---|---|
| spec-kitが見つからない | PyPIに無い | GitHubから直接インストール |
| specifyが実行できない | PATH未設定 | .local\bin をPATHに追加 |
| git pull失敗 | untracked衝突 | 一時退避 |


コメント