Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Follow these steps to add a new agent (using a hypothetical new agent as an exam

**IMPORTANT**: Use the actual CLI tool name as the key, not a shortened version.

Add the new agent to the `AGENT_CONFIG` dictionary in `src/specify_cli/__init__.py`. This is the **single source of truth** for all agent metadata:
Add the new agent to the `AGENT_CONFIG` dictionary in `src/specify_cli/agent_config.py`. This is the **single source of truth** for all agent metadata:

```python
AGENT_CONFIG = {
Expand All @@ -69,6 +69,9 @@ AGENT_CONFIG = {
"commands_subdir": "commands", # Subdirectory name for command files (default: "commands")
"install_url": "https://example.com/install", # URL for installation docs (or None if IDE-based)
"requires_cli": True, # True if CLI tool required, False for IDE-based agents
"command_format": "markdown", # File format for commands (markdown/toml)
"command_args": "$ARGUMENTS", # Placeholder for arguments
"command_extension": ".md", # File extension for commands
},
}
```
Expand All @@ -90,6 +93,9 @@ This eliminates the need for special-case mappings throughout the codebase.
- This field enables `--ai-skills` to locate command templates correctly for skill generation
- `install_url`: Installation documentation URL (set to `None` for IDE-based agents)
- `requires_cli`: Whether the agent requires a CLI tool check during initialization
- `command_format`: The format used for generating command files (`"markdown"` or `"toml"`)
- `command_args`: The placeholder string used for arguments (`"$ARGUMENTS"` or `"{{args}}"`)
- `command_extension`: The file extension for generated commands (`".md"` or `".toml"`)

#### 2. Update CLI Help Text

Expand Down
139 changes: 2 additions & 137 deletions src/specify_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
import truststore
from datetime import datetime, timezone

from .agent_config import AGENT_CONFIG

ssl_context = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
client = httpx.Client(verify=ssl_context)

Expand Down Expand Up @@ -123,143 +125,6 @@ def _format_rate_limit_error(status_code: int, headers: httpx.Headers, url: str)

return "\n".join(lines)

# Agent configuration with name, folder, install URL, CLI tool requirement, and commands subdirectory
AGENT_CONFIG = {
"copilot": {
"name": "GitHub Copilot",
"folder": ".github/",
"commands_subdir": "agents", # Special: uses agents/ not commands/
"install_url": None, # IDE-based, no CLI check needed
"requires_cli": False,
},
"claude": {
"name": "Claude Code",
"folder": ".claude/",
"commands_subdir": "commands",
"install_url": "https://docs.anthropic.com/en/docs/claude-code/setup",
"requires_cli": True,
},
"gemini": {
"name": "Gemini CLI",
"folder": ".gemini/",
"commands_subdir": "commands",
"install_url": "https://github.com/google-gemini/gemini-cli",
"requires_cli": True,
},
"cursor-agent": {
"name": "Cursor",
"folder": ".cursor/",
"commands_subdir": "commands",
"install_url": None, # IDE-based
"requires_cli": False,
},
"qwen": {
"name": "Qwen Code",
"folder": ".qwen/",
"commands_subdir": "commands",
"install_url": "https://github.com/QwenLM/qwen-code",
"requires_cli": True,
},
"opencode": {
"name": "opencode",
"folder": ".opencode/",
"commands_subdir": "command", # Special: singular 'command' not 'commands'
"install_url": "https://opencode.ai",
"requires_cli": True,
},
"codex": {
"name": "Codex CLI",
"folder": ".codex/",
"commands_subdir": "prompts", # Special: uses prompts/ not commands/
"install_url": "https://github.com/openai/codex",
"requires_cli": True,
},
"windsurf": {
"name": "Windsurf",
"folder": ".windsurf/",
"commands_subdir": "workflows", # Special: uses workflows/ not commands/
"install_url": None, # IDE-based
"requires_cli": False,
},
"kilocode": {
"name": "Kilo Code",
"folder": ".kilocode/",
"commands_subdir": "workflows", # Special: uses workflows/ not commands/
"install_url": None, # IDE-based
"requires_cli": False,
},
"auggie": {
"name": "Auggie CLI",
"folder": ".augment/",
"commands_subdir": "commands",
"install_url": "https://docs.augmentcode.com/cli/setup-auggie/install-auggie-cli",
"requires_cli": True,
},
"codebuddy": {
"name": "CodeBuddy",
"folder": ".codebuddy/",
"commands_subdir": "commands",
"install_url": "https://www.codebuddy.ai/cli",
"requires_cli": True,
},
"qodercli": {
"name": "Qoder CLI",
"folder": ".qoder/",
"commands_subdir": "commands",
"install_url": "https://qoder.com/cli",
"requires_cli": True,
},
"roo": {
"name": "Roo Code",
"folder": ".roo/",
"commands_subdir": "commands",
"install_url": None, # IDE-based
"requires_cli": False,
},
"q": {
"name": "Amazon Q Developer CLI",
"folder": ".amazonq/",
"commands_subdir": "prompts", # Special: uses prompts/ not commands/
"install_url": "https://aws.amazon.com/developer/learning/q-developer-cli/",
"requires_cli": True,
},
"amp": {
"name": "Amp",
"folder": ".agents/",
"commands_subdir": "commands",
"install_url": "https://ampcode.com/manual#install",
"requires_cli": True,
},
"shai": {
"name": "SHAI",
"folder": ".shai/",
"commands_subdir": "commands",
"install_url": "https://github.com/ovh/shai",
"requires_cli": True,
},
"agy": {
"name": "Antigravity",
"folder": ".agent/",
"commands_subdir": "workflows", # Special: uses workflows/ not commands/
"install_url": None, # IDE-based
"requires_cli": False,
},
"bob": {
"name": "IBM Bob",
"folder": ".bob/",
"commands_subdir": "commands",
"install_url": None, # IDE-based
"requires_cli": False,
},
"generic": {
"name": "Generic (bring your own agent)",
"folder": None, # Set dynamically via --ai-commands-dir
"commands_subdir": "commands",
"install_url": None,
"requires_cli": False,
},
}

SCRIPT_TYPE_CHOICES = {"sh": "POSIX Shell (bash/zsh)", "ps": "PowerShell"}

CLAUDE_LOCAL_PATH = Path.home() / ".claude" / "local" / "claude"
Expand Down
202 changes: 202 additions & 0 deletions src/specify_cli/agent_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
"""
Agent configurations for specify-cli.
Shared between CLI initialization and the extension system.
"""

# Default values for agent metadata
DEFAULT_FORMAT = "markdown"
DEFAULT_ARGS = "$ARGUMENTS"
DEFAULT_EXTENSION = ".md"

AGENT_CONFIG = {
"copilot": {
"name": "GitHub Copilot",
"folder": ".github/",
"commands_subdir": "agents",
"install_url": None,
"requires_cli": False,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
"claude": {
"name": "Claude Code",
"folder": ".claude/",
"commands_subdir": "commands",
"install_url": "https://docs.anthropic.com/en/docs/claude-code/setup",
"requires_cli": True,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
"gemini": {
"name": "Gemini CLI",
"folder": ".gemini/",
"commands_subdir": "commands",
"install_url": "https://github.com/google-gemini/gemini-cli",
"requires_cli": True,
"command_format": "toml",
"command_args": "{{args}}",
"command_extension": ".toml",
},
"cursor-agent": {
"name": "Cursor",
"folder": ".cursor/",
"commands_subdir": "commands",
"install_url": None,
"requires_cli": False,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
"qwen": {
"name": "Qwen Code",
"folder": ".qwen/",
"commands_subdir": "commands",
"install_url": "https://github.com/QwenLM/qwen-code",
"requires_cli": True,
"command_format": "toml",
"command_args": "{{args}}",
"command_extension": ".toml",
},
"opencode": {
"name": "opencode",
"folder": ".opencode/",
"commands_subdir": "command",
"install_url": "https://opencode.ai",
"requires_cli": True,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
"codex": {
"name": "Codex CLI",
"folder": ".codex/",
"commands_subdir": "prompts",
"install_url": "https://github.com/openai/codex",
"requires_cli": True,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
"windsurf": {
"name": "Windsurf",
"folder": ".windsurf/",
"commands_subdir": "workflows",
"install_url": None,
"requires_cli": False,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
"kilocode": {
"name": "Kilo Code",
"folder": ".kilocode/",
"commands_subdir": "rules",
"install_url": None,
"requires_cli": False,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
"auggie": {
"name": "Auggie CLI",
"folder": ".augment/",
"commands_subdir": "rules",
"install_url": "https://docs.augmentcode.com/cli/setup-auggie/install-auggie-cli",
"requires_cli": True,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
"codebuddy": {
"name": "CodeBuddy",
"folder": ".codebuddy/",
"commands_subdir": "commands",
"install_url": "https://www.codebuddy.ai/cli",
"requires_cli": True,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
"qodercli": {
"name": "Qoder CLI",
"folder": ".qoder/",
"commands_subdir": "commands",
"install_url": "https://qoder.com/cli",
"requires_cli": True,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
"roo": {
"name": "Roo Code",
"folder": ".roo/",
"commands_subdir": "rules",
"install_url": None,
"requires_cli": False,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
"q": {
"name": "Amazon Q Developer CLI",
"folder": ".amazonq/",
"commands_subdir": "prompts",
"install_url": "https://aws.amazon.com/developer/learning/q-developer-cli/",
"requires_cli": True,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
"amp": {
"name": "Amp",
"folder": ".agents/",
"commands_subdir": "commands",
"install_url": "https://ampcode.com/manual#install",
"requires_cli": True,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
"shai": {
"name": "SHAI",
"folder": ".shai/",
"commands_subdir": "commands",
"install_url": "https://github.com/ovh/shai",
"requires_cli": True,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
"agy": {
"name": "Antigravity",
"folder": ".agent/",
"commands_subdir": "workflows",
"install_url": None,
"requires_cli": False,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
"bob": {
"name": "IBM Bob",
"folder": ".bob/",
"commands_subdir": "commands",
"install_url": None,
"requires_cli": False,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
"generic": {
"name": "Generic (bring your own agent)",
"folder": None,
"commands_subdir": "commands",
"install_url": None,
"requires_cli": False,
"command_format": DEFAULT_FORMAT,
"command_args": DEFAULT_ARGS,
"command_extension": DEFAULT_EXTENSION,
},
}
Loading