Update CLI reference
This commit is contained in:
42
README.md
42
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).
|
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
|
## 📚 Core philosophy
|
||||||
|
|
||||||
Spec-Driven Development is a structured process that emphasizes:
|
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
|
│ └── 001-create-taskify
|
||||||
│ └── spec.md
|
│ └── spec.md
|
||||||
└── templates
|
└── templates
|
||||||
├── CLAUDE-template.md
|
|
||||||
├── plan-template.md
|
├── plan-template.md
|
||||||
├── spec-template.md
|
├── spec-template.md
|
||||||
└── tasks-template.md
|
└── tasks-template.md
|
||||||
|
|||||||
@@ -335,6 +335,16 @@ def run_command(cmd: list[str], check_return: bool = True, capture: bool = False
|
|||||||
return None
|
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:
|
def check_tool(tool: str, install_hint: str) -> bool:
|
||||||
"""Check if a tool is installed."""
|
"""Check if a tool is installed."""
|
||||||
if shutil.which(tool):
|
if shutil.which(tool):
|
||||||
@@ -906,37 +916,36 @@ def init(
|
|||||||
# Removed farewell line per user request
|
# Removed farewell line per user request
|
||||||
|
|
||||||
|
|
||||||
# Add skip_tls option to check
|
|
||||||
@app.command()
|
@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."""
|
"""Check that all required tools are installed."""
|
||||||
show_banner()
|
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
|
# Create tracker for checking tools
|
||||||
console.print("[cyan]Checking internet connectivity...[/cyan]")
|
tracker = StepTracker("Check Available Tools")
|
||||||
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]")
|
# Add all tools we want to check
|
||||||
git_ok = check_tool("git", "https://git-scm.com/downloads")
|
tracker.add("git", "Git version control")
|
||||||
|
tracker.add("claude", "Claude Code CLI")
|
||||||
|
tracker.add("gemini", "Gemini CLI")
|
||||||
|
|
||||||
console.print("\n[cyan]Optional AI tools:[/cyan]")
|
# Check each tool
|
||||||
claude_ok = check_tool("claude", "Install from: https://docs.anthropic.com/en/docs/claude-code/setup")
|
git_ok = check_tool_for_tracker("git", "https://git-scm.com/downloads", tracker)
|
||||||
gemini_ok = check_tool("gemini", "Install from: https://github.com/google-gemini/gemini-cli")
|
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)
|
||||||
|
|
||||||
console.print("\n[green]✓ Specify CLI is ready to use![/green]")
|
# Render the final tree
|
||||||
|
console.print(tracker.render())
|
||||||
|
|
||||||
|
# Summary
|
||||||
|
console.print("\n[bold green]Specify CLI is ready to use![/bold green]")
|
||||||
|
|
||||||
|
# Recommendations
|
||||||
if not git_ok:
|
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):
|
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():
|
def main():
|
||||||
|
|||||||
Reference in New Issue
Block a user