This page documents the specify extension CLI commands for discovering, installing, and managing extensions that add commands and functionality to spec-kit projects. Extensions are modular packages that extend the core framework without bloating the codebase src/specify_cli/extensions/__init__.py4-7
The specify extension command provides subcommands for the complete extension lifecycle:
| Command | Purpose |
|---|---|
extension list | List installed extensions with metadata |
extension add <id> | Install an extension from catalog or URL |
extension remove <id> | Uninstall an extension |
extension search [query] | Search available extensions across catalogs |
extension info <id> | Show detailed information about an extension |
extension update <id> | Update an installed extension to latest version |
extension enable <id> | Enable hooks for an extension |
extension disable <id> | Disable hooks for an extension |
extension catalog list | List active extension catalogs |
Sources: src/specify_cli/extensions/__init__.py1-7 extensions/README.md110-125 src/specify_cli/extensions/_commands.py27-38
This diagram maps Natural Language concepts to the Python classes and directory structures used in the codebase.
Key Components:
.registry JSON file to track state across CLI sessions src/specify_cli/extensions/__init__.py231-236catalog.json) and "Community Catalog" (catalog.community.json) split extensions/README.md5-15extension.yml against schema version 1.0, ensuring required fields like id, version, and provides are present src/specify_cli/extensions/__init__.py158-162after_tasks) and execution priority src/specify_cli/extensions/__init__.py1509-1515Sources: src/specify_cli/extensions/__init__.py158-162 src/specify_cli/extensions/__init__.py231-236 src/specify_cli/extensions/__init__.py439-445 src/specify_cli/agents.py22-52 extensions/README.md5-15
Lists all installed extensions with their metadata:
Implementation: The command queries the ExtensionRegistry to retrieve the list of installed IDs and then loads the local ExtensionManifest for each to display current status, command counts, and hook counts src/specify_cli/extensions/__init__.py626-635
Sources: src/specify_cli/extensions/__init__.py626-635 extensions/EXTENSION-USER-GUIDE.md267-282
Searches available extensions across all active catalogs:
Catalog Curation: Spec Kit uses a dual-catalog system. catalog.json is the default upstream catalog, while catalog.community.json serves as a reference for discovery extensions/README.md9-13 Organizations can override the default by setting SPECKIT_CATALOG_URL extensions/README.md15-22
Sources: src/specify_cli/extensions/__init__.py1166-1175 extensions/README.md9-22 extensions/EXTENSION-USER-GUIDE.md78-87
Shows detailed information about a specific extension:
Implementation: Retrieves metadata from either the local registry (if installed) or the catalog stack via _resolve_catalog_extension src/specify_cli/extensions/_commands.py143-160 It displays the author, repository, required speckit_version, and the list of commands/hooks provided src/specify_cli/extensions/__init__.py1221-1230
Sources: src/specify_cli/extensions/__init__.py1221-1230 src/specify_cli/extensions/_commands.py143-160 extensions/EXTENSION-USER-GUIDE.md123-138
Installs an extension from a catalog, URL, or local directory:
If the project has AI skills enabled, extension commands are automatically registered as agent skills extensions/EXTENSION-USER-GUIDE.md190-193 The ExtensionManager checks for skill support via is_ai_skills_enabled, is_dollar_skills_agent, and is_slash_skills_agent before writing skill files into the agent's skills directory src/specify_cli/extensions/__init__.py476-485
Sources: src/specify_cli/extensions/__init__.py476-485 extensions/EXTENSION-USER-GUIDE.md190-204 src/specify_cli/extensions/__init__.py30-32
Uninstalls an extension and cleans up agent directories:
Removal Process:
.claude/skills/) src/specify_cli/extensions/__init__.py581-584--keep-config is not provided, it attempts to backup configuration files to .specify/extensions/.backup/ src/specify_cli/extensions/__init__.py586-600extensions.yml src/specify_cli/extensions/__init__.py611-615.registry src/specify_cli/extensions/__init__.py618-620Sources: src/specify_cli/extensions/__init__.py559-620 extensions/EXTENSION-DEVELOPMENT-GUIDE.md113-122
Updates an installed extension to the latest version found in the catalog:
Implementation: The update process is a composite operation that performs a removal followed by a new installation. The system utilizes a rollback mechanism where it attempts to restore the previous version from backup if the update fails src/specify_cli/extensions/__init__.py272-280
Sources: src/specify_cli/extensions/__init__.py272-280 extensions/EXTENSION-USER-GUIDE.md283-304
Extension catalogs are resolved through a stack with precedence rules. Spec Kit provides CatalogEntry to manage these entries src/specify_cli/extensions/__init__.py154-156
| Layer | Source | Precedence |
|---|---|---|
| 1 | SPECKIT_CATALOG_URL | Highest (Overrides all) |
| 2 | .specify/extension-catalogs.yml | Project-level |
| 3 | ~/.specify/extension-catalogs.yml | User-level |
| 4 | Built-in Defaults | Lowest (Official + Community) |
Each entry in the catalog stack is represented by the CatalogEntry dataclass src/specify_cli/extensions/__init__.py154-156:
Sources: src/specify_cli/extensions/__init__.py154-156 extensions/README.md15-23
The CommandRegistrar is responsible for translating extension commands (stored as Markdown with YAML frontmatter) into agent-specific formats.
This diagram shows how the CLI maps extension commands to specific file formats and directories based on the detected agent integration.
Key Registration Logic:
.specify/scripts/) extensions/EXTENSION-DEVELOPMENT-GUIDE.md271-286$ARGUMENTS (Markdown) or {SCRIPT} based on the target agent's requirements extensions/EXTENSION-DEVELOPMENT-GUIDE.md251-255Sources: src/specify_cli/agents.py46-52 extensions/EXTENSION-DEVELOPMENT-GUIDE.md251-286 src/specify_cli/_utils.py58-65
Extensions use a 4-layer configuration system managed by ConfigManager src/specify_cli/extensions/__init__.py1310-1320
extension.yml manifest extensions/EXTENSION-DEVELOPMENT-GUIDE.md224-227.specify/extensions/<id>/<id>-config.yml..specify/extensions/<id>/local-config.yml (gitignored for sensitive data).SPECKIT_<EXT_ID>_<KEY> (highest precedence).Priority Normalization: Priority values used for sorting hooks are normalized to positive integers (default: 10) to handle corrupted registry data src/specify_cli/extensions/__init__.py122-141
Sources: src/specify_cli/extensions/__init__.py122-141 src/specify_cli/extensions/__init__.py1310-1320 extensions/EXTENSION-DEVELOPMENT-GUIDE.md224-227
Refresh this wiki