Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 15 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,79 +5,46 @@
<h1 align="center">iClaw</h1>

<p align="center">
Chat UI for <a href="https://openclaw.ai">OpenClaw Gateway</a> — runs on your machine, stores history locally.
Minimalist agent UI - give it a project, it works only within it. Isolated memory, isolated folders
</p>

<p align="center">
<a href="https://github.com/iClawApp/iClaw/actions/workflows/ci.yml?branch=main"><img src="https://img.shields.io/github/actions/workflow/status/iClawApp/iClaw/ci.yml?branch=main&style=for-the-badge" alt="CI"></a>
<a href="https://www.npmjs.com/package/@iclawapp/iclaw"><img src="https://img.shields.io/npm/v/@iclawapp/iclaw?style=for-the-badge" alt="npm"></a>
<a href="https://www.npmjs.com/package/@iclawapp/iclaw"><img src="https://img.shields.io/npm/dm/@iclawapp/iclaw?style=for-the-badge" alt="npm downloads"></a>
<a href="https://www.reddit.com/r/iClaw_ai_agent/"><img src="https://img.shields.io/badge/Reddit-r%2FiClaw__ai__agent-FF4500?style=for-the-badge&logo=reddit&logoColor=white" alt="Reddit"></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" alt="MIT"></a>
</p>

![iClaw screenshot](./docs/readme-screenshot.png)

## Install

Requires [Node.js 20+](https://nodejs.org) and a running [OpenClaw Gateway](https://docs.openclaw.ai).
Requires [Node.js 20+](https://nodejs.org)

```bash
npx @iclawapp/iclaw
```

The terminal shows a short status line and **press `g`** to open the UI in your browser. It picks the next free port if `3000` is busy, and exits without starting a second copy if iClaw is already running.
Press **`g`** in the terminal to open the UI in your browser

Your chat history is saved to `~/.iclaw/data/iclaw.db`.

Optional env vars: `PORT` (preferred port, default `3000`), `ICLAW_OPEN_BROWSER=1` (also open the browser tab on start).

## Encrypted chat sharing (optional)

Hit **Share** in any chat to get an encrypted link. The chat is encrypted in your browser (AES-256-GCM); the server stores ciphertext only. Supports password protection, burn-after-read, and TTL.
## Star history

Powered by [iClaw-cloud](https://github.com/iClawApp/iClaw-cloud) — defaults to `https://app.iclaw.digital`.
[![Star History Chart](https://api.star-history.com/svg?repos=iClawApp/iClaw&type=Date)](https://www.star-history.com/#iClawApp/iClaw&Date)

## Chat modes

The composer has a small mode selector. The selected mode is stored per message
(`messages.mode`) and rides the `frontend → WS → chatRunner` path. Missing/unknown
modes fall back to `execute`, so old chats and older clients keep working. Modes
are config-driven in [`src/services/chatModes.ts`](src/services/chatModes.ts) (the
catalog also lists disabled placeholders so new modes can be added without
touching call sites or the DB — the column is plain `TEXT`).

| Mode | What it does | Backend |
| --- | --- | --- |
| **Full Power** (default) | The full OpenClaw agent — files, tools, shell, browser. | OpenClaw Gateway |
| **Work** | AI edits files in folders you pick; you approve every change. | iClaw runtime |
| **Safe work & Internet research** | Locked Docker sandbox — run untrusted code and research the web, isolated from your system. | iClaw runtime |
| **Safe work & Internet research** | Locked Docker sandbox — run untrusted code and research the web. | iClaw runtime |
| **Full Power** (default) | The full OpenClaw agent — files, tools, shell, browser. | OpenClaw Gateway |
| **Incognito** | Private, read-only research — reads files & the web, never writes, nothing saved. | iClaw runtime |

**Full Power** routes to the gateway exactly as before. The other three run on
the bundled **iClaw runtime** (`packages/iclaw-runtime`): the agent loop runs on
the host and reaches [OpenRouter](https://openrouter.ai), while tool/shell
execution is isolated in a per-turn Docker sandbox. They therefore need **Docker**
running and an **OpenRouter key** (Settings); without either they're unavailable
and the composer falls back to Full Power. See [AGENTS.md](AGENTS.md) for the
runtime architecture.

## Remote Access (alpha)

Open the iClaw UI from another device through an **iclaw-relay** tunnel (Settings → Remote Access).

**Security model (summary):**

- **Relay access token** — blocks visitors who only guess the subdomain.
- **OPAQUE login** — passphrase is not sent in plaintext over the tunnel.
- **Encrypted HTTP/WebSocket** (E2E alpha) — payloads are encrypted between the browser and **local** iClaw; the relay forwards encrypted frames only.
- **Device sessions** — trusted browsers can reconnect without retyping the passphrase.
- **Alpha** — not externally audited. The relay still sees metadata (subdomain, timing, sizes, E2E endpoint paths).
The three runtime modes need **Docker** running and an **OpenRouter key** (Settings); without either the composer falls back to Full Power. Architecture: [AGENTS.md](AGENTS.md).

Two setups: **local mode** (iClaw + OpenClaw on the same laptop) and **host mode** (always-on machine, browse from phone/laptop). See [docs/REMOTE_ACCESS.md](../docs/REMOTE_ACCESS.md).
## More

Env on the iClaw host: `ICLAW_RELAY_URL` and `OPAQUE_SERVER_SETUP` (required when Remote Access is enabled).

---
- **Encrypted chat sharing** — hit **Share** in any chat for an end-to-end encrypted link (AES-256-GCM; password, burn-after-read, TTL). Powered by [iClaw-cloud](https://github.com/iClawApp/iClaw-cloud).
- **Remote Access** (alpha) — reach the UI from another device over an iclaw-relay tunnel (Settings → Remote Access). Not externally audited yet — see [docs/REMOTE_ACCESS.md](docs/REMOTE_ACCESS.md).

## For developers

Expand All @@ -86,28 +53,9 @@ git clone https://github.com/iClawApp/iClaw.git
cd iClaw && npm install && npm run dev
```

| | Default |
| --- | --- |
| Web UI | http://localhost:3000 |
| Gateway | http://127.0.0.1:18789 (`OPENCLAW_BASE_URL`) |

Optional env vars: [.env.example](.env.example).
Architecture + coding rules: [AGENTS.md](AGENTS.md).
Remote Access alpha: [docs/REMOTE_ACCESS.md](../docs/REMOTE_ACCESS.md), smoke [docs/REMOTE_ACCESS_SMOKE.md](../docs/REMOTE_ACCESS_SMOKE.md).

```bash
npm run test:ra-smoke # E2E adversarial smoke (vitest)
npm run scan:relay-capture -- frames.ndjson # scan relay frame capture
```

## Star history

[![Star History Chart](https://api.star-history.com/svg?repos=iClawApp/iClaw&type=Date)](https://www.star-history.com/#iClawApp/iClaw&Date)

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md), [ROADMAP.md](ROADMAP.md), [CHANGELOG.md](CHANGELOG.md). Bug reports and small PRs welcome — for bigger changes open an issue first.
Web UI on http://localhost:3000, Gateway on http://127.0.0.1:18789 (`OPENCLAW_BASE_URL`). Env vars: [.env.example](.env.example) · Architecture & coding rules: [AGENTS.md](AGENTS.md).

## License
## License and contributing
[CONTRIBUTING.md](CONTRIBUTING.md) · [ROADMAP.md](ROADMAP.md) · [CHANGELOG.md](CHANGELOG.md)

MIT — see [LICENSE](LICENSE).
75 changes: 74 additions & 1 deletion public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3690,11 +3690,26 @@ code {
background: transparent;
}
.project-pick-title {
margin: 0 0 22px;
margin: 0 0 6px;
font-size: 1.05rem;
font-weight: 650;
letter-spacing: -0.02em;
}
.project-pick-hint {
margin: 0 0 22px;
font-size: var(--text-sm);
color: var(--muted);
}
.project-pick-hint kbd {
font: inherit;
font-size: 0.8em;
padding: 1px 6px;
border: 1px solid var(--border);
border-bottom-width: 2px;
border-radius: 6px;
background: color-mix(in srgb, var(--text) 5%, var(--surface));
color: var(--text);
}
.project-pick-grid {
display: flex;
flex-wrap: wrap;
Expand Down Expand Up @@ -5324,6 +5339,13 @@ code {
font-weight: 400;
color: var(--muted);
}
/* Last so it wins for Safe work (needs both Docker and a key) — the key is the
* blocker to surface first. */
.composer-mode-menu-item.is-unavailable[data-requires-key="1"] .menu-item__title::after {
content: ' · needs OpenRouter';
font-weight: 400;
color: var(--muted);
}

/* ---------- Message attachments (persisted user uploads) ---------- */

Expand Down Expand Up @@ -8293,6 +8315,57 @@ body.incognito-mode .composer-mode-btn__label {
}
.onb-skip:hover { color: var(--text); text-decoration: underline; }

/* Connect-a-model chooser modal — shown when a user who skipped onboarding
(no OpenRouter key, no reachable OpenClaw) tries to send. Reuses .onb-* rows. */
.connect-modal {
position: fixed;
inset: 0;
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
padding: var(--space-6);
}
.connect-modal[hidden] { display: none; }
.connect-modal__backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.55);
}
.connect-modal__card {
position: relative;
z-index: 1;
margin: 0;
text-align: center;
animation: onb-fade 0.18s ease;
}
.connect-modal__close {
position: absolute;
top: var(--space-5);
right: var(--space-5);
width: 1.75rem;
height: 1.75rem;
display: grid;
place-items: center;
background: none;
border: none;
border-radius: var(--radius-lg);
color: var(--muted);
font-size: 1.4rem;
line-height: 1;
cursor: pointer;
}
.connect-modal__close:hover {
color: var(--text);
background: color-mix(in srgb, var(--text) 8%, transparent);
}
.connect-modal__note {
margin: var(--space-6) 0 0;
font-size: var(--text-sm);
color: var(--muted);
line-height: 1.45;
}

.onb-back {
position: absolute;
top: var(--space-7);
Expand Down
Loading
Loading