claw-installer
AGENTS.md0 starsChanged 6 months agoApache-2.0View on GitHub
Project facts shared across all coding agents (Claude Code, Cursor, Codex, Gemini, Aider, …). Claude Code also reads CLAUDE.md for tool-specific preferences and the subagent registry. Claw Installer — a cross-platform desktop installer (by Cylingo Group) that sets up the OpenClaw agent gateway and the Hermes browser-automation agent on a user's machine. A Tauri desktop GUI drives a pure-Bash installer pipeline; the same Bash logic also runs standalone on macOS/Linux and, via WSL, on Windows. - Desktop app (gui/): Tauri…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-bulk-archive-changeSkill
- openspec-continue-changeSkill
- openspec-exploreSkill
- openspec-ff-changeSkill
- openspec-new-changeSkill
- openspec-onboardSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- openspec-verify-changeSkill
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 106
Do not commit directly to main.
- Distinctive: line 107
Commits: do not commit/push unless asked.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Project facts shared across all coding agents (Claude Code, Cursor, Codex, Gemini, Aider, …). Claude Code also reads CLAUDE.md for tool-specific preferences and the subagent registry.
What this is
Claw Installer — a cross-platform desktop installer (by Cylingo Group) that sets up the OpenClaw agent gateway and the Hermes browser-automation agent on a user's machine. A Tauri desktop GUI drives a pure-Bash installer pipeline; the same Bash logic also runs standalone on macOS/Linux and, via WSL, on Windows.
Tech stack
- Desktop app (
gui/): Tauri 2 — Rust backend (gui/src-tauri) + web frontend. - Frontend (
gui/src): React 19 + TypeScript, Vite 6, Tailwind CSS 4, Zustand 5 (state), react-i18next (en + zh), Radix UI primitives. - Installer logic (
shell/): pure Bash (3.2-compatible) + a PowerShell bootstrap for Windows/WSL. - Package manager: pnpm workspace (
pnpm-workspace.yaml). Spec workflow: OpenSpec (openspec/).
Repository layout
gui/ Tauri desktop app
src/ React/TS frontend
components/installer/ main UI (SettingsPanel, Sidebar, AgentCard, …)
store/installer-store.ts Zustand store — the GUI's source of truth
api/installer.ts typed wrappers over Tauri commands
lib/ model-config-apply, provider-models, utils
i18n/resources/ en.ts / zh.ts UI strings
__tests__/ vitest suites
src-tauri/ Rust backend
src/commands.rs #[tauri::command] handlers (incl. op-dispatch)
src/steps.rs @@step sentinel parsing + step labels
src/lib.rs handler registration
Cargo.toml ← single source of truth for the app version
tauri.conf.json Tauri config (omits version → inherits Cargo.toml)
shell/ installer pipeline (Bash)
install.sh / uninstall.sh
claw-op.sh macOS/Linux op-dispatch entrypoint
steps/<name>.sh install steps (base-deps, fnm, node, pnpm, agentlink, …)
agents/<agent>/ per-agent ops (openclaw/, hermes/): install.sh, pair-agentlink.sh, …
lib/ common.sh (run_steps, helpers), manifest.sh
windows/bootstrap.ps1 Windows/WSL bootstrap + Invoke-OpDispatch
docker/ vendor/
openspec/ specs/ + changes/ (OpenSpec)
tools/ build tooling (build-linux Docker image)
docs/ research/ ued/ and design notes
Makefile the command front door (see below)Commands (the Makefile is the front door)
| Command | What it does |
make install | Install workspace deps via pnpm |
make dev | Start the GUI in Tauri dev mode (recommended for app work) |
make frontend | Vite dev server only — browser stub mode, no Rust/Tauri |
make build | Production bundle for the current platform |
make build-mac | Universal macOS bundle (arm64 + x86_64) → dist/macos/ |
make build-linux | .deb + .AppImage inside Docker → dist/linux/ |
make build-windows | Cross-compile .exe, zip with shell/ → dist/windows/claw-installer-<version>-windows.zip |
make build-all | mac + linux + windows in sequence |
make test | Frontend (vitest) and Rust (cargo test) suites |
make typecheck | tsc --noEmit on the GUI |
make clean | Remove build artifacts and node_modules |
GUI-local equivalents: pnpm --filter gui {dev,build,test,typecheck}. The GUI build script runs
tsc --noEmit -p tsconfig.app.json && vite build (typecheck is part of the build gate).
Versioning (single source of truth)
The app version lives only in gui/src-tauri/Cargo.toml ([package].version). To release a new
version, bump that one line. Everything else derives from it:
tauri.conf.jsonintentionally has noversionkey → Tauri falls back toCargo.toml(drives mac/linux bundle filenames, e.g.Claw Installer_1.1.0_universal.dmg).- The GUI sidebar reads it at runtime via
@tauri-apps/api/appgetVersion()(showsdevin stub mode). - The Windows zip name embeds it via the Makefile's
APP_VERSION(parsed fromCargo.toml). package.json/gui/package.jsonversions are inert (npm manifests, not used for bundling) — do not treat them as the source.
Architecture notes
- GUI ↔ Rust: the frontend calls
#[tauri::command]handlers ingui/src-tauri/src/commands.rsviagui/src/api/installer.ts. UI state is a single Zustand store (installer-store.ts). - Rust → shell (op-dispatch protocol):
dispatch_opshells out toshell/claw-op.sh(macOS/Linux) orbootstrap.ps1 Invoke-OpDispatch(Windows). The op name is also the script filename: oppair-agentlink→shell/agents/<agent>/pair-agentlink.sh. The dispatch tables inclaw-op.sh(_op_valid_agents) andbootstrap.ps1($OpAgentTable) must mirror each other, and the op string incommands.rsmust match both. - Install steps:
ENV_STEPS=(…)inagents/<agent>/install.sh→run_steps(lib/common.sh) loadssteps/<name>.shand callsstep_<name>. Steps emit@@step:<key>:<label>sentinels that Rust parses insteps.rsto drive the progress UI. - i18n: strings in
gui/src/i18n/resources/{en,zh}.ts; the chosen language is persisted to config. - Persisted config:
~/.claw-installer/config.json(%APPDATA%\claw-installer\config.jsonon Windows) holds per-agent model credentials, channel, pairing timestamp, and UI language. Hydration ininstaller-store.tstolerates older snapshots; there is no migration for renamed keys/values (treat config shape changes as greenfield unless told otherwise).
Conventions
- Language: durable artifacts (code, comments, commit messages, specs, these docs) are written in English. Human-facing chat/answers may be Chinese (see CLAUDE.md).
- Branching:
devis the primary working branch;mainis protected and updated via merge request. Do not commit directly tomain. Feature work follows thevcs-workflowconvention (branch → dev → MR). - Commits: do not commit/push unless asked. Branch first if on a protected branch.
- Bash 3.2 compatible: macOS ships bash 3.2 — no
declare -A, no[[ -v ]]inshell/. - Windows
bootstrap.ps1must keep its UTF-8 BOM (PowerShell 5.1 needs it to decode the Chinese strings);make build-windowshard-fails if the BOM is missing.
Known traps
- Op/step renames are not compiler-checked. An op or step name is a string spanning Rust
(
commands.rs), Bash (claw-op.sh), PowerShell (bootstrap.ps1), and a filename. A missed spot only fails at runtime ("unknown op"). Change all sites together and smoke-test pairing. gui/vite.config.jsandgui/vite.config.tsare both tracked — Vite loads.jsfirst, so it wins. Editing only.tsmay have no effect. (Latent; clean up when convenient.)- A
tsc-clean +cargo check-clean change can still break the live op flow — only a real install/pairing run exercises the Rust↔shell↔ps1 string contract.
Domain glossary
- OpenClaw — open-source local agent runtime/gateway (
~/.openclaw/). - Hermes — Playwright-driven browser-automation agent; also Cylingo's hosted-model bridge.
- AgentLink — Cylingo's IM-side gateway; users pair it with a 4-digit code (
agentlink pair, npm@xyagent/cli). The pairing channel id isagentlink. - AgentLinkHub — hosted model hub (free-tier promo). Internal provider id is
xinyuan; hidden this release (its card is gated off; not yet launched). - Channels —
wechat/feishu/dingtalk/agentlink. - Model providers —
deepseek(default) /kimi/kimi-coding/minimax/custom/xinyuan.</content>
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

