diff --git a/README.md b/README.md index c8b71a475d..f7a4e5e06e 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ Solo, OpenSpec keeps you and your AI honest on a single repo. On a team, the har ## Quick Start -**Requires Node.js 20.19.0 or higher.** +**Requires Node.js 20.19.0 or higher.** Homebrew installs it as a dependency. Install OpenSpec globally: @@ -130,6 +130,12 @@ Install OpenSpec globally: npm install -g @fission-ai/openspec@latest ``` +Or install the official [Homebrew formula](https://formulae.brew.sh/formula/openspec) on macOS or Linux: + +```bash +brew install openspec +``` + Then navigate to your project directory and initialize: ```bash @@ -137,7 +143,7 @@ cd your-project openspec init ``` -> **Want your AI to do it?** Paste the [setup prompt](docs/installation.md#install-with-your-ai-assistant) into your coding assistant — it installs the CLI, runs `openspec init`, and verifies the result. +> **Want your AI to do it?** Paste the [setup prompt](docs-lab/start/installation.md#install-with-your-ai-assistant) into your coding assistant — it installs the CLI, runs `openspec init`, and verifies the result. Now talk to your AI: @@ -151,7 +157,7 @@ Both are in the default profile. If you want the expanded workflow (`/opsx:new`, > [!NOTE] > Not sure if your tool is supported? [View the full list](docs/supported-tools.md) – we support 30+ tools and growing. > -> Also works with pnpm, yarn, bun, and nix. [See installation options](docs/installation.md). +> Also works with Homebrew, pnpm, yarn, bun, and Nix. [See installation options](docs-lab/start/installation.md). ## Docs @@ -208,6 +214,12 @@ AI coding assistants are powerful but unpredictable when requirements live only npm install -g @fission-ai/openspec@latest ``` +If you installed OpenSpec with Homebrew: + +```bash +brew upgrade openspec +``` + **Refresh agent instructions** Run this inside each project to regenerate AI guidance and ensure the latest slash commands are active: diff --git a/docs-lab/start/installation.md b/docs-lab/start/installation.md index 7bd4e87808..2ffdd53aa1 100644 --- a/docs-lab/start/installation.md +++ b/docs-lab/start/installation.md @@ -5,7 +5,9 @@ ## Prerequisites -OpenSpec is a Node.js CLI. You need version 20.19.0 or newer. +OpenSpec runs on Node.js 20.19.0 or newer. Homebrew installs Node.js as a +dependency, and the Nix package includes the runtime. Check your installed version +before using another install method. In your terminal: @@ -13,7 +15,9 @@ In your terminal: node --version ``` -If that prints `v20.19.0` or higher, you're set. If not, install a newer Node from [nodejs.org](https://nodejs.org) or through your version manager (nvm, fnm, asdf, volta). +If that prints `v20.19.0` or higher, you're set. If not, install a newer Node from +[nodejs.org](https://nodejs.org) or through your version manager (nvm, fnm, asdf, +volta). You can skip this check when you install with Homebrew or Nix. The workflow itself runs inside an AI coding tool: Claude Code, Cursor, or any other tool on the [supported list](../reference/supported-tools.md). @@ -53,6 +57,16 @@ In your terminal: npm install -g @fission-ai/openspec@latest ``` +### Homebrew + +Homebrew installs OpenSpec and its Node.js dependency on macOS or Linux. In your terminal: + +```bash +brew install openspec +``` + +The formula is published in [homebrew-core](https://formulae.brew.sh/formula/openspec), so you don't need to add a tap. + ### Yarn `yarn global add` is Yarn Classic (1.x) only. Modern Yarn removed global installs, so use npm, pnpm, or bun instead. A global CLI doesn't have to share your project's package manager. @@ -123,7 +137,7 @@ When a newer CLI is out, [`openspec update`](../reference/cli.md#openspec-update > [!WARNING] -> On Deno, re-run the [Deno install](#deno) with `-f`; it won't overwrite the installed command without it. On Nix, use `nix profile upgrade openspec`. +> On Homebrew, run `brew upgrade openspec`. On Deno, re-run the [Deno install](#deno) with `-f`; it won't overwrite the installed command without it. On Nix, use `nix profile upgrade openspec`. > [!NOTE] > A global npm install belongs to one Node installation. Switch Node versions with nvm and the `openspec` command doesn't come along, so install it again under the new version. @@ -144,7 +158,7 @@ openspec completion uninstall npm uninstall -g @fission-ai/openspec ``` -On Deno: `deno uninstall --global openspec`. On Nix: `nix profile remove openspec`. Your shell should no longer find `openspec`. +On Homebrew: `brew uninstall openspec`. On Deno: `deno uninstall --global openspec`. On Nix: `nix profile remove openspec`. Your shell should no longer find `openspec`. **3. Delete what's left, or keep it.**