Skip to content

feat(continue): add ZERO-294 Continue CLI adapter#44

Closed
spencercharest wants to merge 1 commit into
mainfrom
spencer/zero-303-continue-cli-adapter-claude-code-compatible-hooks
Closed

feat(continue): add ZERO-294 Continue CLI adapter#44
spencercharest wants to merge 1 commit into
mainfrom
spencer/zero-303-continue-cli-adapter-claude-code-compatible-hooks

Conversation

@spencercharest

@spencercharest spencercharest commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Subtask: ZERO-303, under ZERO-294.

Adds a Continue CLI (cn) adapter for Zero:

  • plugins/zero-continue overlay with Continue hook settings, streamable HTTP MCP config, /zero prompt, and versioned adapter metadata.
  • scripts/build-continue.sh to assemble a project-template install into dist/zero-continue/.
  • guides/continue-cli.md and README install/repo-structure entries.
  • Shared manifest bump to 1.4.0 via make minor.

Important: this PR does not modify guides/agent-install.md. Proposed runbook text is documented below for the later runbook rework.

Official sources used

Install/update surfaces

Continue CLI has no in-session plugin installer for local skills/hooks. The install surface is terminal/project-template based:

rm -rf /tmp/zero-plugins
git clone --depth 1 https://github.com/officialzeroxyz/zero-plugins /tmp/zero-plugins
/tmp/zero-plugins/scripts/build-continue.sh
cp -R /tmp/zero-plugins/dist/zero-continue/. .
cn

The adapter installs:

  • .continue/settings.json for SessionStart, UserPromptSubmit, and PreToolUse hooks.
  • .continue/mcpServers/zero.yaml for the Zero streamable HTTP MCP server.
  • .continue/prompts/zero.md for an invokable /zero prompt.
  • .continue/skills/zero/SKILL.md and .claude/skills/zero/SKILL.md for Continue/native plus compatibility skill discovery.
  • .continue/zero/hooks/*.sh copied from the shared Zero hook scripts.

Updates:

  • The Zero runner updates at Continue CLI session start via the shared ensure-runner.sh hook.
  • The project-template files update by rerunning the terminal install commands above.

Proposed guides/agent-install.md notes

Do not apply in this PR; collect for the later runbook rework:

### Continue CLI (`cn`)

Continue CLI does not currently have an in-session plugin installer for local
skills and hooks. Install Zero from a terminal at the project root:

```bash
rm -rf /tmp/zero-plugins
git clone --depth 1 https://github.com/officialzeroxyz/zero-plugins /tmp/zero-plugins
/tmp/zero-plugins/scripts/build-continue.sh
cp -R /tmp/zero-plugins/dist/zero-continue/. .
cn

This installs .continue/settings.json hooks, .continue/mcpServers/zero.yaml,
a /zero prompt, and the Zero skill under both .continue/skills/ and
.claude/skills/ for compatibility. The runner is refreshed by the
SessionStart hook; rerun the same terminal commands to update the project
files.


## Verification

Local checks:

```bash
./scripts/build-continue.sh
./scripts/build-continue.sh --tar /tmp/zero-continue.tar.gz
make version
jq . plugins/zero-continue/manifest.json plugins/zero-continue/continue/settings.json >/dev/null
ruby -e 'require "yaml"; YAML.load_file("plugins/zero-continue/continue/mcpServers/zero.yaml")'
git diff --check
git diff --cached --check

Results:

  • make version -> 1.4.0
  • Build output included .continue/settings.json, .continue/mcpServers/zero.yaml, .continue/prompts/zero.md, both skill paths, and hook scripts.
  • Confirmed guides/agent-install.md has no diff.

Docker install/load and direct runner loop:

docker run --rm --env-file "$HOME/zeroclick/env" \
  -v "$PWD":/workspace:ro \
  -v "$HOME/.zero":/host-zero:ro \
  node:24-bookworm bash -lc '...
  npm install -g @continuedev/cli@latest
  cn --version
  cp -R /workspace/dist/zero-continue/. /tmp/project/
  cp -R /host-zero "$HOME/.zero"
  cd /tmp/project
  bash .continue/zero/hooks/ensure-runner.sh
  /root/.zero/runtime/bin/zero auth whoami --json
  /root/.zero/runtime/bin/zero search "cdn.withzero.xyz upload txt file" --json
  /root/.zero/runtime/bin/zero get cdn-withzero-xyz-static-site-file-cdn-upload-a0d9f22f
  /root/.zero/runtime/bin/zero fetch --json --capability cdn-withzero-xyz-static-site-file-cdn-upload-a0d9f22f https://cdn.withzero.xyz/api/v1/uploads -d @/tmp/zero-cdn-body.json --max-pay 0.001
  curl -fsSL "$URL"
  ...'

Results:

Full Continue harness E2E:

docker run --rm --env-file "$HOME/zeroclick/env" \
  -v "$PWD":/workspace:ro \
  -v "$HOME/.zero":/host-zero:ro \
  node:24-bookworm bash -lc '...
  npm install -g @continuedev/cli@latest
  cp -R /workspace/dist/zero-continue/. /tmp/project/
  cp -R /host-zero "$HOME/.zero"
  cd /tmp/project
  timeout 240 cn -p "$PROMPT" --auto --verbose
  ...'

Result: cn itself ran the Zero search/get/fetch/curl workflow. No zero review was run.

Claude-style plugin compatibility and simpler install option

Full Claude Code plugin package support: Partial, not full. Continue CLI explicitly follows Claude-style hook semantics for cn and reads Claude-compatible skill/config locations, but it does not provide a documented installer for Claude Code .claude-plugin packages.

What this means for users:

  • This is one of the best candidates to avoid a bespoke adapter. The lower-maintenance path is to reuse the existing Zero Claude Code project files where Continue reads them, then add only the Continue-specific MCP/prompt pieces if needed.

  • A Claude-style project flow would look like:

    # Install Zero's Claude Code plugin/project files using the normal Zero Claude Code instructions.
    # Then run Continue CLI from the same project so cn can read the compatible hooks/skills.
    cn
  • If we keep the dedicated Continue template, do not require consumers to run scripts/build-continue.sh. Publish dist/zero-continue as a release artifact or installer output, then document a simple copy/extract command instead of a local build.

GitHub Releases / no-build install check

Result: No native GitHub Release/plugin installer for the Continue template. Continue CLI can reuse Claude-style hooks/skills/config, but the docs and source reviewed for this PR do not provide a cn plugin installer that resolves GitHub Release assets like Gemini CLI.

Best no-build consumer path:

curl -L https://github.com/officialzeroxyz/zero-plugins/releases/latest/download/zero-continue.tar.gz | tar -xz -C .
cn

That would avoid asking users to clone the repo and run scripts/build-continue.sh, but it is still a shell download/extract flow. It is not a native Continue install surface. If we can reuse the existing Claude Code plugin/project files cleanly, that remains the lower-maintenance path.

Status

Ready for review. Full Docker E2E passed through Continue CLI with copied host Zero auth.

@spencercharest

Copy link
Copy Markdown
Collaborator Author

Folded into #63 as a matrix entry (continue-cli in plugins/zero/agents.json) — standalone skills + MCP + the full claude-verbatim hooks fragment into ~/.continue/settings.json (verified against Continue source: Claude-identical hook schema incl. statusMessage, hookSpecificOutput parsing, and a shell tool literally named Bash, so all three shared scripts work natively). The adapter-template work here stays available on this branch if we later ship per-host templates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant