clew-code 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +181 -113
- package/dist/generated/version.json +1 -1
- package/dist/main.js +2948 -3258
- package/package.json +1 -1
- package/docs/.nojekyll +0 -0
- package/docs/_config.yml +0 -3
- package/docs/architecture.html +0 -90
- package/docs/assets/clew-agent-loop.png +0 -0
- package/docs/assets/clew-general-architecture.png +0 -0
- package/docs/assets/clew-mcp-architecture.png +0 -0
- package/docs/assets/clew-p2p-swarm.png +0 -0
- package/docs/assets/clew.svg +0 -33
- package/docs/changelog.html +0 -141
- package/docs/cli-reference.html +0 -89
- package/docs/commands.html +0 -161
- package/docs/configuration.html +0 -85
- package/docs/contributing.html +0 -91
- package/docs/css/styles.css +0 -545
- package/docs/daemon.html +0 -62
- package/docs/features/bridge-mode.html +0 -62
- package/docs/features/evals.html +0 -58
- package/docs/features/searxng-search.html +0 -59
- package/docs/features/sentry-setup.html +0 -62
- package/docs/generated/providers.html +0 -625
- package/docs/generated/tools.html +0 -559
- package/docs/index.html +0 -182
- package/docs/installation.html +0 -77
- package/docs/internals/claude-ai-backend-dependencies.md +0 -278
- package/docs/internals/growthbook-ab-testing.html +0 -70
- package/docs/internals/hidden-features.html +0 -82
- package/docs/internals/long-term-memory-design.md +0 -173
- package/docs/js/main.js +0 -438
- package/docs/loop.html +0 -69
- package/docs/mcp.html +0 -99
- package/docs/models.html +0 -81
- package/docs/permission-model.html +0 -86
- package/docs/personal-profile.html +0 -113
- package/docs/plugins.html +0 -84
- package/docs/providers.html +0 -625
- package/docs/quick-start.html +0 -81
- package/docs/research-memory.html +0 -71
- package/docs/security.html +0 -71
- package/docs/skills.html +0 -67
- package/docs/swarm.html +0 -78
- package/docs/tools.html +0 -559
- package/docs/troubleshooting.html +0 -86
- package/docs/voice-mode.html +0 -79
package/package.json
CHANGED
package/docs/.nojekyll
DELETED
|
File without changes
|
package/docs/_config.yml
DELETED
package/docs/architecture.html
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Architecture — Clew Code</title>
|
|
7
|
-
<meta name="description" href="Codebase architecture of Clew Code.">
|
|
8
|
-
<link rel="icon" type="image/svg+xml" href="assets/clew.svg">
|
|
9
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
|
-
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
11
|
-
<link rel="stylesheet" href="css/styles.css">
|
|
12
|
-
</head>
|
|
13
|
-
<body>
|
|
14
|
-
<header class="header"></header>
|
|
15
|
-
<div id="sidebarOverlay" class="sidebar-overlay"></div>
|
|
16
|
-
<aside id="sidebar" class="sidebar"></aside>
|
|
17
|
-
|
|
18
|
-
<div class="content-wrap">
|
|
19
|
-
<div class="content">
|
|
20
|
-
|
|
21
|
-
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span class="current">Architecture</span></div>
|
|
22
|
-
|
|
23
|
-
<h1>Architecture</h1>
|
|
24
|
-
<p class="sub">Clew Code is a single-entry Bun bundle built with TypeScript (ESM, strict mode).</p>
|
|
25
|
-
|
|
26
|
-
<h2 id="layers">Layer Overview</h2>
|
|
27
|
-
<p>The architecture is layered: CLI entrypoint → Orchestrator → Context/Tools/Policy/Provider → Session logger.</p>
|
|
28
|
-
|
|
29
|
-
<pre><code>CLI (parseArgs)
|
|
30
|
-
↓
|
|
31
|
-
Orchestrator (Agent loop)
|
|
32
|
-
↓
|
|
33
|
-
Context ── Tools ── Policy ── Provider
|
|
34
|
-
↓
|
|
35
|
-
Session Logger
|
|
36
|
-
</code></pre>
|
|
37
|
-
|
|
38
|
-
<h2 id="sourcelayout">Source Layout</h2>
|
|
39
|
-
<pre><code>src/
|
|
40
|
-
├── main.tsx # Entry point
|
|
41
|
-
├── query.ts / QueryEngine.ts
|
|
42
|
-
├── agentRuntime/ # Background agent orchestration
|
|
43
|
-
├── commands/ # Slash command implementations
|
|
44
|
-
├── tools/ # 50+ built-in tools
|
|
45
|
-
├── services/
|
|
46
|
-
│ ├── ai/ # Provider manager + 27 providers
|
|
47
|
-
│ ├── mcp/ # MCP client + auth + transports
|
|
48
|
-
│ ├── plugins/ # Plugin hooks + marketplace
|
|
49
|
-
│ ├── autonomous/ # Agent loop + task queue + cron
|
|
50
|
-
│ ├── lsp/ # LSP integration
|
|
51
|
-
│ └── Supervisor/ # Agent supervisor IPC
|
|
52
|
-
├── peer/ # PeerServer + PeerDiscovery
|
|
53
|
-
├── bridge/ # WebSocket bridge + relay
|
|
54
|
-
├── components/ # Ink terminal UI components
|
|
55
|
-
├── state/ # AppState management
|
|
56
|
-
└── hooks/ # React hooks
|
|
57
|
-
</code></pre>
|
|
58
|
-
|
|
59
|
-
<h2 id="execution-layers">Execution Layers</h2>
|
|
60
|
-
<p>Clew Code has several agent execution layers:</p>
|
|
61
|
-
|
|
62
|
-
<table>
|
|
63
|
-
<thead>
|
|
64
|
-
<tr><th>Layer</th><th>Duration</th><th>Use Case</th></tr>
|
|
65
|
-
</thead>
|
|
66
|
-
<tbody>
|
|
67
|
-
<tr><td>Agent</td><td>Session-long</td><td>Main chat, custom agents in <code>.clew/agents/*.md</code></td></tr>
|
|
68
|
-
<tr><td>Subagent</td><td>One-shot</td><td>Explore codebase, test triage, review</td></tr>
|
|
69
|
-
<tr><td>Teammate/Swarm</td><td>Multi-turn</td><td>Coordinated long-running agent teams</td></tr>
|
|
70
|
-
<tr><td>LAN Peer</td><td>Persistent</td><td>Cross-machine coordination via <code>/peer</code></td></tr>
|
|
71
|
-
<tr><td>Process Peer</td><td>One-shot</td><td>External CLI workers (Codex exec/pty)</td></tr>
|
|
72
|
-
</tbody>
|
|
73
|
-
</table>
|
|
74
|
-
|
|
75
|
-
<h2 id="key-concepts">Key Concepts</h2>
|
|
76
|
-
|
|
77
|
-
<h3>Multi-Pass Compaction</h3>
|
|
78
|
-
<p>Automatic chunk-based context compression with recursive re-compaction when context exceeds the model window. Trigger manually with <code>/compact</code>.</p>
|
|
79
|
-
|
|
80
|
-
<h3>Plan Mode</h3>
|
|
81
|
-
<p>Full-access planning mode with bypass permissions. Plans persist to <code>.clew/plans/</code> with progress snapshots.</p>
|
|
82
|
-
|
|
83
|
-
<h3>Provider Manager</h3>
|
|
84
|
-
<p>The ProviderManager routes all LLM calls through a unified interface. Each provider has an adapter that normalizes requests and responses. The provider can be switched mid-session via <code>/model</code>.</p>
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
<script src="js/main.js"></script>
|
|
89
|
-
</body>
|
|
90
|
-
</html>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/assets/clew.svg
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<svg width="180" height="231" viewBox="0 0 190 231" role="img" xmlns="http://www.w3.org/2000/svg" style="margin: 2rem auto; image-rendering: crisp-edges; background: transparent;">
|
|
2
|
-
<title>Clawd one big eye</title>
|
|
3
|
-
|
|
4
|
-
<!-- HORNS -->
|
|
5
|
-
<rect fill="#8b5cf6" x="45" y="0" width="15" height="15"/>
|
|
6
|
-
<rect fill="#8b5cf6" x="120" y="0" width="15" height="15"/>
|
|
7
|
-
|
|
8
|
-
<!-- HEAD top row -->
|
|
9
|
-
<rect fill="#8b5cf6" x="30" y="15" width="120" height="15"/>
|
|
10
|
-
|
|
11
|
-
<!-- HEAD eye rows (2 rows tall): full purple bg, then big black eye -->
|
|
12
|
-
<rect fill="#8b5cf6" x="30" y="30" width="120" height="30"/>
|
|
13
|
-
<!-- big eye: 6 cells wide (90px), 2 rows tall (30px), centered: x=30+(120-90)/2=45 -->
|
|
14
|
-
<rect fill="#000000" x="45" y="30" width="90" height="30"/>
|
|
15
|
-
|
|
16
|
-
<!-- HEAD bottom row -->
|
|
17
|
-
<rect fill="#8b5cf6" x="30" y="60" width="120" height="15"/>
|
|
18
|
-
|
|
19
|
-
<!-- ARMS -->
|
|
20
|
-
<rect fill="#8b5cf6" x="0" y="75" width="180" height="15"/>
|
|
21
|
-
<rect fill="#8b5cf6" x="0" y="90" width="180" height="15"/>
|
|
22
|
-
|
|
23
|
-
<!-- BODY -->
|
|
24
|
-
<rect fill="#8b5cf6" x="30" y="105" width="120" height="15"/>
|
|
25
|
-
<rect fill="#8b5cf6" x="30" y="120" width="120" height="15"/>
|
|
26
|
-
|
|
27
|
-
<!-- LEGS -->
|
|
28
|
-
<rect fill="#8b5cf6" x="30" y="135" width="15" height="45"/>
|
|
29
|
-
<rect fill="#8b5cf6" x="60" y="135" width="15" height="45"/>
|
|
30
|
-
<rect fill="#8b5cf6" x="105" y="135" width="15" height="45"/>
|
|
31
|
-
<rect fill="#8b5cf6" x="135" y="135" width="15" height="45"/>
|
|
32
|
-
|
|
33
|
-
</svg>
|
package/docs/changelog.html
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Changelog — Clew Code</title>
|
|
7
|
-
<meta name="description" content="Release history and changelog for Clew Code.">
|
|
8
|
-
<link rel="icon" type="image/svg+xml" href="assets/clew.svg">
|
|
9
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
|
-
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
11
|
-
<link rel="stylesheet" href="css/styles.css">
|
|
12
|
-
</head>
|
|
13
|
-
<body>
|
|
14
|
-
<header class="header"></header>
|
|
15
|
-
<div id="sidebarOverlay" class="sidebar-overlay"></div>
|
|
16
|
-
<aside id="sidebar" class="sidebar"></aside>
|
|
17
|
-
|
|
18
|
-
<div class="content-wrap">
|
|
19
|
-
<div class="content">
|
|
20
|
-
|
|
21
|
-
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span class="current">Changelog</span></div>
|
|
22
|
-
|
|
23
|
-
<h1>Changelog</h1>
|
|
24
|
-
|
|
25
|
-
<h2 id="0.2.21">v0.2.21 — 2026-06-14</h2>
|
|
26
|
-
<h3>Fixed</h3>
|
|
27
|
-
<ul>
|
|
28
|
-
<li><strong>Detect package manager from install path</strong> — now correctly detects whether to use <code>bun</code> or <code>npm</code> based on the installation path, not the runtime.</li>
|
|
29
|
-
<li><strong>Polish UI rendering</strong> — fixed empty-state edge cases and visual glitches.</li>
|
|
30
|
-
</ul>
|
|
31
|
-
|
|
32
|
-
<h2 id="0.2.20">v0.2.20 — 2026-06-14</h2>
|
|
33
|
-
<h3>Fixed</h3>
|
|
34
|
-
<ul>
|
|
35
|
-
<li><strong>peer-spawn</strong> — spawn <code>cmd.exe</code> directly with <code>/k</code> and set title inside command instead of using <code>start</code>.</li>
|
|
36
|
-
<li><strong>peer-spawn cd fix</strong> — execute <code>cd</code> before running clew command to bypass cmd.exe quote stripping.</li>
|
|
37
|
-
</ul>
|
|
38
|
-
|
|
39
|
-
<h2 id="0.2.16">v0.2.16 — 2026-06-14</h2>
|
|
40
|
-
<h3>Fixed</h3>
|
|
41
|
-
<ul>
|
|
42
|
-
<li><strong>Auto-relaunch after update</strong> — <code>UpdateDialog.startInstall()</code> now spawns a detached child process immediately after install completes. No more manual restart required.</li>
|
|
43
|
-
</ul>
|
|
44
|
-
|
|
45
|
-
<h2 id="0.2.15">v0.2.15 — 2026-06-14</h2>
|
|
46
|
-
|
|
47
|
-
<h2 id="0.2.14">v0.2.14 — 2026-06-14</h2>
|
|
48
|
-
<h3>Added</h3>
|
|
49
|
-
<ul>
|
|
50
|
-
<li><strong>Peer task queue system</strong> — queuing commands when busy with priority levels, auto-dequeue, SSE queue events.</li>
|
|
51
|
-
<li><strong>Peer health monitoring</strong> — healthy/lagging/offline states, latency tracking.</li>
|
|
52
|
-
<li><strong>Long-term memory system</strong> — auto-extraction, session consolidation, cross-session history, timeline queries.</li>
|
|
53
|
-
<li><strong>Gemini Code Assist provider</strong> — OAuth-based provider integration.</li>
|
|
54
|
-
<li><strong>Dashboard Monitor</strong> — real-time agent and daemon monitoring with tabbed views.</li>
|
|
55
|
-
</ul>
|
|
56
|
-
<h3>Changed</h3>
|
|
57
|
-
<ul>
|
|
58
|
-
<li><strong>peer naming reverted</strong> — the peer-facing command family stays on <code>/peer</code>.</li>
|
|
59
|
-
</ul>
|
|
60
|
-
|
|
61
|
-
<h2 id="0.2.13">v0.2.13 — 2026-06-13</h2>
|
|
62
|
-
<h3>Changed</h3>
|
|
63
|
-
<ul>
|
|
64
|
-
<li>Formatting pass across codebase via Biome.</li>
|
|
65
|
-
<li>bun.lock synchronized with updated dependencies.</li>
|
|
66
|
-
</ul>
|
|
67
|
-
|
|
68
|
-
<h2 id="0.2.12">v0.2.12 — 2026-06-13</h2>
|
|
69
|
-
<h3>Added</h3>
|
|
70
|
-
<ul>
|
|
71
|
-
<li><strong>Provider consolidation</strong> — GoogleProvider and ClewGatewayProvider now extend OpenAICompatibleProvider, removing 679 lines of duplicated code.</li>
|
|
72
|
-
<li>Zod v4 migration (<code>.passthrough()</code> → <code>.loose()</code>).</li>
|
|
73
|
-
<li>PR command refactored to use <code>--json</code> + <code>JSON.parse</code>.</li>
|
|
74
|
-
</ul>
|
|
75
|
-
|
|
76
|
-
<h2 id="0.2.11">v0.2.11 — 2026-06-13</h2>
|
|
77
|
-
<h3>Added</h3>
|
|
78
|
-
<ul>
|
|
79
|
-
<li>Further peer system refinements.</li>
|
|
80
|
-
<li>Bug fixes and performance improvements.</li>
|
|
81
|
-
</ul>
|
|
82
|
-
|
|
83
|
-
<h2 id="0.2.7">v0.2.7 — 2026-06-11</h2>
|
|
84
|
-
<h3>Added</h3>
|
|
85
|
-
<ul>
|
|
86
|
-
<li><strong>process_peer PTY terminal box</strong> — terminal-style progress box with ANSI-preserving output tail.</li>
|
|
87
|
-
<li><strong><code>/peer run codex <task></code></strong> — one-shot Codex process peer from chat.</li>
|
|
88
|
-
<li><strong>Auto-update dialog</strong> — npm update notification before app starts.</li>
|
|
89
|
-
<li><strong>Rich model fetching</strong> — API models now carry context window, vision, tools, reasoning, free tags.</li>
|
|
90
|
-
<li><strong><code>/model list</code> capability tags</strong> — <code>[200K ctx, vision, tools, reason, free]</code> per model.</li>
|
|
91
|
-
<li><strong>Cost in status line</strong> — shows session cost when >$0.</li>
|
|
92
|
-
</ul>
|
|
93
|
-
|
|
94
|
-
<h2 id="0.2.6">v0.2.6 — 2026-06-10</h2>
|
|
95
|
-
<h3>Added</h3>
|
|
96
|
-
<ul>
|
|
97
|
-
<li><strong>Peer HTTP heartbeat</strong> — 60s liveness checks, offline peers detected immediately.</li>
|
|
98
|
-
<li><strong><code>/agents</code> visual polish</strong> — redesigned dashboard.</li>
|
|
99
|
-
<li><strong>Auto-updater</strong> — switched from Anthropic GCS to npm registry.</li>
|
|
100
|
-
</ul>
|
|
101
|
-
<h3>Removed</h3>
|
|
102
|
-
<ul>
|
|
103
|
-
<li>GitHub Copilot provider and all references cleaned out.</li>
|
|
104
|
-
</ul>
|
|
105
|
-
|
|
106
|
-
<h2 id="0.2.5">v0.2.5 — 2026-06-10</h2>
|
|
107
|
-
<h3>Added</h3>
|
|
108
|
-
<ul>
|
|
109
|
-
<li><strong>Rebranded to Clew Code</strong> — docs, UI copy, and package updated.</li>
|
|
110
|
-
<li><strong>Memory search</strong> — <code>/memory search</code> for stored entries.</li>
|
|
111
|
-
<li><strong>Peer tools</strong> — 14 AI coordination tools, peer help, connection count in footer.</li>
|
|
112
|
-
</ul>
|
|
113
|
-
|
|
114
|
-
<h2 id="0.2.4">v0.2.4 — 2026-06-08</h2>
|
|
115
|
-
<h3>Added</h3>
|
|
116
|
-
<ul>
|
|
117
|
-
<li><strong>Peer-to-peer</strong> — UDP multicast discovery, file registry, 14 AI coordination tools, interactive PeerMenu.</li>
|
|
118
|
-
<li><strong>Autonomous agents</strong> — agent loop, supervisor integration, task queue, Loop Lock.</li>
|
|
119
|
-
<li><strong>Workflow Rainbow</strong> — per-character gradient highlight for "workflow" keyword.</li>
|
|
120
|
-
</ul>
|
|
121
|
-
|
|
122
|
-
<h2 id="0.2.3">v0.2.3 — 2026-06-07</h2>
|
|
123
|
-
<h3>Added</h3>
|
|
124
|
-
<ul>
|
|
125
|
-
<li><code>/effort</code> works with any provider exposing <code>reasoningEffort</code>.</li>
|
|
126
|
-
<li><code>/model</code> fetches live model list from provider APIs.</li>
|
|
127
|
-
<li>Relay server for cross-network remote control.</li>
|
|
128
|
-
<li>Bridge v2: provider-agnostic remote control.</li>
|
|
129
|
-
<li><code>/pr create/list/view/review/merge/status</code>.</li>
|
|
130
|
-
<li>Security: PowerShell rules, malformed tool call guard, 100 MB bash output cap.</li>
|
|
131
|
-
</ul>
|
|
132
|
-
|
|
133
|
-
<p><a href="https://github.com/ClewCode/ClewCode/blob/main/CHANGELOG.md">View full changelog on GitHub →</a></p>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
|
|
137
|
-
<script src="js/main.js"></script>
|
|
138
|
-
</body>
|
|
139
|
-
</html>
|
|
140
|
-
|
|
141
|
-
|
package/docs/cli-reference.html
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>CLI Reference — Clew Code</title>
|
|
7
|
-
<meta name="description" content="Command-line interface reference for Clew Code.">
|
|
8
|
-
<link rel="icon" type="image/svg+xml" href="assets/clew.svg">
|
|
9
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
|
-
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
11
|
-
<link rel="stylesheet" href="css/styles.css">
|
|
12
|
-
</head>
|
|
13
|
-
<body>
|
|
14
|
-
<header class="header"></header>
|
|
15
|
-
<div id="sidebarOverlay" class="sidebar-overlay"></div>
|
|
16
|
-
<aside id="sidebar" class="sidebar"></aside>
|
|
17
|
-
|
|
18
|
-
<div class="content-wrap">
|
|
19
|
-
<div class="content">
|
|
20
|
-
|
|
21
|
-
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span class="current">CLI Reference</span></div>
|
|
22
|
-
|
|
23
|
-
<h1>CLI Reference</h1>
|
|
24
|
-
<p class="sub">Complete reference for Clew Code command-line flags and arguments.</p>
|
|
25
|
-
|
|
26
|
-
<h2 id="usage">Usage</h2>
|
|
27
|
-
<pre><code class="language-bash">clew [flags]
|
|
28
|
-
clew [command] [flags]
|
|
29
|
-
</code></pre>
|
|
30
|
-
|
|
31
|
-
<h2 id="global">Global Flags</h2>
|
|
32
|
-
<table>
|
|
33
|
-
<thead>
|
|
34
|
-
<tr><th>Flag</th><th>Description</th></tr>
|
|
35
|
-
</thead>
|
|
36
|
-
<tbody>
|
|
37
|
-
<tr><td><code>-p, --prompt <text></code></td><td>One-shot mode: run a prompt in non-interactive mode and exit</td></tr>
|
|
38
|
-
<tr><td><code>--resume <id></code></td><td>Resume a previous session by ID. Use <code>last</code> for the most recent session</td></tr>
|
|
39
|
-
<tr><td><code>--version</code></td><td>Print version and exit</td></tr>
|
|
40
|
-
<tr><td><code>--help</code></td><td>Show help message</td></tr>
|
|
41
|
-
</tbody>
|
|
42
|
-
</table>
|
|
43
|
-
|
|
44
|
-
<h2 id="exec">Exec Commands</h2>
|
|
45
|
-
<table>
|
|
46
|
-
<thead>
|
|
47
|
-
<tr><th>Command</th><th>Description</th></tr>
|
|
48
|
-
</thead>
|
|
49
|
-
<tbody>
|
|
50
|
-
<tr><td><code>clew . <prompt></code></td><td>Run prompt in current directory</td></tr>
|
|
51
|
-
</tbody>
|
|
52
|
-
</table>
|
|
53
|
-
|
|
54
|
-
<h2 id="env">Environment Variables</h2>
|
|
55
|
-
<table>
|
|
56
|
-
<thead>
|
|
57
|
-
<tr><th>Variable</th><th>Description</th></tr>
|
|
58
|
-
</thead>
|
|
59
|
-
<tbody>
|
|
60
|
-
<tr><td><code>ANTHROPIC_API_KEY</code></td><td>Anthropic Claude API key</td></tr>
|
|
61
|
-
<tr><td><code>OPENAI_API_KEY</code></td><td>OpenAI API key</td></tr>
|
|
62
|
-
<tr><td><code>GOOGLE_API_KEY</code></td><td>Google Gemini API key</td></tr>
|
|
63
|
-
<tr><td><code>DEEPSEEK_API_KEY</code></td><td>DeepSeek API key</td></tr>
|
|
64
|
-
<tr><td><code>GROQ_API_KEY</code></td><td>Groq API key</td></tr>
|
|
65
|
-
<tr><td><code>MISTRAL_API_KEY</code></td><td>Mistral API key</td></tr>
|
|
66
|
-
<tr><td><code>OPENROUTER_API_KEY</code></td><td>OpenRouter API key</td></tr>
|
|
67
|
-
<tr><td><code>OLLAMA_HOST</code></td><td>Ollama server URL (default: http://localhost:11434)</td></tr>
|
|
68
|
-
<tr><td><code>SEARXNG_URL</code></td><td>SearXNG instance URL</td></tr>
|
|
69
|
-
<tr><td><code>SENTRY_DSN</code></td><td>Sentry DSN for error tracking</td></tr>
|
|
70
|
-
<tr><td><code>GROWTHBOOK_API_KEY</code></td><td>GrowthBook API key for feature flags</td></tr>
|
|
71
|
-
</tbody>
|
|
72
|
-
</table>
|
|
73
|
-
|
|
74
|
-
<h2 id="exit-codes">Exit Codes</h2>
|
|
75
|
-
<table>
|
|
76
|
-
<thead>
|
|
77
|
-
<tr><th>Code</th><th>Meaning</th></tr>
|
|
78
|
-
</thead>
|
|
79
|
-
<tbody>
|
|
80
|
-
<tr><td><code>0</code></td><td>Success</td></tr>
|
|
81
|
-
<tr><td><code>1</code></td><td>General error</td></tr>
|
|
82
|
-
</tbody>
|
|
83
|
-
</table>
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
86
|
-
|
|
87
|
-
<script src="js/main.js"></script>
|
|
88
|
-
</body>
|
|
89
|
-
</html>
|
package/docs/commands.html
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Commands — Clew Code</title>
|
|
7
|
-
<meta name="description" href="All slash commands available in Clew Code.">
|
|
8
|
-
<link rel="icon" type="image/svg+xml" href="assets/clew.svg">
|
|
9
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
|
-
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
11
|
-
<link rel="stylesheet" href="css/styles.css">
|
|
12
|
-
</head>
|
|
13
|
-
<body>
|
|
14
|
-
<header class="header"></header>
|
|
15
|
-
<div id="sidebarOverlay" class="sidebar-overlay"></div>
|
|
16
|
-
<aside id="sidebar" class="sidebar"></aside>
|
|
17
|
-
|
|
18
|
-
<div class="content-wrap">
|
|
19
|
-
<div class="content">
|
|
20
|
-
|
|
21
|
-
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span class="current">Commands</span></div>
|
|
22
|
-
|
|
23
|
-
<h1>Commands</h1>
|
|
24
|
-
<p class="sub">Clew Code provides 35+ slash commands for managing providers, sessions, peer networking, MCP, plugins, and more.</p>
|
|
25
|
-
|
|
26
|
-
<h2 id="session">Session Commands</h2>
|
|
27
|
-
<table>
|
|
28
|
-
<thead>
|
|
29
|
-
<tr><th>Command</th><th>Description</th></tr>
|
|
30
|
-
</thead>
|
|
31
|
-
<tbody>
|
|
32
|
-
<tr><td><code>/status</code></td><td>Show current provider, model, session, and context info</td></tr>
|
|
33
|
-
<tr><td><code>/doctor</code></td><td>Run system diagnostics</td></tr>
|
|
34
|
-
<tr><td><code>/context</code></td><td>Show active context usage breakdown</td></tr>
|
|
35
|
-
<tr><td><code>/compact</code></td><td>Compress conversation history (multi-pass compaction)</td></tr>
|
|
36
|
-
<tr><td><code>/clear</code></td><td>Clear conversation or caches</td></tr>
|
|
37
|
-
<tr><td><code>/exit</code></td><td>Exit the REPL</td></tr>
|
|
38
|
-
<tr><td><code>/help</code></td><td>List all available commands</td></tr>
|
|
39
|
-
<tr><td><code>/resume</code></td><td>Resume a previous session</td></tr>
|
|
40
|
-
<tr><td><code>/profile</code></td><td>Switch between <strong>coding</strong> and <strong>personal</strong> profiles. Personal profile turns Clew into a personal AI control center with delegation, memory-driven learning, and skill creation. See <a href="personal-profile.html">Personal Profile</a>.</td></tr>
|
|
41
|
-
<tr><td><code>/maxmode on|off|candidates N</code></td><td>Toggle Max Mode — parallel N candidates via LLM judge</td></tr>
|
|
42
|
-
</tbody>
|
|
43
|
-
</table>
|
|
44
|
-
|
|
45
|
-
<h2 id="provider">Provider & Model Commands</h2>
|
|
46
|
-
<table>
|
|
47
|
-
<thead>
|
|
48
|
-
<tr><th>Command</th><th>Description</th></tr>
|
|
49
|
-
</thead>
|
|
50
|
-
<tbody>
|
|
51
|
-
<tr><td><code>/model</code></td><td>Switch provider or model. Use <code>/model list</code> to see available models</td></tr>
|
|
52
|
-
<tr><td><code>/effort</code></td><td>Set reasoning effort (low/medium/high) for supported providers</td></tr>
|
|
53
|
-
<tr><td><code>/fast</code></td><td>Toggle fast/turbo mode</td></tr>
|
|
54
|
-
</tbody>
|
|
55
|
-
</table>
|
|
56
|
-
|
|
57
|
-
<h2 id="peer">Peer & Networking Commands</h2>
|
|
58
|
-
<table>
|
|
59
|
-
<thead>
|
|
60
|
-
<tr><th>Command</th><th>Description</th></tr>
|
|
61
|
-
</thead>
|
|
62
|
-
<tbody>
|
|
63
|
-
<tr><td><code>/peer discover</code></td><td>Find other Clew instances on the LAN</td></tr>
|
|
64
|
-
<tr><td><code>/peer share</code></td><td>Share this instance as a worker</td></tr>
|
|
65
|
-
<tr><td><code>/peer run <peer> <cmd></code></td><td>Run a command on a remote peer</td></tr>
|
|
66
|
-
<tr><td><code>/peer send <peer> <msg></code></td><td>Send a message to a peer</td></tr>
|
|
67
|
-
<tr><td><code>/peer list</code></td><td>List discovered peers</td></tr>
|
|
68
|
-
<tr><td><code>/peer info <peer></code></td><td>Show peer details</td></tr>
|
|
69
|
-
<tr><td><code>/peer help</code></td><td>Peer command reference</td></tr>
|
|
70
|
-
</tbody>
|
|
71
|
-
</table>
|
|
72
|
-
|
|
73
|
-
<h2 id="mcp">MCP Commands</h2>
|
|
74
|
-
<table>
|
|
75
|
-
<thead>
|
|
76
|
-
<tr><th>Command</th><th>Description</th></tr>
|
|
77
|
-
</thead>
|
|
78
|
-
<tbody>
|
|
79
|
-
<tr><td><code>/mcp list</code></td><td>List connected MCP servers and tools</td></tr>
|
|
80
|
-
<tr><td><code>/mcp add</code></td><td>Add an MCP server configuration</td></tr>
|
|
81
|
-
<tr><td><code>/mcp remove</code></td><td>Remove an MCP server</td></tr>
|
|
82
|
-
</tbody>
|
|
83
|
-
</table>
|
|
84
|
-
|
|
85
|
-
<h2 id="code">Code & Review Commands</h2>
|
|
86
|
-
<table>
|
|
87
|
-
<thead>
|
|
88
|
-
<tr><th>Command</th><th>Description</th></tr>
|
|
89
|
-
</thead>
|
|
90
|
-
<tbody>
|
|
91
|
-
<tr><td><code>/code-review</code></td><td>Review changed files for bugs</td></tr>
|
|
92
|
-
<tr><td><code>/simplify</code></td><td>Cleanup-focused code review</td></tr>
|
|
93
|
-
<tr><td><code>/pr</code></td><td>PR management (create/list/view/review/merge/status)</td></tr>
|
|
94
|
-
<tr><td><code>/diff</code></td><td>Show git diff</td></tr>
|
|
95
|
-
</tbody>
|
|
96
|
-
</table>
|
|
97
|
-
|
|
98
|
-
<h2 id="plugin">Plugin & Extension Commands</h2>
|
|
99
|
-
<table>
|
|
100
|
-
<thead>
|
|
101
|
-
<tr><th>Command</th><th>Description</th></tr>
|
|
102
|
-
</thead>
|
|
103
|
-
<tbody>
|
|
104
|
-
<tr><td><code>/plugin</code></td><td>Plugin and hook management (install, list, remove)</td></tr>
|
|
105
|
-
<tr><td><code>/skills</code></td><td>List and manage skills</td></tr>
|
|
106
|
-
<tr><td><code>/hooks</code></td><td>View active hooks</td></tr>
|
|
107
|
-
</tbody>
|
|
108
|
-
</table>
|
|
109
|
-
|
|
110
|
-
<h2 id="autonomous">Autonomous & Agent Commands</h2>
|
|
111
|
-
<table>
|
|
112
|
-
<thead>
|
|
113
|
-
<tr><th>Command</th><th>Description</th></tr>
|
|
114
|
-
</thead>
|
|
115
|
-
<tbody>
|
|
116
|
-
<tr><td><code>/loop</code></td><td>24/7 autonomous agent loop (start, stop, status)</td></tr>
|
|
117
|
-
<tr><td><code>/daemon</code></td><td>Autonomous daemon dashboard</td></tr>
|
|
118
|
-
<tr><td><code>/task</code></td><td>Manage scheduled tasks</td></tr>
|
|
119
|
-
<tr><td><code>/agent</code></td><td>Background agent dispatch and subcommands</td></tr>
|
|
120
|
-
<tr><td><code>/agents</code></td><td>Agent dashboard (TUI operational view)</td></tr>
|
|
121
|
-
</tbody>
|
|
122
|
-
</table>
|
|
123
|
-
|
|
124
|
-
<h2 id="memory">Memory Commands</h2>
|
|
125
|
-
<table>
|
|
126
|
-
<thead>
|
|
127
|
-
<tr><th>Command</th><th>Description</th></tr>
|
|
128
|
-
</thead>
|
|
129
|
-
<tbody>
|
|
130
|
-
<tr><td><code>/memory save</code></td><td>Save session summary to long-term memory</td></tr>
|
|
131
|
-
<tr><td><code>/memory timeline</code></td><td>Show chronological session history</td></tr>
|
|
132
|
-
<tr><td><code>/memory stats</code></td><td>Activity density chart</td></tr>
|
|
133
|
-
<tr><td><code>/memory digest</code></td><td>Show weekly/monthly digests</td></tr>
|
|
134
|
-
<tr><td><code>/memory search</code></td><td>Search stored memory entries</td></tr>
|
|
135
|
-
<tr><td><code>/maxmode on|off|candidates N</code></td><td>Toggle Max Mode — parallel candidate selection via LLM judge</td></tr>
|
|
136
|
-
</tbody>
|
|
137
|
-
</table>
|
|
138
|
-
|
|
139
|
-
<h2 id="other">Other Commands</h2>
|
|
140
|
-
<table>
|
|
141
|
-
<thead>
|
|
142
|
-
<tr><th>Command</th><th>Description</th></tr>
|
|
143
|
-
</thead>
|
|
144
|
-
<tbody>
|
|
145
|
-
<tr><td><code>/remote</code></td><td>WebSocket remote control (listen, connect, token)</td></tr>
|
|
146
|
-
<tr><td><code>/bridge</code></td><td>Bridge mode configuration</td></tr>
|
|
147
|
-
<tr><td><code>/config</code></td><td>Open configuration panel</td></tr>
|
|
148
|
-
<tr><td><code>/theme</code></td><td>Switch theme</td></tr>
|
|
149
|
-
<tr><td><code>/mode</code></td><td>Switch execution mode — safe, yolo, afk, review-only, browser-safe</td></tr>
|
|
150
|
-
<tr><td><code>/permissions</code></td><td>Change permission mode</td></tr>
|
|
151
|
-
<tr><td><code>/export</code></td><td>Export session</td></tr>
|
|
152
|
-
<tr><td><code>/recap</code></td><td>Session recap</td></tr>
|
|
153
|
-
</tbody>
|
|
154
|
-
</table>
|
|
155
|
-
</div>
|
|
156
|
-
</div>
|
|
157
|
-
|
|
158
|
-
<script src="js/main.js"></script>
|
|
159
|
-
</body>
|
|
160
|
-
</html>
|
|
161
|
-
|
package/docs/configuration.html
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Configuration — Clew Code</title>
|
|
7
|
-
<meta name="description" href="Configure Clew Code via settings.json, environment variables, and CLI flags.">
|
|
8
|
-
<link rel="icon" type="image/svg+xml" href="assets/clew.svg">
|
|
9
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
|
-
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
11
|
-
<link rel="stylesheet" href="css/styles.css">
|
|
12
|
-
</head>
|
|
13
|
-
<body>
|
|
14
|
-
<header class="header"></header>
|
|
15
|
-
<div id="sidebarOverlay" class="sidebar-overlay"></div>
|
|
16
|
-
<aside id="sidebar" class="sidebar"></aside>
|
|
17
|
-
|
|
18
|
-
<div class="content-wrap">
|
|
19
|
-
<div class="content">
|
|
20
|
-
|
|
21
|
-
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span class="current">Configuration</span></div>
|
|
22
|
-
|
|
23
|
-
<h1>Configuration</h1>
|
|
24
|
-
|
|
25
|
-
<h2 id="settings">settings.json</h2>
|
|
26
|
-
<p>Shared settings live in <code>.clew/settings.json</code> (checked into the repo) and private settings live in <code>.clew/settings.local.json</code> (gitignored).</p>
|
|
27
|
-
<pre><code class="language-json">{
|
|
28
|
-
"permission": "default",
|
|
29
|
-
"provider": "openai",
|
|
30
|
-
"model": "gpt-5.5",
|
|
31
|
-
"theme": "dark",
|
|
32
|
-
"autoUpdate": true
|
|
33
|
-
}
|
|
34
|
-
</code></pre>
|
|
35
|
-
|
|
36
|
-
<h2 id="env">Environment Variables</h2>
|
|
37
|
-
<p>Set provider API keys as environment variables:</p>
|
|
38
|
-
<pre><code class="language-bash">export ANTHROPIC_API_KEY=sk-ant-...
|
|
39
|
-
export OPENAI_API_KEY=sk-...
|
|
40
|
-
export GOOGLE_API_KEY=...
|
|
41
|
-
export DEEPSEEK_API_KEY=sk-...
|
|
42
|
-
export GROQ_API_KEY=gsk_...
|
|
43
|
-
export MISTRAL_API_KEY=...
|
|
44
|
-
export OPENROUTER_API_KEY=...
|
|
45
|
-
export OLLAMA_HOST=http://localhost:11434
|
|
46
|
-
</code></pre>
|
|
47
|
-
<p>The app also reads from <code>.env</code> files in the project root.</p>
|
|
48
|
-
|
|
49
|
-
<h2 id="cli-flags">CLI Flags</h2>
|
|
50
|
-
<table>
|
|
51
|
-
<thead>
|
|
52
|
-
<tr><th>Flag</th><th>Description</th></tr>
|
|
53
|
-
</thead>
|
|
54
|
-
<tbody>
|
|
55
|
-
<tr><td><code>-p, --prompt</code></td><td>One-shot mode: run a prompt and exit</td></tr>
|
|
56
|
-
<tr><td><code>--resume <id></code></td><td>Resume a previous session (use <code>last</code> for most recent)</td></tr>
|
|
57
|
-
<tr><td><code>--version</code></td><td>Print version and exit</td></tr>
|
|
58
|
-
</tbody>
|
|
59
|
-
</table>
|
|
60
|
-
|
|
61
|
-
<h2 id="permission">Permission Mode</h2>
|
|
62
|
-
<p>Set the permission mode in settings or switch at runtime:</p>
|
|
63
|
-
<pre><code class="language-bash">❯ /permissions plan # full-access planning mode
|
|
64
|
-
❯ /permissions auto # auto-approve safe tools
|
|
65
|
-
</code></pre>
|
|
66
|
-
<p>See <a href="permission-model.html">Permission Model</a> for all modes.</p>
|
|
67
|
-
|
|
68
|
-
<h2 id="mcp">MCP Configuration</h2>
|
|
69
|
-
<p>MCP servers are configured in <code>.mcp.json</code> at the project root:</p>
|
|
70
|
-
<pre><code class="language-json">{
|
|
71
|
-
"mcpServers": {
|
|
72
|
-
"filesystem": {
|
|
73
|
-
"command": "npx",
|
|
74
|
-
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
</code></pre>
|
|
79
|
-
<p>See <a href="mcp.html">MCP docs</a> for details.</p>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
|
|
83
|
-
<script src="js/main.js"></script>
|
|
84
|
-
</body>
|
|
85
|
-
</html>
|