Installatie
Vereisten
- Node.js 20.19.0 of hoger — Controleer je versie:
node --version
Installeren met je AI-assistent
Liever niet handmatig doen? Plak de onderstaande prompt in elke code-assistent die shell-opdrachten kan uitvoeren — Claude Code, Codex, Cursor, Gemini CLI, Copilot en de overige ondersteunde tools. Het installeert de CLI, initialiseert dit project en rapporteert wat er precies is gebeurd.
De handmatige stappen hieronder zijn de bron van waarheid — de prompt voert deze gewoon voor je uit. Als je assistent stopt en iets teruggeeft, is dat opzettelijk: het vraagt toestemming voordat het iets priviliges doet en bewerkt nooit je shell-startbestanden. Voltooi die delen zelf met Pakketbeheerders en Probleemoplossing.
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).Niets in de prompt is leveranciers-specifiek: het zijn gewone instructies plus dezelfde opdrachten die op deze pagina worden gedocumenteerd. Het werkt op macOS, Linux en Windows, en het stopt bewust in plaats van te improviseren wanneer een stap jouw toestemming nodig heeft. Je assistent moet wel shell-opdrachten kunnen uitvoeren — sommige IDE-integraties kunnen dat niet.
Pakketbeheerders
npm
npm install -g @fission-ai/openspec@latestpnpm
pnpm add -g @fission-ai/openspec@latestyarn
yarn global add @fission-ai/openspec@latestYarn 2 en nieuwer (Berry) hebben de global-opdracht verwijderd. Installeer OpenSpec op die versies met npm, pnpm of bun in plaats daarvan — een globale CLI hoeft geen pakketbeheerder te delen met je project.
deno
Deno heeft soms problemen met het parseren van de @latest-tag, maar we kunnen een versie specificeren tijdens de initiële installatie. Als dat gebeurt, kun je proberen de @latest-tag te wijzigen naar een versie, zoals @^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
# of
deno install --global \
--allow-read --allow-write --allow-env --allow-sys=cpus,homedir --allow-net=edge.openspec.dev \
npm:@fission-ai/openspec@^1.3.1Opmerking: Als je subcommando's externe tools starten, zoals config edit, feedback of workspace open, moet je mogelijk een gescopeerde --allow-run=<program> gebruiken.
bun
Bun kan OpenSpec globaal installeren, maar OpenSpec draait momenteel op Node.js. Je hebt nog steeds Node.js 20.19.0 of hoger beschikbaar op PATH nodig.
bun add -g @fission-ai/openspec@latestNix
Voer OpenSpec direct uit zonder installatie:
nix run github:Fission-AI/OpenSpec -- initOf installeer in je profiel:
nix profile install github:Fission-AI/OpenSpecOf voeg toe aan je ontwikkelomgeving in flake.nix:
{
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 ];
};
};
}Verificatie van installatie
openspec --versionBijwerken
Upgrade het pakket en vernieuw vervolgens de gegenereerde bestanden van elk project:
npm install -g @fission-ai/openspec@latest # of pnpm/yarn/bun equivalent
openspec update # voer uit binnen elk projectopenspec update regeneert de skill- en command-bestanden voor de tools die je hebt geconfigureerd, zodat je slash-commando's actueel blijven met de geïnstalleerde versie. Het controleert ook of er een nieuwere CLI is gepubliceerd en biedt aan om te upgraden, omdat upgraden ervoor zorgt dat nieuwe workflows überhaupt beschikbaar komen — zie CLI Referentie.
Verwijderen
Er is geen openspec uninstall-opdracht, omdat OpenSpec slechts een globaal pakket plus enkele bestanden in je project is. Het verwijderen ervan bestaat uit een paar handmatige stappen, en niets hier raakt je broncode.
1. Verwijder het globale pakket:
npm uninstall -g @fission-ai/openspec # of: pnpm rm -g / yarn global remove / bun rm -g2. Verwijder OpenSpec uit een project (optioneel). Verwijder de openspec/-directory als je de specificaties en wijzigingen niet langer wilt:
rm -rf openspec/Denk na voordat je dit doet: openspec/specs/ en openspec/changes/archive/ zijn je registratie van hoe het systeem zich gedraagt en waarom het is veranderd. Als je die geschiedenis misschien later wilt, bewaar de map dan (of houd hem in git) zelfs na het verwijderen.
3. Verwijder gegenereerde AI-toolbestanden (optioneel). OpenSpec schrijft skill- en command-bestanden naar per-tool directories zoals .claude/skills/openspec-*/, .cursor/commands/opsx-*, enzovoort. Verwijder de openspec-* skills en opsx-* commando's voor de tools die je hebt geconfigureerd. De exacte paden per tool staan vermeld in Ondersteunde Tools.
Als je ook OpenSpec-markerblokken hebt in bestanden zoals CLAUDE.md of AGENTS.md, verwijder die blokken dan handmatig; je eigen inhoud in die bestanden mag je houden.
Volgende stappen
Na de installatie, initialiseren van OpenSpec in je project:
cd your-project
openspec initZie Aan de slag voor een volledige handleiding.