Skip to content

Instalación ​

Requisitos previos ​

  • Node.js 20.19.0 o superior — Comprueba tu versión: node --version

Instala con tu asistente de IA ​

¿Prefieres no hacerlo manualmente? Pega el siguiente prompt en cualquier asistente de programación que pueda ejecutar comandos de shell — Claude Code, Codex, Cursor, Gemini CLI, Copilot y el resto de las herramientas compatibles. Instala el CLI, inicializa este proyecto e informa de lo que realmente ocurrió.

Los pasos manuales que siguen son la fuente de verdad — el prompt simplemente los ejecuta por ti. Si tu asistente se detiene y te devuelve algo, es por diseño: pregunta antes de cualquier acción privilegiada y nunca edita tus archivos de inicio de shell. Completa esas partes tú mismo con Gestores de paquetes y Solución de problemas.

text
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).

Nada en el prompt es específico de algún proveedor: son instrucciones simples más los mismos comandos documentados en esta página. Funciona en macOS, Linux y Windows, y se detiene deliberadamente en lugar de improvisar cuando un paso requiere tu permiso. Tu asistente sí necesita poder ejecutar comandos de shell — algunas integraciones de IDE no pueden.

Gestores de paquetes ​

npm ​

bash
npm install -g @fission-ai/openspec@latest

pnpm ​

bash
pnpm add -g @fission-ai/openspec@latest

yarn ​

bash
yarn global add @fission-ai/openspec@latest

Yarn 2 y posteriores (Berry) eliminaron el comando global. En esas versiones, instala OpenSpec con npm, pnpm o bun en su lugar — un CLI global no necesita compartir el gestor de paquetes de tu proyecto.

deno ​

Deno a veces tiene problemas para analizar la etiqueta @latest, pero podemos especificar una versión durante la instalación inicial. Si eso sucede, puedes intentar cambiar la etiqueta @latest por la versión, algo como @^1.3.1

bash
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.1

Nota: Si tus subcomandos lanzan herramientas externas, como config edit, feedback o workspace open, es posible que necesites un --allow-run=<programa> con ámbito limitado.

bun ​

Bun puede instalar OpenSpec globalmente, pero OpenSpec actualmente se ejecuta en Node.js. Aún necesitas Node.js 20.19.0 o superior disponible en PATH.

bash
bun add -g @fission-ai/openspec@latest

Nix ​

Ejecuta OpenSpec directamente sin instalación:

bash
nix run github:Fission-AI/OpenSpec -- init

O instálalo en tu perfil:

bash
nix profile install github:Fission-AI/OpenSpec

O añádelo a tu entorno de desarrollo en flake.nix:

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 ];
    };
  };
}

Verificar la instalación ​

bash
openspec --version

Actualización ​

Actualiza el paquete y luego refresca los archivos generados de cada proyecto:

bash
npm install -g @fission-ai/openspec@latest   # or pnpm/yarn/bun equivalent
openspec update                              # run inside each project

openspec update regenera los archivos de skills y comandos para las herramientas que hayas configurado, de modo que tus comandos slash se mantengan al día con la versión instalada. También comprueba si se ha publicado un CLI más reciente y ofrece actualizar, ya que actualizar es lo que hace disponibles los nuevos flujos de trabajo en primer lugar — consulta Referencia del CLI.

Desinstalación ​

No existe un comando openspec uninstall, porque OpenSpec es simplemente un paquete global más algunos archivos en tu proyecto. Eliminarlo son unos pocos pasos manuales, y nada de esto toca tu código fuente.

1. Elimina el paquete global:

bash
npm uninstall -g @fission-ai/openspec   # or: pnpm rm -g / yarn global remove / bun rm -g

2. Elimina OpenSpec de un proyecto (opcional). Borra el directorio openspec/ si ya no quieres sus especificaciones y cambios:

bash
rm -rf openspec/

Piensa antes de hacerlo: openspec/specs/ y openspec/changes/archive/ son tu registro de cómo se comporta el sistema y por qué cambió. Si podrías querer ese historial, conserva la carpeta (o guárdala en git) incluso después de desinstalar.

3. Elimina los archivos generados de herramientas de IA (opcional). OpenSpec escribe archivos de skills y comandos en directorios por herramienta como .claude/skills/openspec-*/, .cursor/commands/opsx-*, y así sucesivamente. Borra las skills openspec-* y los comandos opsx-* de las herramientas que hayas configurado. Las rutas exactas por herramienta están listadas en Herramientas compatibles.

Si también tienes bloques marcadores de OpenSpec en archivos como CLAUDE.md o AGENTS.md, elimina esos bloques manualmente; tu propio contenido en esos archivos es tuyo y puedes conservarlo.

Próximos pasos ​

Después de instalar, inicializa OpenSpec en tu proyecto:

bash
cd your-project
openspec init

Consulta Primeros pasos para una guía completa.