$npx -y skills add gate/gate-skills --skill gate-cli-installerOne-click installer for gate-cli and gate-skills on Cursor, Claude Code, Codex, or OpenClaw/mcporter. Triggers on 'install gate-cli', 'Gate skills', 'Gate Verify', 'tx check-in', 'setup Gate Cursor', 'Gate Claude Code', 'Gate Codex', 'OpenClaw Gate', 'mcporter Gate'.
| 1 | # gate-cli-installer (Cursor / Claude Code / Codex / OpenClaw) |
| 2 | |
| 3 | ## General rules |
| 4 | |
| 5 | ⚠️ STOP — You MUST read and strictly follow the shared runtime rules before proceeding. These rules have the highest priority. |
| 6 | → Read [gate-runtime-rules.md](https://github.com/gate/gate-skills/blob/master/skills/gate-runtime-rules.md) |
| 7 | |
| 8 | - **Do not** document or require legacy Gate MCP server setup in this flow. The supported path is **`gate-cli` + [gate-skills](https://github.com/gate/gate-skills)**. |
| 9 | - If the user previously used Gate MCP, optional cleanup is **`gate-cli migrate`** (see *Legacy MCP* below) — do not let migration block a fresh `gate-cli` + skills install. |
| 10 | |
| 11 | --- |
| 12 | |
| 13 | ## Which `gate-cli` runs (agents / shells) |
| 14 | |
| 15 | Canonical rules (same text as [gate-runtime-rules.md](https://github.com/gate/gate-skills/blob/master/skills/gate-runtime-rules.md) §4): |
| 16 | |
| 17 | 1. **Prefer the system binary:** If **`command -v gate-cli`** resolves to an executable **and** **`gate-cli --version`** succeeds, use that as **`gate-cli`** everywhere. |
| 18 | 2. **User local bin:** If step 1 fails, **if** **`${HOME}/.local/bin/gate-cli`** exists **and** is executable, **`gate-cli`** refers to **`"${HOME}/.local/bin/gate-cli"`** for this session (invoke with full path when PATH may be incomplete). |
| 19 | 3. **OpenClaw skills bin:** If steps 1–2 fail, **if** **`${HOME}/.openclaw/skills/bin/gate-cli`** exists **and** is executable, **`gate-cli`** refers to **`"${HOME}/.openclaw/skills/bin/gate-cli"`**. |
| 20 | |
| 21 | Assume nothing about a single install location — always resolve in this order before reporting “`gate-cli` not found.” The same rules are in shared **[gate-runtime-rules.md](https://github.com/gate/gate-skills/blob/master/skills/gate-runtime-rules.md)** §4. |
| 22 | |
| 23 | --- |
| 24 | |
| 25 | ## What to install (two parts) |
| 26 | |
| 27 | 1. **`gate-cli`** — Gate CLI for CEX, info, news, config, and diagnostics. Install using this skill’s **`setup.sh`** (see below). |
| 28 | 2. **gate-skills** — Agent skills from [https://github.com/gate/gate-skills](https://github.com/gate/gate-skills). Use your client’s normal skills workflow (`npx skills add …` or copy into the per-client skills directory). |
| 29 | |
| 30 | --- |
| 31 | |
| 32 | ## 1. Install `gate-cli` (`setup.sh`) |
| 33 | |
| 34 | Script path: **`skills/gate-cli-installer/setup.sh`** |
| 35 | |
| 36 | The script downloads the latest **`gate/gate-cli`** release for your OS/arch, verifies checksums, and installs the **`gate-cli`** binary. |
| 37 | |
| 38 | ```bash |
| 39 | # From the gate-skills (or gate-github-skills) repo root |
| 40 | bash skills/gate-cli-installer/setup.sh |
| 41 | ``` |
| 42 | |
| 43 | ```bash |
| 44 | # Optional: pin a release tag |
| 45 | bash skills/gate-cli-installer/setup.sh --version v0.6.0 |
| 46 | ``` |
| 47 | |
| 48 | **Make `gate-cli` available on your PATH (system / shell):** |
| 49 | |
| 50 | - **`setup.sh`** installs to **`${HOME}/.local/bin/gate-cli`** first. If **`~/.local/bin`** is **not** already on your **`PATH`**, the script prints a reminder to add: |
| 51 | `export PATH="$HOME/.local/bin:$PATH"` |
| 52 | Put that in `~/.zshrc`, `~/.bashrc`, or your shell profile, then restart the terminal or **`source`** the file. |
| 53 | - If **`~/.local/bin`** cannot be written, the script falls back to **`/usr/local/bin`** (typically already on **`PATH`** on macOS/Linux). |
| 54 | - Older installs may leave **`${HOME}/.openclaw/skills/bin/gate-cli`**; agents must still resolve **`gate-cli`** using **Which \`gate-cli\` runs** above — do not assume only one directory. |
| 55 | |
| 56 | **Verify** |
| 57 | |
| 58 | ```bash |
| 59 | command -v gate-cli |
| 60 | gate-cli --version |
| 61 | ``` |
| 62 | |
| 63 | --- |
| 64 | |
| 65 | ## 2. Install **gate-skills** (per client) |
| 66 | |
| 67 | | Client | Typical skills location | Common approach | |
| 68 | |--------|-------------------------|-----------------| |
| 69 | | **Cursor** | `~/.cursor/skills/` | e.g. `npx skills add https://github.com/gate/gate-skills` or copy skill folders from the repo into that directory | |
| 70 | | **Claude Code** | `~/.claude/skills/` | same pattern | |
| 71 | | **Codex** | `~/.codex/skills/` | same pattern | |
| 72 | | **OpenClaw** | e.g. `~/.openclaw/skills/` (default) | e.g. `npx clawhub@latest add https://github.com/gate/gate-skills` or manual copy | |
| 73 | |
| 74 | Point users at the [gate-skills](https://github.com/gate/gate-skills) repository and, if they need step-by-step UI flows, the **Skills Installation** section in that repo’s README. Restart the client after copying or installing skills so it reloads the skill list. |
| 75 | |
| 76 | **Gate Verify / tx check-in** phrasing in triggers: those features are provided through the **product skills** and **`gate-cli`**-backed flows described in the relevant DEX / wallet skills — not via a separate MCP-install step in this installer. |
| 77 | |
| 78 | --- |
| 79 | |
| 80 | ## 3. API keys and errors → `gate-cli config init` |
| 81 | |
| 82 | - When **`gate-cli`** returns auth or configuration errors (missing key, invalid secret, 401, etc.), guide the user to run **`gate-cli config init`** interactively. T |