ethanhq
Ethan Guo's Claude Code plugins — currently cc-fleet (provider LLM teammates / subagents).
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/ethanhq--cc-fleet)HTML
<a href="/listings/ethanhq--cc-fleet"><img src="/api/listings/ethanhq--cc-fleet/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
These steps run a script from the network that findsafeskills does not scan.
**0. Install Claude Code first** — cc-fleet drives the official `claude` CLI, so install it if you don't have it yet (skip if `claude` is already on your PATH):
**macOS / Linux:**
curl -fsSL https://claude.ai/install.sh | bash
**Windows (PowerShell):**
irm https://claude.ai/install.ps1 | iex
**1. Install cc-fleet with the one-line script (recommended)** — one command does it all: downloads and verifies the CLI, puts it on your PATH (with a `ccf` alias, so `ccf` launches it from then on), and installs the Claude Code plugin (skill + session hook) via the marketplace. Ready to use right after:
**macOS / Linux:**
curl -fsSL https://raw.githubusercontent.com/ethanhq/cc-fleet/main/install.sh | sh
**Windows (PowerShell):**
irm https://raw.githubusercontent.com/ethanhq/cc-fleet/main/install.ps1 | iex
**Codex plugin** — to drive cc-fleet from a Codex session, after the install above run `codex plugin marketplace add ethanhq/cc-fleet` then `codex plugin add cc-fleet`.
> Other channels (npm / go install / Releases / source) and adding the Claude Code plugin, installer overrides, and requirements & maintenance live in **[Install & maintenance](docs/install.md)**.
**Common commands:**
ccf # open the interactive TUI ccf doctor # health check: dependencies, providers, plugin status ccf update # self-update by install channel + refresh the plugin ccf uninstall --all # remove the binary and plugin too
Once installed, run `ccf` to register a provider and start delegating.
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
.claude-plugin/marketplace.json · Manifest · 15 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- {
- "name": "ethanhq",
- "owner": {
- "name": "Ethan Guo",
- "email": "ethanguo.dev@gmail.com"
- },
- "description": "Ethan Guo's Claude Code plugins — currently cc-fleet (provider LLM teammates / subagents).",
- "plugins": [
- {
- "name": "cc-fleet",
- "source": "./",
- "description": "Run any third-party LLM provider with an Anthropic-compatible API as real Claude Code agent-team teammates (terminal claude inside tmux or iTerm2) or one-shot subagents via the cc-fleet CLI — driven just like native teammates; your main session's own auth (OAuth or API key) is untouched, provider workers bill the provider key."
- }
- ]
- }
README.md · README · 355 lines · 2 findings marked
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- 
- <h1 align="center">🚢 cc-fleet</h1>
- <p align="center"><strong>🤖 Plug any third-party model into Claude Code's ⚙️ Dynamic Workflows, 👥 Agent Teams, and ⚡ Subagents — from DeepSeek · GLM · Kimi · Qwen … to your Codex subscription, with your main session's auth untouched; no Claude subscription needed to run a full Claude Code on any provider 🚀</strong></p>
- <div align="center">
- [](https://github.com/ethanhq/cc-fleet/releases) [](https://www.npmjs.com/package/@ethanhq/cc-fleet) [](https://github.com/ethanhq/cc-fleet/releases) [](LICENSE)
- **English** · [简体中文](docs/README_zh.md)
- </div>
- ---
- Claude Code's multi-agent orchestration — Dynamic Workflows, Agent Teams, Subagents — only runs Anthropic's own models. cc-fleet lets any model with an Anthropic- or OpenAI-compatible API, even your Codex subscription, join as a workflow leaf, a long-lived teammate, or a one-shot subagent — scheduled by your main session, **with the same identity and capabilities as a native Claude agent**.
- Every third-party worker is a real `claude` process with its LLM backend swapped to the provider, so Claude Code drives it exactly like a native agent. Your main session's own auth (OAuth subscription or API key) is untouched, and provider keys never enter env, argv, or shell history — **zero leak risk**.
- **Two steps to get going**: one-line install, register a provider. Then state your intent in Claude Code with `/workflow`, `/team`, or `/subagent` — or just describe the task in plain language, and Claude figures out the rest.
- No Claude subscription? `ccf run <provider>` starts an interactive session driven by that provider — **the same `claude` you know**, just running on the provider's model.
- cc-fleet can be driven from Codex too: a Codex plugin gives a Codex session the same fan-out — `cc-fleet subagent` and `cc-fleet workflow`, with the `claude` engine as the worker. (Teammates stay Claude-Code-only.)
- ## Install
- **0. Install Claude Code first** — cc-fleet drives the official `claude` CLI, so install it if you don't have it yet (skip if `claude` is already on your PATH):
- **macOS / Linux:**
- ```bash
- curl -fsSL https://claude.ai/install.sh | bash
- ```
- **Windows (PowerShell):**
- ```powershell
- irm https://claude.ai/install.ps1 | iex
- ```
- **1. Install cc-fleet with the one-line script (recommended)** — one command does it all: downloads and verifies the CLI, puts it on your PATH (with a `ccf` alias, so `ccf` launches it from then on), and installs the Claude Code plugin (skill + session hook) via the marketplace. Ready to use right after:
- **macOS / Linux:**
- ```bash
- curl -fsSL https://raw.githubusercontent.com/ethanhq/cc-fleet/main/install.sh | sh
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 44 on GitHub
- ```
- **Windows (PowerShell):**
- ```powershell
- irm https://raw.githubusercontent.com/ethanhq/cc-fleet/main/install.ps1 | iex
- Note: Runs a downloaded PowerShell script (iex / Invoke-Expression)
- Line 48 on GitHub
- ```
- **Codex plugin** — to drive cc-fleet from a Codex session, after the install above run `codex plugin marketplace add ethanhq/cc-fleet` then `codex plugin add cc-fleet`.
- > Other channels (npm / go install / Releases / source) and adding the Claude Code plugin, installer overrides, and requirements & maintenance live in **[Install & maintenance](docs/install.md)**.
- **Common commands:**
- ```bash
- ccf # open the interactive TUI
- ccf doctor # health check: dependencies, providers, plugin status
- ccf update # self-update by install channel + refresh the plugin
- ccf uninstall --all # remove the binary and plugin too
- ```
- Once installed, run `ccf` to register a provider and start delegating.
- ## Quickstart
- <table>
- <tr>
- <td width="50%" valign="top">
- <div align="center">
- **🔌 Provider management — one API key, connected**
- <img src="docs/assets/demo-provider.webp" alt="provider management demo" width="100%" />
- </div>
- 1. **`ccf` opens the TUI**; choose Add provider
- 2. **Pick any Anthropic / OpenAI-compatible vendor**
- 3. **Enter the API key and default model**; optionally an effort level and a Claude permission mode
- 4. **Save and go**; add more models and toggle them in the list, `s` sets the default, `d` deletes
- 5. **(Optional) Add Codex**: reuse an existing OAuth, or log in fresh
- </td>
- <td width="50%" valign="top">
- <div align="center">
- **🖥️ `ccf run` — run Claude Code on any provider**
- <img src="docs/assets/demo-run.webp" alt="ccf run demo" width="100%" />
- </div>
- 1. **`ccf run` launches an interactive `claude` on your default provider**; `ccf run <provider>` picks one
- 2. **All tools, the full REPL**; no Anthropic subscription, your main session's login untouched
- 3. **Switch anytime mid-session**: `/model` for the model, `/effort` for thinking effort, `Shift+Tab` for permission mode
- </td>
- </tr>
- <tr>
- <td width="50%" valign="top">
- <div align="center">
- **⚙️ Dynamic Workflows — the same orchestration API as native workflows**
- <img src="docs/assets/demo-workflow.webp" alt="dynamic workflow demo" width="100%" />
- </div>
- 1. **`/workflow` to kick it off, or just tell Claude**: "map each module with deepseek, glm drafts an audit checklist per module, gpt synthesizes"
- 2. **Claude writes the JS script and runs it in the background** — no tokens off your main session
- 3. **`workflow wait` blocks until it finishes** — event-driven, no polling
- 4. **The TUI board shows every leaf and phase live** — `x` to hold / `r` to rerun a single leaf or a whole phase
- </td>
- <td width="50%" valign="top">
- <div align="center">
- **👥 Agent Teams — native multi-agent collaboration in tmux panes**
- <img src="docs/assets/demo-team.webp" alt="agent team demo" width="100%" />
- </div>
- 1. **`/team` to kick it off, or just tell Claude**: "start a glm and a deepseek teammate, then compare their strengths"
- 2. **Each teammate is a real `claude` process working live in a side tmux pane** — mix providers in one team, hand follow-ups across turns
- 3. **The TUI board shows each teammate's full inbox and status**; `h` hides / `s` shows a pane — split in the foreground or run in the background
- </td>
- </tr>
- <tr>
- <td width="50%" valign="top">
- <div align="center">
- **⚡ Subagents — the lightest one-shot delegation**
- <img src="docs/assets/demo-subagent.webp" alt="subagent demo" width="100%" />
- </div>
- 1. **`/subagent` to kick it off, or just tell Claude**: "fan out kimi, qwen, and glm over these three files in parallel"
- 2. **Claude runs the models and collects results synchronously** — dispatch as many in parallel as you like
- 3. **`slim-ro` read-only mode**: let a provider analyze your repo safely, without touching code
- 4. **The TUI board shows each job's prompt, answer, and spend**
- </td>
- <td width="50%" valign="top">
- <div align="center">
- **📊 The TUI board — your whole fleet on one screen**
- <img src="docs/assets/demo-tui.webp" alt="TUI board demo" width="100%" />
- </div>
- 1. **After `ccf` launches, press `Tab` for the Agents Board** — every Workflow / Team / Subagent laid out by project → session
- 2. **Open any one for detail**: a Workflow's run → phase → leaf progress tree, a Team's teammate inbox, each drilling into prompt, answer, and spend
- 3. **Act inside the board**: `x` / `r` to stop or rerun, `p` to pin against cleanup, `c` to clear finished, `d` to delete, `h` / `s` to hide or show a pane
- 4. **Finished teams stay on record**; the UI follows your system light / dark theme
- </td>
- </tr>
- </table>
- ## Deep dive
- cc-fleet's capabilities fall into two groups:
- - **Three delegation lanes** (Workflow / Agent Team / Subagent) — scheduled automatically by Claude: say what you want and the skills pick the lane and the model for you, no manual choice.
- - **Provider and `ccf run`** — tools you configure and use directly.
- ---
- ### ⚙️ Dynamic Workflows
- <table>
- <tr>
- <td width="50%" align="center"><img src="docs/assets/workflow-board.webp" width="100%" /><br/><sub>Agents Board: the phase → leaf tree</sub></td>
- <td width="50%" align="center"><img src="docs/assets/workflow-leaf.webp" width="100%" /><br/><sub>drill into one leaf: full prompt and synthesized output</sub></td>
- </tr>
- </table>
- **Orchestration API**: multi-phase orchestration lives in a JavaScript file, with an API identical to Claude Code's native Workflow tool — `agent()` starts a node, `parallel()` fans out, `pipeline()` chains a flow. The one difference is that `agent()` takes a `provider` option to assign each node's model, so different vendors mix and run in parallel within a single run:
- ```js
- const meta = {
- name: "api audit",
- description: "map endpoints, then draft audit checklists",
- phases: [{ title: "map" }, { title: "build" }, { title: "judge" }],
- };
- phase("map");
- const maps = (await parallel(
- ["auth", "billing", "users"].map((m) =>
- () => agent("List the exported endpoints in module " + m, { provider: "deepseek" }))
- )).filter(Boolean);
- phase("build");
- const checklists = await pipeline(maps,
- (endpoints, _, i) => agent("Draft an audit checklist:\n" + endpoints,
- { provider: "glm", label: "build:" + i }));
- phase("judge");
- const verdict = await agent("Pick the strongest one and say why:\n" + checklists.join("\n---\n"),
- { provider: "claude", model: "opus", label: "judge" });
- return { checklists, verdict };
- ```
- **Running and managing**: once kicked off, the whole run executes in a background engine, managed by a small command set. Runs are journaled by content hash, and budgets cap spend in USD or tokens:
- ```bash
- RUN=$(ccf workflow run audit.js) # starts in the background, prints the run id
- ccf workflow wait "$RUN" --timeout 10m # blocks until done, event-driven
- ccf workflow stop "$RUN" --leaf build:1 # hold a single leaf (run keeps going)
- ccf workflow restart "$RUN" --leaf build:1 # resume it
- ccf workflow run audit.js --resume "$RUN" # replay the journal, finished leaves hit cache
- ```
- **Holding and restarting**: `ccf workflow stop --leaf` / `--phase` doesn't fail the run — it just pauses the named node: the run keeps going and other nodes carry on, until you `restart` it to run again. If every node currently running gets paused, the whole run settles into a *parked* state that needs you to step in before it continues.
- **Wait without polling**: `ccf workflow wait` blocks until the run ends, then exits — drop it in the background and come back when it exits, no repeated checking. The exit code states the outcome: `0` succeeded, `1` failed, `3` parked and waiting, `124` wait timed out (run still going), `130` interrupted.
- **Budget-adaptive**: `budget.spent()` / `budget.remaining()` are readable live inside the script (USD or tokens), so a workflow can decide for itself whether to dispatch another batch.
- **Mixing in your own subscription**: a node assigned `provider: "claude"` runs on your **own** Claude login — the `judge` above uses your subscription, not a provider key, which suits a synthesis-and-finish node.
- ---
- ### 👥 Agent Teams
- <table>
- <tr>
- <td width="50%" align="center"><img src="docs/assets/team-panes.webp" width="100%" /><br/><sub>four teammates working side by side in tmux panes</sub></td>
- <td width="50%" align="center"><img src="docs/assets/team-board.webp" width="100%" /><br/><sub>a teammate's overview / messages / output on the board</sub></td>
- </tr>
- </table>
- **Prerequisites**: Agent Team is the only lane that needs setup up front, and it **doesn't support Windows yet**. Before you use it:
- 1. **Claude Code ≥ 2.1.278, the terminal `claude`, inside tmux or iTerm2** (`tmux new-session -s work`) so teammate panes can show up alongside you. The Claude desktop app, `claude -p` and SDK sessions have no agent team — there, Claude uses subagents and workflows instead;
- 2. **Run the one-time setup**: the first time you start `ccf` with a provider enabled, it offers to do this for you — or run it yourself, then restart `claude`:
- ```bash
- cc-fleet teammate setup --yes --teammate-mode tmux
- ```
- It installs a small launcher (`~/.config/cc-fleet/bin/claude-teammate`), one `ccf-<provider>` agent type per provider (`~/.claude/agents/ccf-*.md`), and in `~/.claude/settings.json` turns on agent teams and points `CLAUDE_CODE_TEAMMATE_COMMAND` at the launcher; `--teammate-mode tmux` makes teammates open as split panes (an existing `auto` / `tmux` / `iterm2` is left alone). Without `--yes` it only lists what it would change. `cc-fleet teammate setup --remove --yes` undoes it.
- **How they collaborate**: each teammate is a native Claude Code teammate — Claude starts it with the `Agent` tool using a `ccf-<provider>` agent type (`ccf-glm.strong` for the strong slot), assigns work with native `SendMessage`, and the launcher runs that teammate's `claude` on the provider. Teammates stay alive across turns so you can keep adding tasks. One team can use several providers at once, then have one teammate gather and compare the results. Before each teammate, Claude runs `cc-fleet teammate check`, and a plugin hook blocks a provider teammate that would silently run on Claude instead.
- **Permission inheritance**: Claude Code hands each teammate your main session's permission posture (plan / acceptEdits / default), exactly as for its own teammates.
- **Park and restore**: `ccf hide <name>@<team>` tucks a teammate's pane out of the way while the process keeps running — messages and context are never lost — and `ccf show` brings it back. Claude Code closes its teammates when you exit `claude`; to end one early, Claude asks it to shut down or stops it. `ccf teardown` is for leftovers — say, after the lead crashed: it kills only provider teammates it can verify (pane, exact command line, process start time), and never touches your lead, native teammates, or Claude Code's team files. `ccf ps` lists them with a state (`running`, `orphaned`, `failed`, `bypassed`).
- **Outside tmux**: with `teammateMode` set to `tmux`, Claude Code runs the teammates on its own background tmux server (`claude-swarm-<pid>`), exactly the same flow with the pane just not on screen; `ccf ps --json` shows the `tmux_socket_path` to attach with `tmux -S <path> attach`.
- ---
- ### ⚡ Subagents
- <table>
- <tr>
- <td width="50%" align="center"><img src="docs/assets/subagent-fanout.webp" width="100%" /><br/><sub>fan out three subagents in parallel from one ask</sub></td>
- <td width="50%" align="center"><img src="docs/assets/subagent-board.webp" width="100%" /><br/><sub>the job list and one job's detail</sub></td>
- </tr>
- </table>
- **Three run modes**: the default **slim** sends the model a trimmed system prompt with a narrowed tool set, so the first request is much smaller than a full session — cheaper and faster on metered providers. `--profile slim-ro` is read-only, with tools cut to inspection only (Bash / Glob / Grep / Read / Skill) and no creating, editing, or deleting files, so a provider can read code and check logs without touching your workspace. Use `--profile full` when you need full-session capability.
- **Tool trimming and parallelism**: `--tools` takes a comma-separated list to set exactly which tools are open (a replacement, not an addition to the defaults), `--skills=false` turns off the Skill tool, and `--mcp` controls whether the host MCP config carries over. A subagent builds no team, takes no pane, and holds no locks, so running many against one provider doesn't interfere — ideal for large batches in parallel.
- **Background and wake-up**: add `--background` to send a long job to the background, then `ccf subagent-status <job> --wait` blocks until it's done and wakes the session that launched it — no repeated checking. Each job is capped by spend (USD), turns, and timeout, and a failure returns a fixed `error_code` your program can branch on.
- **Structured result**: with `--json` you get a result object with fixed fields, easy for scripts to parse — besides the answer text it includes the model id that actually responded, the call's spend, token usage, turns, and session_id.
- **Run key nodes on your own subscription**: as with Workflow, setting the provider to the reserved name `claude` (`ccf subagent claude --model opus …`) uses your own Claude login and bills your subscription — good for a synthesis-and-finish node, not large parallel batches.
- ---
- ### 🧩 Drive from Codex
- cc-fleet plugs into **OpenAI Codex** too: a Codex plugin lets a Codex session fan out the same provider workers — one-shot or batch **subagents** (`cc-fleet subagent`) and multi-phase JS **workflows** (`cc-fleet workflow`), each a real `claude` process on the provider's model. Install it with `codex plugin marketplace add ethanhq/cc-fleet` then `codex plugin add cc-fleet` (the `cc-fleet` and `claude` binaries install separately). The teammate lane stays Claude-Code-only; from Codex you get the subagent and workflow fan-out.
- ---
- ### 🔌 Provider management
- <table>
- <tr>
- <td width="50%" align="center"><img src="docs/assets/provider-presets.webp" width="100%" /><br/><sub>presets for many vendors</sub></td>
- <td width="50%" align="center"><img src="docs/assets/provider-config.webp" width="100%" /><br/><sub>set each tier's model, effort, and permission</sub></td>
- </tr>
- </table>
- **Broad compatibility**: works with any Anthropic- or OpenAI-compatible API endpoint — the former includes DeepSeek, Kimi, GLM, Qwen, and more; the latter Groq, Together, Fireworks, a local vLLM, and OpenAI itself. Common vendors ship as presets — select one and the endpoint and protocol are filled in, no manual entry; for anything not listed, pick *Custom* and enter the address.
- **Model tiers**: each provider can carry **default / strong / fast** model slots, each separately taggable with 1M context and a reasoning effort. So Claude just asks for "the strong model" — no hardcoded model IDs. `ccf default <provider>` sets the fleet-wide default provider, and any call that doesn't name one goes to it.
- **Multi-key rotation**: one provider can hold several API keys, rotated by `off` / `round_robin` / `random` to spread quota and avoid rate limits.
- **API key protection**: a key is fetched only at request time, emitted once, and never written into environment variables, command-line arguments, or shell history. A worker keeps the main session's credentials out two ways: its environment is cleared of Anthropic credentials and cloud-backend switches, and its provider profile blanks the same keys in case your Claude Code settings set them (organization-managed settings are the one layer a profile can't override), so the two never leak into each other. On disk it's saved `0600`, readable only by you, or handed to `pass`, 1Password, Vault, or your OS keyring; every UI and log shows the key masked (`sk-…238`).
- **Codex (ChatGPT subscription)**: one device-code login and your ChatGPT subscription becomes a regular provider — usable across Workflow / Team / Subagent / run.
- > [!WARNING]
- > **Codex is unofficial.** Reusing a ChatGPT subscription outside the codex CLI may violate OpenAI's terms, and `ccf codex login` asks you to confirm first. The OAuth token lives only inside the local conversion daemon; cc-fleet keeps its own login chain and never writes the codex CLI's auth (without its own login, the codex provider on the default credential rides it read-only).
- ---
- ### 🖥️ `ccf run`
- <table>
- <tr>
- <td width="50%" align="center"><img src="docs/assets/run-launch.webp" width="100%" /><br/><sub>one-line launch: ccf run / ccf run codex</sub></td>
- <td width="50%" align="center"><img src="docs/assets/run-session.webp" width="100%" /><br/><sub>inside, it's a full claude — here on gpt-5.5</sub></td>
- </tr>
- </table>
- **Launch**: `ccf run <provider>` opens an interactive `claude` on the named provider; with no provider (`ccf run`) it resolves to the fleet-wide default.
- ```bash
- ccf run deepseek # an interactive claude, on DeepSeek, billing the provider key
- ```
- **It's just native claude**: `ccf run` adds no extra process layer — it replaces itself with `claude`, cc-fleet steps out entirely, and from then on it's a plain `claude` process whose feel and exit behavior match typing `claude` yourself.
- **Credentials isolated automatically**: even if you run it from inside a logged-in Claude Code session, it first clears any leftover Anthropic auth from the environment and uses the chosen provider's auth instead — so billing lands on the provider's key, never your own subscription.
- **Flags**:
- - `--model strong / fast` — override the default with the provider's strong or fast model
- - `--permission-mode` — set the permission posture
- - `-- <claude args>` — everything after is passed through verbatim to the underlying `claude`
- > [!NOTE]
- > This lane is for hands-on interactive use: it needs a real terminal and doesn't support pipes or redirects — for non-interactive, one-shot output use a Subagent instead.
- ## Documentation
- - **[CLI reference & advanced usage](docs/cli.md)** — every command, flag, and envelope.
- - **[Writing workflows](docs/workflows.md)** — the JS scripting API for the workflow lane.
- - **[Architecture](docs/architecture.md)** — how the teammate launcher, key safety, the conversion daemon, and the workflow engine actually work.
- - `ccf <cmd> --help` — always authoritative.
- ## Contributing
- PRs are very welcome — bug fixes, new provider presets, docs, tests, features. Please read the **[contribution guide](.github/CONTRIBUTING.md)** first; a few house rules:
- - **UI changes and bug fixes need a screenshot or GIF** in the PR.
- - **AI-*assisted*** commits credit the tool with a `Co-Authored-By` trailer.
- - **Fully AI-*authored*** PRs add an autonomous-PR marker at the bottom of the PR body.
- ## License
- [Apache-2.0](LICENSE).
install.ps1 · Bundled script · 191 lines · 3 findings marked
- # install.ps1 — one-line installer for cc-fleet on Windows.
- #
- # Downloads a prebuilt binary from GitHub Releases (no Go toolchain, no clone),
- # installs cc-fleet.exe plus the ccf.exe alias, and — if Claude Code is present —
- # installs the cc-fleet skill via the plugin.
- #
- # irm https://raw.githubusercontent.com/ethanhq/cc-fleet/main/install.ps1 | iex
- Note: Runs a downloaded PowerShell script (iex / Invoke-Expression)
- Line 7 on GitHub
- #
- # Args don't survive `irm | iex`; use env vars to override the defaults:
- Note: Runs a downloaded PowerShell script (iex / Invoke-Expression)
- Line 9 on GitHub
- # $env:CCF_VERSION = 'vX.Y.Z' # install a specific release (default: latest)
- # $env:CCF_PREFIX = 'C:\dir' # install dir (default: %LOCALAPPDATA%\cc-fleet\bin)
- # $env:CCF_BASE_URL = '...' # asset base (mirror or local file:/// test)
- #
- # Windows PowerShell 5.1 compatible. The body runs in a child scope so that under
- # `irm | iex` the strict mode / error preference don't leak into the caller's
- Note: Runs a downloaded PowerShell script (iex / Invoke-Expression)
- Line 15 on GitHub
- # session, and a failure can't close the caller's console.
- & {
- Set-StrictMode -Version Latest
- $ErrorActionPreference = 'Stop'
- [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
- $REPO = 'ethanhq/cc-fleet' # GitHub owner/repo (Release source + plugin marketplace)
- $MARKETPLACE = 'ethanhq' # claude plugin marketplace name
- $PLUGIN = 'cc-fleet' # claude plugin name
- $SCOPE = 'user' # plugin install scope
- function Die($msg) { throw "install.ps1: $msg" }
- # --- platform detection -------------------------------------------------------
- switch ($env:PROCESSOR_ARCHITECTURE) {
- 'AMD64' { $arch = 'amd64' }
- 'ARM64' { $arch = 'arm64' }
- default { Die "unsupported architecture '$($env:PROCESSOR_ARCHITECTURE)' (cc-fleet supports amd64 and arm64)" }
- }
- # --- prefix -------------------------------------------------------------------
- if ($env:CCF_PREFIX) {
- $PREFIX = $env:CCF_PREFIX
- } else {
- $PREFIX = Join-Path $env:LOCALAPPDATA 'cc-fleet\bin'
- }
- # --- resolve version ----------------------------------------------------------
- $VERSION = $env:CCF_VERSION
- if ($VERSION -and ($VERSION -notlike 'v*')) { $VERSION = "v$VERSION" }
- if (-not $VERSION -and -not $env:CCF_BASE_URL) {
- # Read the tag from the /releases/latest redirect — no JSON parsing needed.
- # -MaximumRedirection 0 stops at the 3xx and returns the response carrying the
- # Location header; 5.1 also emits a non-terminating error we suppress with
- # -ErrorAction so the script's 'Stop' preference can't abort the call. Should
- # only an exception carry the response, read .Response defensively: its shape
- # varies across editions and an unguarded read throws under StrictMode (#54).
- $loc = $null
- try {
- $resp = Invoke-WebRequest -Uri "https://github.com/$REPO/releases/latest" -MaximumRedirection 0 -UseBasicParsing -ErrorAction SilentlyContinue
- if ($resp) { $loc = $resp.Headers['Location'] }
- } catch {
- $r = $null
- if ($_.Exception.PSObject.Properties['Response']) { $r = $_.Exception.Response }
- if ($r -is [System.Net.HttpWebResponse]) {
- $loc = $r.Headers['Location']
- } elseif ($r) {
- $loc = "$($r.Headers.Location)"
- }
- }
- if ($loc) { $VERSION = ($loc -split '/tag/')[-1] }
- if (-not $VERSION) { Die "could not resolve the latest version; set `$env:CCF_VERSION = 'vX.Y.Z'" }
- }
- # Asset base: the dir holding the zip + checksums.txt. CCF_BASE_URL overrides it
- # for a mirror or a local test (e.g. file:///path/to/dist).
- if ($env:CCF_BASE_URL) {
- $ASSET_BASE = $env:CCF_BASE_URL
- } else {
- $ASSET_BASE = "https://github.com/$REPO/releases/download/$VERSION"
- }
- $ZIP = "cc-fleet-windows-$arch.zip"
- # --- download + verify --------------------------------------------------------
- $tmp = Join-Path ([IO.Path]::GetTempPath()) ("cc-fleet-" + [Guid]::NewGuid().ToString('N'))
- New-Item -ItemType Directory -Path $tmp -Force | Out-Null
- try {
- $zipPath = Join-Path $tmp $ZIP
- $sumPath = Join-Path $tmp 'checksums.txt'
- $verLabel = if ($VERSION) { $VERSION } else { 'local' }
- Write-Host "==> Downloading $ZIP ($verLabel)"
- Invoke-WebRequest -Uri "$ASSET_BASE/$ZIP" -OutFile $zipPath -UseBasicParsing
- Invoke-WebRequest -Uri "$ASSET_BASE/checksums.txt" -OutFile $sumPath -UseBasicParsing
- $expected = $null
- foreach ($line in Get-Content $sumPath) {
- $parts = $line -split '\s+', 2
- if ($parts.Count -eq 2 -and $parts[1].Trim() -eq $ZIP) { $expected = $parts[0].Trim(); break }
- }
- if (-not $expected) { Die "no checksum for $ZIP in checksums.txt" }
- $actual = (Get-FileHash -Algorithm SHA256 -Path $zipPath).Hash
- if ($expected -ne $actual) {
- Write-Host " expected $expected"
- Write-Host " actual $actual"
- Die "checksum mismatch for $ZIP"
- }
- Write-Host "==> Checksum OK"
- # --- extract + install binary ---------------------------------------------
- Expand-Archive -Path $zipPath -DestinationPath $tmp -Force
- $extract = Join-Path $tmp "cc-fleet-windows-$arch" # archive wraps in this dir
- New-Item -ItemType Directory -Path $PREFIX -Force | Out-Null
- # No symlinks on Windows — copy the exe to both names.
- Copy-Item -Path (Join-Path $extract 'cc-fleet.exe') -Destination (Join-Path $PREFIX 'cc-fleet.exe') -Force
- Copy-Item -Path (Join-Path $extract 'cc-fleet.exe') -Destination (Join-Path $PREFIX 'ccf.exe') -Force
- Write-Host "==> Installed $PREFIX\cc-fleet.exe (+ ccf alias)"
- # Install manifest (co-located with the binary): `uninstall --all` reads it
- # to choose the removal commands; self-update is unsupported on Windows.
- $manifest = "{`"method`":`"tarball`",`"plugin_scope`":`"$SCOPE`",`"skill`":`"plugin`"}"
- Set-Content -Path (Join-Path $PREFIX '.cc-fleet-install.json') -Value $manifest -Encoding ascii
- } finally {
- Remove-Item -Recurse -Force $tmp -ErrorAction SilentlyContinue
- }
- # --- skill --------------------------------------------------------------------
- if (Get-Command claude -ErrorAction SilentlyContinue) {
- # Redirected native stderr becomes error records in 5.1, which 'Stop' would
- # turn terminating — an already-added marketplace must stay a no-op.
- $prevEap = $ErrorActionPreference
- $ErrorActionPreference = 'Continue'
- claude plugin marketplace add $REPO --scope $SCOPE 2>$null | Out-Null
- $ErrorActionPreference = $prevEap
- claude plugin install "$PLUGIN@$MARKETPLACE" --scope $SCOPE
- if ($LASTEXITCODE -eq 0) {
- Write-Host "==> Installed the cc-fleet skill via plugin (scope: $SCOPE)"
- Write-Host " uninstall: claude plugin uninstall $PLUGIN@$MARKETPLACE"
- } else {
- Write-Host "==> Could not install the plugin automatically. To add the skill, run:"
- Write-Host " claude plugin marketplace add $REPO --scope $SCOPE"
- Write-Host " claude plugin install $PLUGIN@$MARKETPLACE --scope $SCOPE"
- }
- } else {
- Write-Host "==> 'claude' not on PATH - skipped plugin install. To add the skill later:"
- Write-Host " claude plugin marketplace add $REPO --scope $SCOPE"
- Write-Host " claude plugin install $PLUGIN@$MARKETPLACE --scope $SCOPE"
- }
- # --- Claude Code precondition note --------------------------------------------
- if (-not (Get-Command claude -ErrorAction SilentlyContinue)) {
- Write-Host ""
- Write-Host "==> Note: Claude Code ('claude') was not found on PATH."
- Write-Host " cc-fleet drives Claude Code - install it to run subagents / workflows:"
- Write-Host " https://docs.anthropic.com/claude-code"
- }
- # --- PATH check + next steps --------------------------------------------------
- $userPath = [Environment]::GetEnvironmentVariable('Path', 'User')
- $onPath = $false
- if ($userPath) {
- foreach ($p in ($userPath -split ';')) {
- if ($p.Trim().TrimEnd('\') -ieq $PREFIX.TrimEnd('\')) { $onPath = $true; break }
- }
- }
- if ($onPath) {
- Write-Host "==> $PREFIX is already on your user PATH."
- } else {
- if ($userPath) { $newPath = "$userPath;$PREFIX" } else { $newPath = $PREFIX }
- [Environment]::SetEnvironmentVariable('Path', $newPath, 'User')
- Write-Host ""
- Write-Host "==> Added $PREFIX to your user PATH. Open a new terminal for it to take effect."
- }
- Write-Host ""
- Write-Host "==> Next steps"
- Write-Host ""
- Write-Host " cc-fleet # launch the interactive TUI - register a provider and get started"
- Write-Host " # (config is auto-created on first save; no init needed)"
- Write-Host " cc-fleet doctor # optional: run the health checks"
- Write-Host ""
- Write-Host " The live teammate lane needs tmux (unix only); subagent / workflow / run work here."
- }
install.sh · Bundled script · 271 lines · 3 findings marked
- #!/usr/bin/env sh
- # install.sh — one-line installer for cc-fleet.
- #
- # Downloads a prebuilt binary from GitHub Releases (no Go toolchain, no clone),
- # installs `cc-fleet` plus the `ccf` alias, and — by default — installs the
- # cc-fleet skill via the Claude Code plugin.
- #
- # curl -fsSL https://raw.githubusercontent.com/ethanhq/cc-fleet/main/install.sh | sh
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 8 on GitHub
- #
- # Pass flags after `| sh -s --`, e.g.:
- # curl -fsSL .../install.sh | sh -s -- --prefix /usr/local/bin --skill none
- #
- # For a from-source build instead, clone the repo and run `make install`.
- set -eu
- REPO="ethanhq/cc-fleet" # GitHub owner/repo (Release source + plugin marketplace)
- MARKETPLACE="ethanhq" # claude plugin marketplace name (.claude-plugin/marketplace.json)
- PLUGIN="cc-fleet" # claude plugin name
- SKILL_NAME="cc-fleet" # skill dir under ~/.claude/skills/ (for --skill global)
- PREFIX="${HOME}/.local/bin"
- SKILL_MODE="plugin" # plugin | global | none
- SCOPE="user" # user | project | local (only for --skill plugin)
- VERSION="" # empty => latest release
- usage() {
- cat <<EOF
- install.sh — install prebuilt cc-fleet from GitHub Releases.
- Usage:
- curl -fsSL https://raw.githubusercontent.com/${REPO}/main/install.sh | sh
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 32 on GitHub
- curl -fsSL .../install.sh | sh -s -- [options]
- Options:
- --skill plugin|global|none How to install the skill. Default: plugin.
- plugin = via Claude Code plugin (also adds the
- SessionStart hook).
- global = copy the per-lane skills into ~/.claude/skills/.
- none = binary only.
- --scope user|project|local Plugin install scope (--skill plugin). Default: user.
- --prefix DIR Install the binary into DIR. Default: ${HOME}/.local/bin.
- --version vX.Y.Z Install a specific release. Default: latest.
- -h, --help Show this help and exit.
- EOF
- }
- while [ $# -gt 0 ]; do
- case "$1" in
- --skill) SKILL_MODE="${2:?--skill needs a value}"; shift 2 ;;
- --skill=*) SKILL_MODE="${1#--skill=}"; shift ;;
- --scope) SCOPE="${2:?--scope needs a value}"; shift 2 ;;
- --scope=*) SCOPE="${1#--scope=}"; shift ;;
- --prefix) PREFIX="${2:?--prefix needs a value}"; shift 2 ;;
- --prefix=*) PREFIX="${1#--prefix=}"; shift ;;
- --version) VERSION="${2:?--version needs a value}"; shift 2 ;;
- --version=*) VERSION="${1#--version=}"; shift ;;
- -h|--help) usage; exit 0 ;;
- *) echo "install.sh: unknown argument: $1" >&2; echo "Run with --help for usage." >&2; exit 2 ;;
- esac
- done
- case "$SKILL_MODE" in plugin|global|none) ;; *) echo "install.sh: --skill must be plugin|global|none" >&2; exit 2 ;; esac
- case "$SCOPE" in user|project|local) ;; *) echo "install.sh: --scope must be user|project|local" >&2; exit 2 ;; esac
- # --- platform detection -------------------------------------------------------
- os="$(uname -s)"
- case "$os" in
- Linux) os="linux" ;;
- Darwin) os="darwin" ;;
- *) echo "install.sh: unsupported OS '$os' (this installer supports linux and darwin)." >&2
- echo " On Windows run in PowerShell: irm https://raw.githubusercontent.com/${REPO}/main/install.ps1 | iex" >&2
- Note: Runs a downloaded PowerShell script (iex / Invoke-Expression)
- Line 73 on GitHub
- echo " or install via npm: npm install -g @ethanhq/cc-fleet" >&2
- exit 1 ;;
- esac
- arch="$(uname -m)"
- case "$arch" in
- x86_64|amd64) arch="amd64" ;;
- arm64|aarch64) arch="arm64" ;;
- *) echo "install.sh: unsupported architecture '$arch' (cc-fleet supports amd64 and arm64)" >&2; exit 1 ;;
- esac
- # --- helpers ------------------------------------------------------------------
- have() { command -v "$1" >/dev/null 2>&1; }
- download() { # url dest
- if have curl; then
- curl -fsSL "$1" -o "$2"
- elif have wget; then
- wget -qO "$2" "$1"
- else
- echo "install.sh: need curl or wget to download" >&2; exit 1
- fi
- }
- sha256_of() { # file -> stdout hash
- if have sha256sum; then
- sha256sum "$1" | awk '{print $1}'
- elif have shasum; then
- shasum -a 256 "$1" | awk '{print $1}'
- else
- echo "" # no tool available
- fi
- }
- # --- resolve version ----------------------------------------------------------
- if [ -n "$VERSION" ]; then
- case "$VERSION" in v*) ;; *) VERSION="v${VERSION}" ;; esac
- fi
- if [ -z "$VERSION" ] && [ -z "${CCF_BASE_URL:-}" ]; then
- # Read the tag from the /releases/latest redirect — no JSON parsing needed.
- if have curl; then
- VERSION="$(curl -fsSLI -o /dev/null -w '%{url_effective}' "https://github.com/${REPO}/releases/latest" | sed 's#.*/tag/##')"
- fi
- [ -n "$VERSION" ] || { echo "install.sh: could not resolve the latest version; pass --version vX.Y.Z" >&2; exit 1; }
- fi
- # Asset base: the dir holding the tarball + checksums.txt. CCF_BASE_URL overrides
- # it for a mirror or a local test (e.g. file:///path/to/dist).
- ASSET_BASE="${CCF_BASE_URL:-https://github.com/${REPO}/releases/download/${VERSION}}"
- TARBALL="cc-fleet-${os}-${arch}.tar.gz"
- # --- download + verify --------------------------------------------------------
- tmp="$(mktemp -d)"
- trap 'rm -rf "$tmp"' EXIT
- echo "==> Downloading ${TARBALL} (${VERSION:-local})"
- download "${ASSET_BASE}/${TARBALL}" "${tmp}/${TARBALL}"
- download "${ASSET_BASE}/checksums.txt" "${tmp}/checksums.txt"
- expected="$(awk -v f="${TARBALL}" '$2 == f {print $1}' "${tmp}/checksums.txt")"
- actual="$(sha256_of "${tmp}/${TARBALL}")"
- if [ -z "$expected" ]; then
- echo "install.sh: no checksum for ${TARBALL} in checksums.txt" >&2; exit 1
- elif [ -z "$actual" ]; then
- echo "install.sh: no sha256 tool (sha256sum/shasum) found — cannot verify download" >&2; exit 1
- elif [ "$expected" != "$actual" ]; then
- echo "install.sh: checksum mismatch for ${TARBALL}" >&2
- echo " expected ${expected}" >&2
- echo " actual ${actual}" >&2
- exit 1
- fi
- echo "==> Checksum OK"
- # --- extract + install binary -------------------------------------------------
- tar -xzf "${tmp}/${TARBALL}" -C "${tmp}"
- extract="${tmp}/cc-fleet-${os}-${arch}" # archives wrap in this dir
- mkdir -p "${PREFIX}"
- # Copy to a temp file in the same dir, then rename over the target: the rename
- # gives a new inode, so a running cc-fleet keeps its old file and macOS never
- # pairs the new bytes with a stale code signature (overwriting in place makes
- # every later launch die with SIGKILL).
- tmpbin="${PREFIX}/.cc-fleet.tmp.$$"
- cp "${extract}/cc-fleet" "$tmpbin" && chmod 0755 "$tmpbin" && mv -f "$tmpbin" "${PREFIX}/cc-fleet" \
- || { rm -f "$tmpbin"; echo "install.sh: could not install ${PREFIX}/cc-fleet" >&2; exit 1; }
- # Relative symlink (os.Executable() resolves it, so a teammate's apiKeyHelper
- # still points at the real cc-fleet path).
- ln -sf cc-fleet "${PREFIX}/ccf"
- echo "==> Installed ${PREFIX}/cc-fleet (+ ccf alias)"
- # Install manifest (co-located with the binary) so `cc-fleet update` self-updates
- # in place without guessing the method, preserves the plugin scope, and leaves
- # the plugin alone for a --skill none/global install.
- cat > "${PREFIX}/.cc-fleet-install.json" <<EOF
- {"method":"tarball","plugin_scope":"${SCOPE}","skill":"${SKILL_MODE}"}
- EOF
- # --- skill --------------------------------------------------------------------
- case "$SKILL_MODE" in
- plugin)
- if have claude; then
- claude plugin marketplace add "${REPO}" --scope "${SCOPE}" >/dev/null 2>&1 || true
- if claude plugin install "${PLUGIN}@${MARKETPLACE}" --scope "${SCOPE}"; then
- echo "==> Installed the cc-fleet skill via plugin (scope: ${SCOPE})"
- echo " uninstall: claude plugin uninstall ${PLUGIN}@${MARKETPLACE}"
- else
- echo "==> Could not install the plugin automatically. To add the skill, run:" >&2
- echo " claude plugin marketplace add ${REPO} --scope ${SCOPE}" >&2
- echo " claude plugin install ${PLUGIN}@${MARKETPLACE} --scope ${SCOPE}" >&2
- fi
- else
- echo "==> 'claude' not on PATH — skipped plugin install. To add the skill later:"
- echo " claude plugin marketplace add ${REPO} --scope ${SCOPE}"
- echo " claude plugin install ${PLUGIN}@${MARKETPLACE} --scope ${SCOPE}"
- fi
- ;;
- global)
- root="${HOME}/.claude/skills"
- rm -rf "${root}/cc-fleet" # drop the legacy single skill so it can't compete
- for lane in subagent team workflow; do
- mkdir -p "${root}/cc-fleet-${lane}"
- cp "${extract}/skills/${lane}/SKILL.md" "${root}/cc-fleet-${lane}/SKILL.md"
- done
- rm -rf "${root}/cc-fleet-shared"
- mkdir -p "${root}/cc-fleet-shared"
- cp "${extract}/skills/cc-fleet-shared/"*.md "${root}/cc-fleet-shared/"
- # Migrate the legacy un-namespaced shared dir, but only when every file is a
- # known cc-fleet doc BY NAME AND CONTENT — never delete another tool's dir,
- # even one that happens to use the same generic filenames. (POSIX sh — this
- # script runs under `sh`.)
- if [ -d "${root}/shared" ]; then
- owned=yes
- for f in "${root}/shared"/* "${root}/shared"/.[!.]* "${root}/shared"/..?*; do
- [ -e "$f" ] || continue
- case "$(basename "$f")" in
- cli-reference.md|providers.md|routing.md|troubleshooting.md)
- grep -q cc-fleet "$f" 2>/dev/null || owned=no ;;
- *) owned=no ;;
- esac
- done
- if [ "$owned" = yes ]; then
- rm -rf "${root}/shared"
- echo "==> Migrated: removed the legacy ${root}/shared (cc-fleet docs only)"
- else
- echo "==> Note: ${root}/shared contains non-cc-fleet files — left in place"
- fi
- fi
- echo "==> Installed the per-lane cc-fleet skills (global) to ${root}/"
- ;;
- none)
- echo "==> Skipped skill install (--skill none)"
- ;;
- esac
- # --- Claude Code precondition note --------------------------------------------
- if ! have claude; then
- cat <<EOF
- ==> Note: Claude Code ('claude') was not found on PATH.
- cc-fleet drives Claude Code — install it to run teammates / subagents / workflows:
- https://docs.anthropic.com/claude-code
- EOF
- fi
- # --- PATH check + next steps --------------------------------------------------
- case ":${PATH}:" in
- *":${PREFIX}:"*) echo "==> ${PREFIX} is already on PATH." ;;
- *)
- cat <<EOF
- ${PREFIX} is not on your PATH. Add this to your shell rc
- (~/.zshrc, ~/.bashrc, ~/.profile):
- export PATH="${PREFIX}:\$PATH"
- EOF
- ;;
- esac
- cat <<EOF
- ==> Next steps
- cc-fleet # launch the interactive TUI — register a provider and get started
- # (config is auto-created on first save; no init needed)
- cc-fleet doctor # optional: run the health checks
- cc-fleet update # later: update cc-fleet + the plugin to the latest release
- tmux is needed only for live teammates; subagent / workflow / run work without it.
- Provider teammates: run 'cc-fleet teammate setup --yes --teammate-mode tmux' once (terminal claude inside tmux or iTerm2, Claude Code ≥ 2.1.278).
- EOF
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.