diff --git a/Makefile b/Makefile index 8c75263..7d5d71c 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,8 @@ MANIFESTS := \ plugins/zero/.claude-plugin/plugin.json \ plugins/zero/.codex-plugin/plugin.json \ plugins/zero/.factory-plugin/plugin.json \ - plugins/zero-gemini/gemini-extension.json + plugins/zero-gemini/gemini-extension.json \ + plugins/zero-cline/manifest.json # The manifest read for the current version (all of MANIFESTS stay in lockstep). VERSION_SOURCE := plugins/zero/.claude-plugin/plugin.json diff --git a/README.md b/README.md index 3c553b6..0cf92e6 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ installation, use the guides below. Pick your agent: web, desktop, and mobile - **[Codex (CLI)](guides/codex.md)** - **[Codex app](guides/codex-app.md)** +- **[Cline](guides/cline.md)** - **[Droid](guides/droid.md)** - **[Gemini CLI](guides/gemini-cli.md)** - **[Anything else (standalone installer)](guides/generic.md)** — works in any @@ -74,6 +75,8 @@ plugins/zero/ # the shared plugin: skill + hooks (+ Claude's └── .factory-plugin/ # Droid manifest plugins/zero-gemini/ # thin Gemini-only overlay (manifest + hook wiring) scripts/build-gemini.sh # assembles the installable Gemini extension into dist/ +plugins/zero-cline/ # thin Cline overlay (skill + workflow + MCP fragment) +scripts/build-cline.sh # assembles the Cline project template into dist/ guides/ # per-host install guides + the agent install runbook ``` @@ -83,5 +86,5 @@ mechanics — live in the per-host guides. ## Status This repo is built up iteratively, one carefully reviewed PR at a time. Today -it ships the **Claude Code**, **Codex**, **Droid**, and **Gemini CLI** plugins; -additional hosts (Cursor) will land in subsequent PRs. +it ships the **Claude Code**, **Cline**, **Codex**, **Droid**, and +**Gemini CLI** plugins; additional hosts will land in subsequent PRs. diff --git a/guides/cline.md b/guides/cline.md new file mode 100644 index 0000000..7ba7e15 --- /dev/null +++ b/guides/cline.md @@ -0,0 +1,74 @@ +# Zero for Cline + +How to install Zero in Cline and keep it up to date. + +## Install + +### Inside Cline + +Cline does not have a Zero plugin bundle for the VS Code or JetBrains +extensions. Install the project files from the terminal, then open Cline +settings and enable Skills if needed: Settings -> Features -> Enable Skills. + +To add only the Zero MCP server in Cline: + +1. Open the MCP Servers panel. +2. Use the Marketplace tab if Zero is listed. +3. Otherwise use the Configure or Remote Servers tab and add: + +```json +{ + "mcpServers": { + "zero": { + "url": "https://mcp.zero.xyz", + "disabled": false, + "autoApprove": [] + } + } +} +``` + +Keep `autoApprove` empty unless you have reviewed a specific Zero MCP tool and +decided it is safe to run without confirmation. + +### From the terminal + +First install the Zero runner: + +```bash +curl -fsSL https://zero.xyz/install.sh | bash +``` + +Then, from the root of the project where you use Cline: + +```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 stores MCP servers in `~/.cline/mcp.json`. To merge the Zero MCP +fragment for CLI use: + +```bash +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 +``` + +Restart Cline. The Zero skill is available from `.cline/skills/zero`, and the +manual workflow is available as `/zero`. Then ask Cline: *"Help me set up +and test Zero."* It walks you through signing in. + +## Staying up to date + +- To update the Zero runner, rerun: + + ```bash + curl -fsSL https://zero.xyz/install.sh | bash + ``` + +- To update the project files, rerun the terminal install commands from this + guide. diff --git a/plugins/zero-cline/README.md b/plugins/zero-cline/README.md new file mode 100644 index 0000000..e8cfdfd --- /dev/null +++ b/plugins/zero-cline/README.md @@ -0,0 +1,51 @@ +# zero-cline (overlay - not directly installable) + +This directory is **not** a complete Cline install on its own. It holds the +Cline-specific files that are overlaid with the shared Zero skill from +[`../zero/`](../zero/): + +- `manifest.json` - versioned metadata for this adapter +- `cline/zero/mcp.json` - Cline MCP config fragment +- `clinerules/workflows/zero.md` - manual `/zero` workflow + +User-facing install instructions are in the +[Cline guide](../../guides/cline.md). + +## How the adapter is built + +Cline's VS Code and JetBrains extensions do not currently consume Cline SDK +plugins, so this adapter is a project template assembled by +`scripts/build-cline.sh`: + +``` +plugins/zero-cline/ # this overlay + ├── manifest.json # versioned adapter metadata + ├── cline/zero/mcp.json # MCP config fragment + └── clinerules/workflows/zero.md # /zero workflow + +scripts/build-cline.sh # assembles overlay + shared files -> dist/zero-cline/ + +dist/zero-cline/ # (git-ignored) files to copy into a project: + ├── manifest.json # <- plugins/zero-cline/ + ├── .cline/ + │ ├── skills/zero/SKILL.md # <- plugins/zero/ + │ └── zero/mcp.json # <- plugins/zero-cline/ (merge into Cline MCP config) + └── .clinerules/ + └── workflows/zero.md # <- plugins/zero-cline/ +``` + +## How Cline differs from Claude Code + +Cline discovers project skills from `.cline/skills/` (recommended), +`.clinerules/skills/`, and `.claude/skills/`. This template uses +`.cline/skills/zero` only to avoid duplicate `/zero` skill entries. + +Cline extension MCP is configured through the Cline UI or the extension's MCP +settings JSON. Cline CLI uses `~/.cline/mcp.json`. The adapter ships +`.cline/zero/mcp.json` as a mergeable config fragment rather than assuming a +project-level MCP file is loaded automatically. + +Cline's current plugin and hook docs apply to SDK, CLI, and Kanban, and are not +applicable to the VS Code and JetBrains extensions yet. For that reason this +adapter intentionally does not ship hooks; users install the Zero runner through +the standalone installer. diff --git a/plugins/zero-cline/cline/zero/mcp.json b/plugins/zero-cline/cline/zero/mcp.json new file mode 100644 index 0000000..da10a0e --- /dev/null +++ b/plugins/zero-cline/cline/zero/mcp.json @@ -0,0 +1,9 @@ +{ + "mcpServers": { + "zero": { + "url": "https://mcp.zero.xyz", + "disabled": false, + "autoApprove": [] + } + } +} diff --git a/plugins/zero-cline/clinerules/workflows/zero.md b/plugins/zero-cline/clinerules/workflows/zero.md new file mode 100644 index 0000000..8526db0 --- /dev/null +++ b/plugins/zero-cline/clinerules/workflows/zero.md @@ -0,0 +1,12 @@ +# Zero + +Use the Zero skill to search for external capabilities before saying a task is +unavailable or asking the user to sign up for another service. + +1. Resolve the Zero runner. Prefer `zero` on PATH; otherwise use + `$HOME/.zero/runtime/bin/zero`. +2. Search with `zero search`. +3. Inspect the selected capability with `zero get`. +4. Call it with `zero fetch` and an explicit `--max-pay` cap. +5. Do not run `zero wallet` unless the user explicitly asks for wallet + management. diff --git a/plugins/zero-cline/manifest.json b/plugins/zero-cline/manifest.json new file mode 100644 index 0000000..61c0111 --- /dev/null +++ b/plugins/zero-cline/manifest.json @@ -0,0 +1,10 @@ +{ + "name": "zero-cline", + "version": "1.4.0", + "description": "Cline adapter for Zero. Ships the Zero skill, Cline MCP config fragment, and a manual /zero workflow.", + "author": { "name": "Zero", "url": "https://zero.xyz" }, + "homepage": "https://zero.xyz", + "repository": "https://github.com/officialzeroxyz/zero-plugins", + "license": "MIT", + "keywords": ["zero", "cline", "x402", "mpp", "payments", "capabilities", "mcp", "agent-tools"] +} diff --git a/plugins/zero-gemini/gemini-extension.json b/plugins/zero-gemini/gemini-extension.json index 69ea920..ac48f52 100644 --- a/plugins/zero-gemini/gemini-extension.json +++ b/plugins/zero-gemini/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "zero", - "version": "1.3.3", + "version": "1.4.0", "description": "Discover and call paid AI capabilities (x402 / MPP) with automatic, wallet-backed payment. Search a live index of external services — image/video/audio generation, web scraping, data enrichment, real-time data, messaging — then call them and pay per use. Bundles the 'zero' skill and the Zero MCP connector.", "mcpServers": { "zero": { diff --git a/plugins/zero/.claude-plugin/plugin.json b/plugins/zero/.claude-plugin/plugin.json index 6b83198..59e52a7 100644 --- a/plugins/zero/.claude-plugin/plugin.json +++ b/plugins/zero/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "zero", - "version": "1.3.3", + "version": "1.4.0", "description": "Discover and call paid AI capabilities (x402 / MPP) with automatic, wallet-backed payment. Search a live index of external services — image/video/audio generation, web scraping, data enrichment, real-time data, messaging — then call them and pay per use. Bundles the 'zero' skill and the Zero MCP connector.", "author": { "name": "Zero", "url": "https://zero.xyz" }, "homepage": "https://zero.xyz", diff --git a/plugins/zero/.codex-plugin/plugin.json b/plugins/zero/.codex-plugin/plugin.json index e90630a..3a8d304 100644 --- a/plugins/zero/.codex-plugin/plugin.json +++ b/plugins/zero/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "zero", - "version": "1.3.3", + "version": "1.4.0", "description": "Discover and call paid AI capabilities (x402 / MPP) with automatic, wallet-backed payment. Search a live index of external services — image/video/audio generation, web scraping, data enrichment, real-time data, messaging — then call them and pay per use. Bundles the 'zero' skill.", "author": { "name": "Zero", "url": "https://zero.xyz" }, "homepage": "https://zero.xyz", diff --git a/plugins/zero/.factory-plugin/plugin.json b/plugins/zero/.factory-plugin/plugin.json index 6b83198..59e52a7 100644 --- a/plugins/zero/.factory-plugin/plugin.json +++ b/plugins/zero/.factory-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "zero", - "version": "1.3.3", + "version": "1.4.0", "description": "Discover and call paid AI capabilities (x402 / MPP) with automatic, wallet-backed payment. Search a live index of external services — image/video/audio generation, web scraping, data enrichment, real-time data, messaging — then call them and pay per use. Bundles the 'zero' skill and the Zero MCP connector.", "author": { "name": "Zero", "url": "https://zero.xyz" }, "homepage": "https://zero.xyz", diff --git a/scripts/build-cline.sh b/scripts/build-cline.sh new file mode 100755 index 0000000..9a0fe12 --- /dev/null +++ b/scripts/build-cline.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash +# +# Assemble the Cline adapter into dist/zero-cline/. +# +# Cline's editor extensions do not currently consume Cline SDK plugins, so this +# script builds a project template. The Cline-specific overlay lives in +# plugins/zero-cline/; the shared Zero skill lives once in plugins/zero/. +# +# Usage: +# scripts/build-cline.sh # assemble dist/zero-cline/ +# scripts/build-cline.sh --tar OUT.tgz # also write a tarball + +set -euo pipefail + +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +SHARED="$ROOT/plugins/zero" +OVERLAY="$ROOT/plugins/zero-cline" +OUT="$ROOT/dist/zero-cline" + +TARBALL="" +if [ "${1:-}" = "--tar" ]; then + TARBALL="${2:?--tar requires an output path}" +fi + +for f in \ + "$OVERLAY/manifest.json" \ + "$OVERLAY/cline/zero/mcp.json" \ + "$OVERLAY/clinerules/workflows/zero.md" \ + "$SHARED/skills/zero/SKILL.md"; do + [ -f "$f" ] || { echo "build-cline: missing required input: $f" >&2; exit 1; } +done + +rm -rf "$OUT" +mkdir -p \ + "$OUT/.cline/skills" \ + "$OUT/.cline/zero" \ + "$OUT/.clinerules/workflows" + +cp "$OVERLAY/manifest.json" "$OUT/manifest.json" +cp "$OVERLAY/cline/zero/mcp.json" "$OUT/.cline/zero/mcp.json" +cp "$OVERLAY/clinerules/workflows/zero.md" "$OUT/.clinerules/workflows/zero.md" +cp -R "$SHARED/skills/zero" "$OUT/.cline/skills/zero" + +echo "build-cline: assembled $OUT" +find "$OUT" -type f | sed "s#^$ROOT/##" | sort + +if [ -n "$TARBALL" ]; then + mkdir -p "$(dirname "$TARBALL")" + tar -czf "$TARBALL" -C "$OUT" . + echo "build-cline: wrote $TARBALL" +fi