mirror of
https://github.com/github/spec-kit.git
synced 2026-07-03 12:28:06 +08:00
* docs(install): add pipx as alternative installation method - Add pipx commands to README.md installation section - Add note about pipx compatibility to docs/installation.md - Mention pipx persistent installation in docs/quickstart.md - Add pipx upgrade instructions to docs/upgrade.md - Clarify that project has no uv-specific dependencies Refs: https://github.com/github/spec-kit/discussions/2255 * docs(install): address Copilot feedback - update prerequisites and upgrade references for pipx * Update docs/quickstart.md markdownlint’s MD012 (enabled in this repo) flags multiple consecutive blank lines Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update docs/upgrade.md In the Quick Reference table, the label “pipx upgrade” is misleading because the command shown is `pipx install --force ...` (a reinstall). by copilot. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
161 lines
6.8 KiB
Markdown
161 lines
6.8 KiB
Markdown
# Installation Guide
|
|
|
|
## Prerequisites
|
|
|
|
- **Linux/macOS** (or Windows; PowerShell scripts now supported without WSL)
|
|
- AI coding agent: [Claude Code](https://www.anthropic.com/claude-code), [GitHub Copilot](https://code.visualstudio.com/), [Codebuddy CLI](https://www.codebuddy.ai/cli), [Gemini CLI](https://github.com/google-gemini/gemini-cli), or [Pi Coding Agent](https://pi.dev)
|
|
- [uv](https://docs.astral.sh/uv/) for package management (recommended) or [pipx](https://pypa.github.io/pipx/) for persistent installation
|
|
- [Python 3.11+](https://www.python.org/downloads/)
|
|
- [Git](https://git-scm.com/downloads)
|
|
|
|
## Installation
|
|
|
|
> **Important:** The only official, maintained packages for Spec Kit come from the [github/spec-kit](https://github.com/github/spec-kit) GitHub repository. Any packages with the same name available on PyPI (e.g. `specify-cli` on pypi.org) are **not** affiliated with this project and are not maintained by the Spec Kit maintainers. For normal installs, use the GitHub-based commands shown below. For offline or air-gapped environments, locally built wheels created from this repository are also valid.
|
|
|
|
### Initialize a New Project
|
|
|
|
The easiest way to get started is to initialize a new project. Pin a specific release tag for stability (check [Releases](https://github.com/github/spec-kit/releases) for the latest):
|
|
|
|
```bash
|
|
# Install from a specific stable release (recommended — replace vX.Y.Z with the latest tag)
|
|
uvx --from git+https://github.com/github/spec-kit.git@vX.Y.Z specify init <PROJECT_NAME>
|
|
|
|
# Or install latest from main (may include unreleased changes)
|
|
uvx --from git+https://github.com/github/spec-kit.git specify init <PROJECT_NAME>
|
|
```
|
|
|
|
> [!NOTE]
|
|
> For a persistent installation, `pipx` works equally well:
|
|
> ```bash
|
|
> pipx install git+https://github.com/github/spec-kit.git@vX.Y.Z
|
|
> ```
|
|
> The project uses a standard `hatchling` build backend and has no uv-specific dependencies.
|
|
|
|
Or initialize in the current directory:
|
|
|
|
```bash
|
|
uvx --from git+https://github.com/github/spec-kit.git@vX.Y.Z specify init .
|
|
# or use the --here flag
|
|
uvx --from git+https://github.com/github/spec-kit.git@vX.Y.Z specify init --here
|
|
```
|
|
|
|
### Specify AI Agent
|
|
|
|
You can proactively specify your AI agent during initialization:
|
|
|
|
```bash
|
|
uvx --from git+https://github.com/github/spec-kit.git@vX.Y.Z specify init <project_name> --ai claude
|
|
uvx --from git+https://github.com/github/spec-kit.git@vX.Y.Z specify init <project_name> --ai gemini
|
|
uvx --from git+https://github.com/github/spec-kit.git@vX.Y.Z specify init <project_name> --ai copilot
|
|
uvx --from git+https://github.com/github/spec-kit.git@vX.Y.Z specify init <project_name> --ai codebuddy
|
|
uvx --from git+https://github.com/github/spec-kit.git@vX.Y.Z specify init <project_name> --ai pi
|
|
```
|
|
|
|
### Specify Script Type (Shell vs PowerShell)
|
|
|
|
All automation scripts now have both Bash (`.sh`) and PowerShell (`.ps1`) variants.
|
|
|
|
Auto behavior:
|
|
|
|
- Windows default: `ps`
|
|
- Other OS default: `sh`
|
|
- Interactive mode: you'll be prompted unless you pass `--script`
|
|
|
|
Force a specific script type:
|
|
|
|
```bash
|
|
uvx --from git+https://github.com/github/spec-kit.git@vX.Y.Z specify init <project_name> --script sh
|
|
uvx --from git+https://github.com/github/spec-kit.git@vX.Y.Z specify init <project_name> --script ps
|
|
```
|
|
|
|
### Ignore Agent Tools Check
|
|
|
|
If you prefer to get the templates without checking for the right tools:
|
|
|
|
```bash
|
|
uvx --from git+https://github.com/github/spec-kit.git@vX.Y.Z specify init <project_name> --ai claude --ignore-agent-tools
|
|
```
|
|
|
|
## Verification
|
|
|
|
After installation, run the following command to confirm the correct version is installed:
|
|
|
|
```bash
|
|
specify version
|
|
```
|
|
|
|
This helps verify you are running the official Spec Kit build from GitHub, not an unrelated package with the same name.
|
|
|
|
After initialization, you should see the following commands available in your AI agent:
|
|
|
|
- `/speckit.specify` - Create specifications
|
|
- `/speckit.plan` - Generate implementation plans
|
|
- `/speckit.tasks` - Break down into actionable tasks
|
|
|
|
The `.specify/scripts` directory will contain both `.sh` and `.ps1` scripts.
|
|
|
|
## Troubleshooting
|
|
|
|
### Enterprise / Air-Gapped Installation
|
|
|
|
If your environment blocks access to PyPI (you see 403 errors when running `uv tool install` or `pip install`), you can create a portable wheel bundle on a connected machine and transfer it to the air-gapped target.
|
|
|
|
**Step 1: Build the wheel on a connected machine (same OS and Python version as the target)**
|
|
|
|
```bash
|
|
# Clone the repository
|
|
git clone https://github.com/github/spec-kit.git
|
|
cd spec-kit
|
|
|
|
# Build the wheel
|
|
pip install build
|
|
python -m build --wheel --outdir dist/
|
|
|
|
# Download the wheel and all its runtime dependencies
|
|
pip download -d dist/ dist/specify_cli-*.whl
|
|
```
|
|
|
|
> **Important:** `pip download` resolves platform-specific wheels (e.g., PyYAML includes native extensions). You must run this step on a machine with the **same OS and Python version** as the air-gapped target. If you need to support multiple platforms, repeat this step on each target OS (Linux, macOS, Windows) and Python version.
|
|
|
|
**Step 2: Transfer the `dist/` directory to the air-gapped machine**
|
|
|
|
Copy the entire `dist/` directory (which contains the `specify-cli` wheel and all dependency wheels) to the target machine via USB, network share, or other approved transfer method.
|
|
|
|
**Step 3: Install on the air-gapped machine**
|
|
|
|
```bash
|
|
pip install --no-index --find-links=./dist specify-cli
|
|
```
|
|
|
|
**Step 4: Initialize a project (no network required)**
|
|
|
|
```bash
|
|
# Initialize a project — no GitHub access needed
|
|
specify init my-project --ai claude --offline
|
|
```
|
|
|
|
The `--offline` flag tells the CLI to use the templates, commands, and scripts bundled inside the wheel instead of downloading from GitHub.
|
|
|
|
> **Deprecation notice:** Starting with v0.6.0, `specify init` will use bundled assets by default and the `--offline` flag will be removed. The GitHub download path will be retired because bundled assets eliminate the need for network access, avoid proxy/firewall issues, and guarantee that templates always match the installed CLI version. No action will be needed — `specify init` will simply work without network access out of the box.
|
|
|
|
> **Note:** Python 3.11+ is required.
|
|
|
|
> **Windows note:** Offline scaffolding requires PowerShell 7+ (`pwsh`), not Windows PowerShell 5.x (`powershell.exe`). Install from https://aka.ms/powershell.
|
|
|
|
### Git Credential Manager on Linux
|
|
|
|
If you're having issues with Git authentication on Linux, you can install Git Credential Manager:
|
|
|
|
```bash
|
|
#!/usr/bin/env bash
|
|
set -e
|
|
echo "Downloading Git Credential Manager v2.6.1..."
|
|
wget https://github.com/git-ecosystem/git-credential-manager/releases/download/v2.6.1/gcm-linux_amd64.2.6.1.deb
|
|
echo "Installing Git Credential Manager..."
|
|
sudo dpkg -i gcm-linux_amd64.2.6.1.deb
|
|
echo "Configuring Git to use GCM..."
|
|
git config --global credential.helper manager
|
|
echo "Cleaning up..."
|
|
rm gcm-linux_amd64.2.6.1.deb
|
|
```
|