Skip to content

feat(cline): add ZERO-294 Cline adapter#49

Closed
spencercharest wants to merge 1 commit into
mainfrom
spencer/zero-308-cline-adapter-skill-mcp-marketplace-hooks-in-flux
Closed

feat(cline): add ZERO-294 Cline adapter#49
spencercharest wants to merge 1 commit into
mainfrom
spencer/zero-308-cline-adapter-skill-mcp-marketplace-hooks-in-flux

Conversation

@spencercharest

@spencercharest spencercharest commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds zero-cline, a Cline project-template adapter for ZERO-308 under ZERO-294.
  • Ships .cline/skills/zero/SKILL.md, .clinerules/workflows/zero.md, and a mergeable Cline MCP fragment at .cline/zero/mcp.json.
  • Adds scripts/build-cline.sh, guides/cline.md, README install link, and a 1.4.0 version bump through make minor.

guides/agent-install.md is intentionally not modified in this PR.

Official Sources Used

Install / Update Surfaces

Human in-harness flow:

  • Enable Skills in Cline settings if needed.
  • For MCP only, use the MCP Servers panel and Marketplace if Zero is listed.
  • Otherwise add the remote MCP server manually:
{
  "mcpServers": {
    "zero": {
      "url": "https://mcp.zero.xyz",
      "disabled": false,
      "autoApprove": []
    }
  }
}

Terminal/project-template flow:

curl -fsSL https://zero.xyz/install.sh | bash
rm -rf /tmp/zero-plugins
git clone --depth 1 https://github.com/officialzeroxyz/zero-plugins /tmp/zero-plugins
/tmp/zero-plugins/scripts/build-cline.sh
cp -R /tmp/zero-plugins/dist/zero-cline/. .

Cline CLI MCP merge:

mkdir -p ~/.cline
test -f ~/.cline/mcp.json || printf '{"mcpServers":{}}\n' > ~/.cline/mcp.json
tmp="$(mktemp)"
jq -s '.[0] * .[1]' ~/.cline/mcp.json .cline/zero/mcp.json > "$tmp" && mv "$tmp" ~/.cline/mcp.json

Update flow: rerun the standalone runner installer and rebuild/copy dist/zero-cline/.

Proposed guides/agent-install.md Notes

Do not apply these in this PR; collect them when the runbook is reworked.

  • Add a Cline section covering .cline/skills/zero/SKILL.md, .clinerules/workflows/zero.md -> /zero, and the Cline MCP server fragment.
  • Mention .cline/skills/ as the recommended project skill path. Cline also has compatibility paths such as .clinerules/skills/ and .claude/skills/, but this template intentionally emits one skill copy to avoid duplicate /zero entries.
  • For MCP, document the UI/Marketplace flow first. For Cline CLI, merge the Zero fragment into ~/.cline/mcp.json.
  • Keep autoApprove empty by default. Do not auto-approve paid Zero fetches or wallet operations.
  • Do not document hooks as installed for the Cline editor extensions yet. Current Cline SDK plugin/hook docs apply to SDK, CLI, and Kanban surfaces and are explicitly not applicable to VS Code/JetBrains extensions, so the adapter waits on extension hook/plugin support.
  • Keep standalone runner install/update as curl -fsSL https://zero.xyz/install.sh | bash.

Verification

Local checks:

  • make minor -> bumped all manifests to 1.4.0.
  • scripts/build-cline.sh --tar dist/zero-cline.tgz
  • jq -e . plugins/zero-cline/manifest.json plugins/zero-cline/cline/zero/mcp.json
  • make version -> 1.4.0
  • tar -tzf dist/zero-cline.tgz
  • cmp -s plugins/zero/skills/zero/SKILL.md dist/zero-cline/.cline/skills/zero/SKILL.md
  • git diff -- guides/agent-install.md -> no diff

Docker Cline template smoke:

  • Image: node:24-bookworm
  • Installed cline@3.0.24.
  • Applied dist/zero-cline/ into /work/project.
  • Merged .cline/zero/mcp.json into ~/.cline/mcp.json with jq.
  • Validated file set:
    • ./.cline/skills/zero/SKILL.md
    • ./.cline/zero/mcp.json
    • ./.clinerules/workflows/zero.md
    • ./manifest.json
  • Verified merged MCP URL: https://mcp.zero.xyz.

Docker Cline headless smoke:

  • Used ~/zeroclick/env OpenAI key with cline -P openai -m gpt-4.1-mini -k "$OPENAI_API_KEY" --json.
  • Prompt: Say exactly ZERO-308 Cline headless smoke.
  • Result: completed successfully with output ZERO-308 Cline headless smoke.

Docker Cline + copied-auth Zero E2E:

  • Image: node:24-bookworm
  • Copied host ~/.zero into the container as $HOME/.zero.
  • Installed cline@3.0.24 and container-local @zeroxyz/cli@latest.
  • Applied dist/zero-cline/ into /work/project.
  • Merged .cline/zero/mcp.json into ~/.cline/mcp.json.
  • Ran Cline headlessly with OpenAI provider/key, --auto-approve true, and an explicit instruction to use the Zero skill/workflow and not run zero review.
  • Cline executed the required Zero flow through shell tools:
    • zero search "cdn.withzero.xyz upload txt file" --json
    • zero get cdn-withzero-xyz-static-site-file-cdn-upload-a0d9f22f
    • 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 verification of returned URL
  • run ID: run_DZVTt4o7ELxHOtaUT1K_w
  • returned URL: https://cdn.withzero.xyz/LolkTqxW/agent-harness-e2e-cline-docker-20260615T002250Z.txt
  • payment: 0 USDC
  • verification: returned content matched the uploaded text exactly.

Claude-style plugin compatibility and simpler install option

Full Claude Code plugin package support: No. Cline reads Claude-compatible skills such as .claude/skills/, but the current VS Code/JetBrains extension surface does not document installing Claude Code .claude-plugin packages directly.

What this means for users:

  • The custom Cline adapter is mostly a convenience wrapper around skill + MCP marketplace/config guidance.

  • The lowest-friction consumer path is Cline's own UI/Marketplace for MCP plus a prebuilt or copied skill:

    curl -fsSL https://zero.xyz/install.sh | bash
    # add the Zero skill under .cline/skills/zero or .claude/skills/zero
    # add Zero MCP through Cline's Marketplace/UI or merge the MCP fragment
  • Do not ask consumers to build locally. If this adapter remains, publish the generated files as a release artifact and document extract/merge steps only.

GitHub Releases / no-build install check

Result: No native Gemini-style GitHub Release install path. Cline's documented low-friction install surface is the MCP Marketplace/UI or manual MCP config. The docs do not show installing skills/workflows/hooks from GitHub Release assets.

Best no-build consumer path:

Cline MCP Servers -> Marketplace or Remote Servers -> add https://mcp.zero.xyz

plus a prebuilt/copyable Zero skill under .cline/skills/zero or .claude/skills/zero.

A GitHub Release tarball can package the skill/workflow/MCP fragment to avoid local builds, but it should be documented as manual download/extract. For Cline, a marketplace MCP listing likely gives more user value than a custom release artifact.

Status

Ready for review. Full Cline CLI harness E2E passed in Docker. Editor-extension MCP/Marketplace listing still needs product-side submission, but the project-template adapter and CLI path are verified.

@spencercharest

Copy link
Copy Markdown
Collaborator Author

Folded into #63 as a matrix entry (cline in plugins/zero/agents.json) — standalone skills + MCP (path updated to ~/.cline/data/settings/cline_mcp_settings.json per current docs). No hooks fragment: Cline's hook surface is in flux (TS SDK plugins / executable-file dirs, no JSON config), as this PR anticipated; #63 tracks the revisit (AgentPlugin publication or marketplace listing). 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