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
5 changes: 4 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Specify supports multiple AI agents by generating agent-specific command files a
| **Gemini CLI** | `.gemini/commands/` | TOML | `gemini` | Google's Gemini CLI |
| **GitHub Copilot** | `.github/agents/` | Markdown | N/A (IDE-based) | GitHub Copilot in VS Code |
| **Cursor** | `.cursor/commands/` | Markdown | N/A (IDE-based) | Cursor IDE (`--ai cursor-agent`) |
| **Dev Container** | `.devcontainer/commands/` | Markdown | `devcontainer` (optional) | VS Code Dev Containers (`--integration devcontainer`) |
| **Qwen Code** | `.qwen/commands/` | Markdown | `qwen` | Alibaba's Qwen Code CLI |
| **opencode** | `.opencode/command/` | Markdown | `opencode` | opencode CLI |
| **Codex CLI** | `.agents/skills/` | Markdown | `codex` | Codex CLI (`--ai codex --ai-skills`) |
Expand Down Expand Up @@ -288,6 +289,7 @@ Work within integrated development environments:

- **GitHub Copilot**: Built into VS Code/compatible editors
- **Cursor**: Built into Cursor IDE (`--ai cursor-agent`)
- **Dev Container**: VS Code Dev Containers (`--integration devcontainer`)
- **Windsurf**: Built into Windsurf IDE
- **Kilo Code**: Built into Kilo Code IDE
- **Roo Code**: Built into Roo Code IDE
Expand All @@ -299,7 +301,7 @@ Work within integrated development environments:

### Markdown Format

Used by: Claude, Cursor, GitHub Copilot, opencode, Windsurf, Junie, Kiro CLI, Amp, SHAI, IBM Bob, Kimi Code, Qwen, Pi, Codex, Auggie, CodeBuddy, Qoder, Roo Code, Kilo Code, Trae, Antigravity, Mistral Vibe, iFlow, Forge
Used by: Claude, Cursor, GitHub Copilot, Dev Container, opencode, Windsurf, Junie, Kiro CLI, Amp, SHAI, IBM Bob, Kimi Code, Qwen, Pi, Codex, Auggie, CodeBuddy, Qoder, Roo Code, Kilo Code, Trae, Antigravity, Mistral Vibe, iFlow, Forge

**Standard format:**

Expand Down Expand Up @@ -355,6 +357,7 @@ Command content with {SCRIPT} and {{args}} placeholders.
- **IDE agents**: Follow IDE-specific patterns:
- Copilot: `.github/agents/`
- Cursor: `.cursor/commands/`
- Dev Container: `.devcontainer/commands/`
- Windsurf: `.windsurf/workflows/`
- Kilo Code: `.kilocode/workflows/`
- Roo Code: `.roo/commands/`
Expand Down
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,22 @@ All notable changes to the Specify CLI and templates are documented here.

- **Quick extension**: v1.0.3 → v1.0.4 (hook execution template improvement)

# [Unreleased]
# [0.8.7+adlc6] - 2026-05-13

### Fixed

- **OpenCode Docker HTTP**: Use the real OpenCode server API (`POST /session` then `POST /session/{id}/command`) instead of the non-existent `/api/execute`, map core `speckit.*` slash names to `spec.*` for the HTTP command field (with an override for `speckit.taskstoissues`), and probe **`/global/health`** (with `/health` fallback) for readiness so traffic reaches the container and can appear in **`docker compose logs`**.

# [0.8.7+adlc5] - 2026-05-13

### Added

- **`specify integration invoke`**: Dispatch a Spec Kit command (e.g. `implement`) through the active integration, including **OpenCode Docker** HTTP mode when configured.
- **`/speckit.implement` template**: Document that IDE-only implementation does not hit OpenCode Docker; use `specify integration invoke implement ...` from the repo root when `"mode": "docker"` in `.specify/opencode.json`.

### Changed

- **OpenCode Docker**: Emit `[specify][opencode-docker]` trace lines to **stderr** whenever a command (including `implement`) is dispatched via HTTP so you can confirm the container path in the terminal.

### Added

Expand Down
79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,85 @@ Additional commands for enhanced quality and validation:

For full command details, options, and examples, see the [CLI Reference](https://github.github.io/spec-kit/reference/overview.html).

### 🐳 Running OpenCode in Docker

You can run OpenCode async tasks in a Docker container for easier testing, CI/CD integration, or remote execution. This is useful for sandboxed execution or running on servers.

**Prerequisites:**
- Docker Desktop or Docker Engine
- `docker-compose` CLI tool

**Starting the Docker container:**

```bash
# Initialize your project (if not already done)
specify init . --integration opencode

# Start OpenCode in Docker
spec docker-up

# Output:
# Starting OpenCode Docker container...
# ✓ OpenCode container running at http://localhost:9000
```

**Using OpenCode from Docker:**

Once the container is running, all `spec.implement` tasks and OpenCode commands automatically execute on the Docker container via HTTP API:

```bash
specify integration invoke implement "write a hello world function"
```

The CLI talks to the OpenCode HTTP server inside Docker (`POST /session` then `POST /session/{id}/command`). While that runs, **`docker compose -f .specify/docker-compose.yml logs -f`** should show server activity, and your terminal shows **`[specify][opencode-docker]`** lines on stderr when Specify is dispatching to Docker.

**Checking container status:**

```bash
spec docker-status

# Output:
# ✓ OpenCode container opencode-dev is running
# URL: http://localhost:9000
# Recent logs:
# ...
```

**Stopping the container:**

```bash
spec docker-down

# Output:
# Stopping OpenCode Docker container...
# ✓ OpenCode container stopped
```

**Configuration:**

Docker settings are stored in `.specify/opencode.json`:

```json
{
"mode": "docker",
"docker": {
"enabled": true,
"compose_file": "./.specify/docker-compose.yml",
"container_name": "opencode-dev",
"http_url": "http://localhost:9000",
"container_workspace": "/workspace"
}
}
```

**Environment override:**

You can also use the `OPENCODE_MODE` environment variable to temporarily enable Docker mode:

```bash
OPENCODE_MODE=docker spec.implement "write a function"
```

## 🧩 Making Spec Kit Your Own: Extensions & Presets

Spec Kit can be tailored to your needs through two complementary systems — **extensions** and **presets** — plus project-local overrides for one-off adjustments:
Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ packages = ["src/specify_cli"]
"extensions/catalog.json" = "specify_cli/core_pack/extensions/catalog.json"
# Bundled presets (installable via `specify preset add <name>` or `specify init --preset <name>`)
"presets/lean" = "specify_cli/core_pack/presets/lean"
# OpenCode Docker templates
"src/specify_cli/integrations/opencode/docker/Dockerfile" = "specify_cli/integrations/opencode/docker/Dockerfile"
"src/specify_cli/integrations/opencode/docker/docker-compose.yml" = "specify_cli/integrations/opencode/docker/docker-compose.yml"

[tool.hatch.build.targets.sdist]
include = [
Expand Down Expand Up @@ -93,3 +96,10 @@ precision = 2
show_missing = true
skip_covered = false

[dependency-groups]
dev = [
"httpx>=0.28.1",
"pytest>=9.0.3",
"pytest-asyncio>=1.3.0",
]

Loading