Skip to content

πŸ’« Toolkit to help you get started with SDD or any other process!

Update CLI reference

Den Delimarsky 🌺1ae6b55c8706
diff --git a/README.md b/README.md
index ff768c53c..242ff8924 100644
--- a/README.md
+++ b/README.md
@@ -64,6 +64,47 @@ Use `/tasks` to create an actionable task list, then ask your agent to implement
For detailed step-by-step instructions, see our [comprehensive guide](./spec-driven.md).
+## πŸ”§ Specify CLI Reference
+
+The `specify` command supports the following options:
+
+### Commands
+
+| Command | Description |
+|-------------|----------------------------------------------------------------|
+| `init` | Initialize a new Specify project from the latest template |
+| `check` | Check for installed tools (`git`, `claude`, `gemini`) |
+
+### `specify init` Arguments & Options
+
+| Argument/Option | Type | Description |
+|------------------------|----------|------------------------------------------------------------------------------|
+| `<project-name>` | Argument | Name for your new project directory (optional if using `--here`) |
+| `--ai` | Option | AI assistant to use: `claude`, `gemini`, or `copilot` |
+| `--ignore-agent-tools` | Flag | Skip checks for AI agent tools like Claude Code |
+| `--no-git` | Flag | Skip git repository initialization |
+| `--here` | Flag | Initialize project in the current directory instead of creating a new one |
+| `--skip-tls` | Flag | Skip SSL/TLS verification (not recommended) |
+
+### Examples
+
+```bash
+# Basic project initialization
+specify init my-project
+
+# Initialize with specific AI assistant
+specify init my-project --ai claude
+
+# Initialize in current directory
+specify init --here --ai copilot
+
+# Skip git initialization
+specify init my-project --ai gemini --no-git
+
+# Check system requirements
+specify check
+```
+
## πŸ“š Core philosophy
Spec-Driven Development is a structured process that emphasizes:
@@ -214,7 +255,6 @@ At this stage, your project folder contents should resemble the following:
β”‚ └── 001-create-taskify
β”‚ └── spec.md
└── templates
- β”œβ”€β”€ CLAUDE-template.md
β”œβ”€β”€ plan-template.md
β”œβ”€β”€ spec-template.md
└── tasks-template.md
diff --git a/src/specify_cli/__init__.py b/src/specify_cli/__init__.py
index 250cad558..8c08d61c9 100644
--- a/src/specify_cli/__init__.py
+++ b/src/specify_cli/__init__.py
@@ -335,6 +335,16 @@ def run_command(cmd: list[str], check_return: bool = True, capture: bool = False
return None
+def check_tool_for_tracker(tool: str, install_hint: str, tracker: StepTracker) -> bool:
+ """Check if a tool is installed and update tracker."""
+ if shutil.which(tool):
+ tracker.complete(tool, "available")
+ return True
+ else:
+ tracker.error(tool, f"not found - {install_hint}")
+ return False
+
+
def check_tool(tool: str, install_hint: str) -> bool:
"""Check if a tool is installed."""
if shutil.which(tool):
@@ -906,37 +916,36 @@ def init(
# Removed farewell line per user request
-# Add skip_tls option to check
@app.command()
-def check(skip_tls: bool = typer.Option(False, "--skip-tls", help="Skip SSL/TLS verification (not recommended)")):
+def check():
"""Check that all required tools are installed."""
show_banner()
- console.print("[bold]Checking Specify requirements...[/bold]\n")
+ console.print("[bold]Checking for installed tools...[/bold]\n")
- # Check if we have internet connectivity by trying to reach GitHub API
- console.print("[cyan]Checking internet connectivity...[/cyan]")
- verify = not skip_tls
- local_ssl_context = ssl_context if verify else False
- local_client = httpx.Client(verify=local_ssl_context)
- try:
- response = local_client.get("https://api.github.com", timeout=5, follow_redirects=True)
- console.print("[green]βœ“[/green] Internet connection available")
- except httpx.RequestError:
- console.print("[red]βœ—[/red] No internet connection - required for downloading templates")
- console.print("[yellow]Please check your internet connection[/yellow]")
-
- console.print("\n[cyan]Optional tools:[/cyan]")
- git_ok = check_tool("git", "https://git-scm.com/downloads")
+ # Create tracker for checking tools
+ tracker = StepTracker("Check Available Tools")
+
+ # Add all tools we want to check
+ tracker.add("git", "Git version control")
+ tracker.add("claude", "Claude Code CLI")
+ tracker.add("gemini", "Gemini CLI")
+
+ # Check each tool
+ git_ok = check_tool_for_tracker("git", "https://git-scm.com/downloads", tracker)
+ claude_ok = check_tool_for_tracker("claude", "https://docs.anthropic.com/en/docs/claude-code/setup", tracker)
+ gemini_ok = check_tool_for_tracker("gemini", "https://github.com/google-gemini/gemini-cli", tracker)
+
+ # Render the final tree
+ console.print(tracker.render())
- console.print("\n[cyan]Optional AI tools:[/cyan]")
- claude_ok = check_tool("claude", "Install from: https://docs.anthropic.com/en/docs/claude-code/setup")
- gemini_ok = check_tool("gemini", "Install from: https://github.com/google-gemini/gemini-cli")
+ # Summary
+ console.print("\n[bold green]Specify CLI is ready to use![/bold green]")
- console.print("\n[green]βœ“ Specify CLI is ready to use![/green]")
+ # Recommendations
if not git_ok:
- console.print("[yellow]Consider installing git for repository management[/yellow]")
+ console.print("[dim]Tip: Install git for repository management[/dim]")
if not (claude_ok or gemini_ok):
- console.print("[yellow]Consider installing an AI assistant for the best experience[/yellow]")
+ console.print("[dim]Tip: Install an AI assistant for the best experience[/dim]")
def main():