agentleFS
cylingo-groupcylingo-group/claw-installer/AGENTS.md

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…

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
  1. Very specific:

    Do not commit directly to main.

    line 106
  2. Distinctive:

    Commits: do not commit/push unless asked.

    line 107

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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)

CommandWhat it does
make installInstall workspace deps via pnpm
make devStart the GUI in Tauri dev mode (recommended for app work)
make frontendVite dev server only — browser stub mode, no Rust/Tauri
make buildProduction bundle for the current platform
make build-macUniversal macOS bundle (arm64 + x86_64) → dist/macos/
make build-linux.deb + .AppImage inside Docker → dist/linux/
make build-windowsCross-compile .exe, zip with shell/ → dist/windows/claw-installer-<version>-windows.zip
make build-allmac + linux + windows in sequence
make testFrontend (vitest) and Rust (cargo test) suites
make typechecktsc --noEmit on the GUI
make cleanRemove 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.json intentionally has no version key → Tauri falls back to Cargo.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/app getVersion() (shows dev in stub mode).
  • The Windows zip name embeds it via the Makefile's APP_VERSION (parsed from Cargo.toml).
  • package.json / gui/package.json versions 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 in gui/src-tauri/src/commands.rs via gui/src/api/installer.ts. UI state is a single Zustand store (installer-store.ts).
  • Rust → shell (op-dispatch protocol): dispatch_op shells out to shell/claw-op.sh (macOS/Linux) or bootstrap.ps1 Invoke-OpDispatch (Windows). The op name is also the script filename: op pair-agentlink → shell/agents/<agent>/pair-agentlink.sh. The dispatch tables in claw-op.sh (_op_valid_agents) and bootstrap.ps1 ($OpAgentTable) must mirror each other, and the op string in commands.rs must match both.
  • Install steps: ENV_STEPS=(…) in agents/<agent>/install.sh → run_steps (lib/common.sh) loads steps/<name>.sh and calls step_<name>. Steps emit @@step:<key>:<label> sentinels that Rust parses in steps.rs to 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.json on Windows) holds per-agent model credentials, channel, pairing timestamp, and UI language. Hydration in installer-store.ts tolerates 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: dev is the primary working branch; main is protected and updated via merge request. Do not commit directly to main. Feature work follows the vcs-workflow convention (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 ]] in shell/.
  • Windows bootstrap.ps1 must keep its UTF-8 BOM (PowerShell 5.1 needs it to decode the Chinese strings); make build-windows hard-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.js and gui/vite.config.ts are both tracked — Vite loads .js first, so it wins. Editing only .ts may 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 is agentlink.
  • 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>

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.