Installation
Voraussetzungen
- Node.js 20.19.0 oder höher — Version prüfen:
node --version
Installation mit Ihrem KI-Assistenten
Sie möchten das nicht von Hand erledigen? Fügen Sie den untenstehenden Prompt in jeden Coding-Assistenten ein, der Shell-Befehle ausführen kann — Claude Code, Codex, Cursor, Gemini CLI, Copilot und die restlichen unterstützten Tools. Er installiert die CLI, initialisiert dieses Projekt und berichtet, was tatsächlich passiert ist.
Die manuellen Schritte unten sind die maßgebliche Quelle — der Prompt führt sie lediglich für Sie aus. Wenn Ihr Assistent anhält und etwas zurückgibt, ist das gewollt: Er fragt vor privilegierten Aktionen nach und bearbeitet niemals Ihre Shell-Startdateien. Führen Sie diese Schritte selbst mit Paketmanagern und Problembehebung durch.
Install OpenSpec in this project and set it up for me. Follow these steps in
order, and stop where a step tells you to stop.
1. RUNTIME. Run `node --version`. OpenSpec needs Node.js 20.19.0 or higher. If
Node is missing or older, say so and stop — don't install Node, switch
versions, or reconfigure my version manager for me.
2. INSTALL. Use whichever package manager is already on my PATH, preferring npm:
npm install -g @fission-ai/openspec@latest
pnpm add -g @fission-ai/openspec@latest
bun add -g @fission-ai/openspec@latest
yarn global add @fission-ai/openspec@latest (Yarn 1.x only)
Don't pick based on this project's lockfile — a global install has nothing to
do with how this repo's own dependencies are installed. If none of those four
is available, stop and tell me — don't improvise an install. (If I'm on Nix,
point me at the Nix section of the OpenSpec installation docs instead.)
Show me the exact command and let me confirm before you run it; this installs
software outside the project, and I may want a different package manager to
own it.
Stop and ask me again if the install needs sudo or admin rights, fails with a
permissions error, or reports that its global bin directory is missing or
unconfigured. Never edit my shell startup files (.bashrc, .zshrc, .profile,
fish, PowerShell profile), and never run a setup command that edits them for
me — show me the change and let me make it.
3. PATH. Run `openspec --version`. If the command isn't found, it may just be
missing from this shell: tell me where the package manager installed it and
how to add that directory to PATH for my shell and OS, then stop until I
confirm. If it prints an older version than the one the install just
reported, an earlier copy is shadowing it on PATH — tell me both versions
instead of continuing. If I use a version manager, say so rather than editing
PATH around it: with nvm or fnm the CLI is tied to the Node version that was
active when you installed it, and with asdf or volta a shim may need
regenerating.
4. INITIALIZE. Ask me which AI coding tool or tools I use and map each to an id
from `openspec init --help` (Copilot is `github-copilot`, Zoo Code is
`roocode`). `--tools` takes a comma-separated list, so name all of them.
`openspec init --tools <ids>` deletes leftovers from older OpenSpec versions
automatically, without asking — including `opsx-*.md` prompt files in my home
directory (Codex keeps them in ~/.codex/prompts). Before you run it, look for
those: `.../commands/openspec/` folders, OpenSpec marker blocks in files like
CLAUDE.md or AGENTS.md, and home-directory `opsx-*.md` prompts. List whatever
you find and wait for my go-ahead; if you find nothing, say so and carry on
without asking. An existing `openspec/` folder is not a problem — init
refreshes it and leaves my specs and changes alone.
Confirm I'm in the right folder too: init creates `openspec/` wherever it
runs, including inside a monorepo package.
Then run: openspec init --tools <ids>
5. REPORT. Don't assume what should exist — tell me what init actually printed:
how many skills and/or commands it created and where, the config file line,
any "Setup required" note, and what to restart or reload. Some tools are
skills-only and correctly create zero command files, so missing commands is
not a failure on its own. If init said nothing was generated, relay the fix
it suggested instead of retrying. Finish by telling me how to invoke OpenSpec
in my tool, and take the exact spelling from the files init created rather
than from its summary line: the punctuation differs per tool (/opsx:propose
in some, /opsx-propose in others, @opsx-propose in Amazon Q), and tools that
get skills instead of commands are invoked by skill name (/openspec-propose,
or $openspec-propose in Codex, or /skill:openspec-propose in Kimi Code).Nichts im Prompt ist vendor-spezifisch: Es handelt sich um einfache Anweisungen plus dieselben Befehle, die auf dieser Seite dokumentiert sind. Es funktioniert auf macOS, Linux und Windows und hält bewusst an, anstatt zu improvisieren, wenn ein Schritt Ihre Genehmigung erfordert. Ihr Assistent muss in der Lage sein, Shell-Befehle auszuführen — einige IDE-Integrationen können das nicht.
Paketmanager
npm
npm install -g @fission-ai/openspec@latestpnpm
pnpm add -g @fission-ai/openspec@latestyarn
yarn global add @fission-ai/openspec@latestYarn 2 und neuer (Berry) haben den global-Befehl entfernt. Installieren Sie auf diesen Versionen OpenSpec stattdessen mit npm, pnpm oder bun — eine globale CLI muss nicht denselben Paketmanager wie Ihr Projekt verwenden.
deno
Deno hat manchmal Probleme beim Parsen des @latest-Tags, aber wir können bei der initialen Installation eine Version angeben. Falls das passiert, können Sie versuchen, das @latest-Tag durch die Version zu ersetzen, z. B. @^1.3.1
deno install --global \
--allow-read --allow-write --allow-env --allow-sys=cpus,homedir --allow-net=edge.openspec.dev \
npm:@fission-ai/openspec@latest
# or
deno install --global \
--allow-read --allow-write --allow-env --allow-sys=cpus,homedir --allow-net=edge.openspec.dev \
npm:@fission-ai/openspec@^1.3.1Hinweis: Wenn Ihre Unterbefehle externe Tools starten, wie config edit, feedback oder workspace open, benötigen Sie möglicherweise einen bereichsgeschränkten --allow-run=<programm>.
bun
Bun kann OpenSpec global installieren, aber OpenSpec läuft derzeit auf Node.js. Sie benötigen weiterhin Node.js 20.19.0 oder höher im PATH.
bun add -g @fission-ai/openspec@latestNix
Führen Sie OpenSpec direkt aus, ohne Installation:
nix run github:Fission-AI/OpenSpec -- initOder installieren Sie es in Ihr Profil:
nix profile install github:Fission-AI/OpenSpecOder fügen Sie es zu Ihrer Entwicklungsumgebung in flake.nix hinzu:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
openspec.url = "github:Fission-AI/OpenSpec";
};
outputs = { nixpkgs, openspec, ... }: {
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
buildInputs = [ openspec.packages.x86_64-linux.default ];
};
};
}Installation überprüfen
openspec --versionAktualisieren
Aktualisieren Sie das Paket und aktualisieren Sie anschließend die generierten Dateien jedes Projekts:
npm install -g @fission-ai/openspec@latest # or pnpm/yarn/bun equivalent
openspec update # run inside each projectopenspec update regeneriert die Skill- und Befehlsdateien für die von Ihnen konfigurierten Tools, sodass Ihre Slash-Befehle mit der installierten Version aktuell bleiben. Es prüft außerdem, ob eine neuere CLI veröffentlicht wurde, und bietet ein Upgrade an, da erst durch ein Upgrade neue Workflows verfügbar werden — siehe CLI-Referenz.
Deinstallieren
Es gibt keinen openspec uninstall-Befehl, da OpenSpec lediglich ein globales Paket plus einige Dateien in Ihrem Projekt ist. Die Entfernung erfordert einige manuelle Schritte, und nichts davon berührt Ihren Quellcode.
1. Globales Paket entfernen:
npm uninstall -g @fission-ai/openspec # or: pnpm rm -g / yarn global remove / bun rm -g2. OpenSpec aus einem Projekt entfernen (optional). Löschen Sie das openspec/-Verzeichnis, wenn Sie die Spezifikationen und Änderungen nicht mehr benötigen:
rm -rf openspec/Denken Sie nach, bevor Sie das tun: openspec/specs/ und openspec/changes/archive/ sind Ihre Aufzeichnung darüber, wie das System funktioniert und warum es sich geändert hat. Wenn Sie diese Historie möglicherweise benötigen, bewahren Sie den Ordner auf (oder behalten Sie ihn im Git), selbst nach der Deinstallation.
3. Generierte KI-Tool-Dateien entfernen (optional). OpenSpec schreibt Skill- und Befehlsdateien in Tool-spezifische Verzeichnisse wie .claude/skills/openspec-*/, .cursor/commands/opsx-* usw. Löschen Sie die openspec-*-Skills und opsx-*-Befehle für die von Ihnen konfigurierten Tools. Die genauen Pfade pro Tool sind in Unterstützte Tools aufgeführt.
Falls Sie auch OpenSpec-Marker-Blöcke in Dateien wie CLAUDE.md oder AGENTS.md haben, entfernen Sie diese Blöcke manuell; Ihr eigener Inhalt in diesen Dateien bleibt erhalten.
Nächste Schritte
Nach der Installation initialisieren Sie OpenSpec in Ihrem Projekt:
cd your-project
openspec initSiehe Erste Schritte für eine vollständige Anleitung.