claws-code 0.8.0
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/.claude/commands/claws-auto.md +90 -0
- package/.claude/commands/claws-bin.md +28 -0
- package/.claude/commands/claws-cleanup.md +28 -0
- package/.claude/commands/claws-do.md +82 -0
- package/.claude/commands/claws-fix.md +40 -0
- package/.claude/commands/claws-goal.md +111 -0
- package/.claude/commands/claws-help.md +54 -0
- package/.claude/commands/claws-plan.md +103 -0
- package/.claude/commands/claws-report.md +29 -0
- package/.claude/commands/claws-status.md +37 -0
- package/.claude/commands/claws-update.md +32 -0
- package/.claude/commands/claws.md +64 -0
- package/.claude/rules/claws-default-behavior.md +76 -0
- package/.claude/settings.json +112 -0
- package/.claude/settings.local.json +19 -0
- package/.claude/skills/claws-auto-engine/SKILL.md +97 -0
- package/.claude/skills/claws-goal-tracker/SKILL.md +106 -0
- package/.claude/skills/claws-prompt-templates/SKILL.md +203 -0
- package/.claude/skills/claws-wave-lead/SKILL.md +126 -0
- package/.claude/skills/claws-wave-subworker/SKILL.md +60 -0
- package/CHANGELOG.md +1949 -0
- package/LICENSE +21 -0
- package/README.md +420 -0
- package/bin/cli.js +84 -0
- package/cli.js +223 -0
- package/docs/ARCHITECTURE.md +511 -0
- package/docs/event-protocol.md +588 -0
- package/docs/features.md +562 -0
- package/docs/guide.md +891 -0
- package/docs/index.html +716 -0
- package/docs/protocol.md +323 -0
- package/extension/.vscodeignore +15 -0
- package/extension/CHANGELOG.md +1906 -0
- package/extension/LICENSE +21 -0
- package/extension/README.md +137 -0
- package/extension/docs/features.md +424 -0
- package/extension/docs/protocol.md +197 -0
- package/extension/esbuild.mjs +25 -0
- package/extension/icon.png +0 -0
- package/extension/native/.metadata.json +10 -0
- package/extension/native/node-pty/LICENSE +69 -0
- package/extension/native/node-pty/README.md +165 -0
- package/extension/native/node-pty/lib/conpty_console_list_agent.js +16 -0
- package/extension/native/node-pty/lib/conpty_console_list_agent.js.map +1 -0
- package/extension/native/node-pty/lib/eventEmitter2.js +47 -0
- package/extension/native/node-pty/lib/eventEmitter2.js.map +1 -0
- package/extension/native/node-pty/lib/index.js +52 -0
- package/extension/native/node-pty/lib/index.js.map +1 -0
- package/extension/native/node-pty/lib/interfaces.js +7 -0
- package/extension/native/node-pty/lib/interfaces.js.map +1 -0
- package/extension/native/node-pty/lib/shared/conout.js +11 -0
- package/extension/native/node-pty/lib/shared/conout.js.map +1 -0
- package/extension/native/node-pty/lib/terminal.js +190 -0
- package/extension/native/node-pty/lib/terminal.js.map +1 -0
- package/extension/native/node-pty/lib/types.js +7 -0
- package/extension/native/node-pty/lib/types.js.map +1 -0
- package/extension/native/node-pty/lib/unixTerminal.js +346 -0
- package/extension/native/node-pty/lib/unixTerminal.js.map +1 -0
- package/extension/native/node-pty/lib/utils.js +39 -0
- package/extension/native/node-pty/lib/utils.js.map +1 -0
- package/extension/native/node-pty/lib/windowsConoutConnection.js +125 -0
- package/extension/native/node-pty/lib/windowsConoutConnection.js.map +1 -0
- package/extension/native/node-pty/lib/windowsPtyAgent.js +320 -0
- package/extension/native/node-pty/lib/windowsPtyAgent.js.map +1 -0
- package/extension/native/node-pty/lib/windowsTerminal.js +199 -0
- package/extension/native/node-pty/lib/windowsTerminal.js.map +1 -0
- package/extension/native/node-pty/lib/worker/conoutSocketWorker.js +22 -0
- package/extension/native/node-pty/lib/worker/conoutSocketWorker.js.map +1 -0
- package/extension/native/node-pty/package.json +64 -0
- package/extension/native/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
- package/extension/native/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
- package/extension/native/node-pty/prebuilds/darwin-x64/pty.node +0 -0
- package/extension/native/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
- package/extension/native/node-pty/prebuilds/win32-arm64/conpty/OpenConsole.exe +0 -0
- package/extension/native/node-pty/prebuilds/win32-arm64/conpty/conpty.dll +0 -0
- package/extension/native/node-pty/prebuilds/win32-arm64/conpty.node +0 -0
- package/extension/native/node-pty/prebuilds/win32-arm64/conpty_console_list.node +0 -0
- package/extension/native/node-pty/prebuilds/win32-arm64/pty.node +0 -0
- package/extension/native/node-pty/prebuilds/win32-arm64/winpty-agent.exe +0 -0
- package/extension/native/node-pty/prebuilds/win32-arm64/winpty.dll +0 -0
- package/extension/native/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
- package/extension/native/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
- package/extension/native/node-pty/prebuilds/win32-x64/conpty.node +0 -0
- package/extension/native/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
- package/extension/native/node-pty/prebuilds/win32-x64/pty.node +0 -0
- package/extension/native/node-pty/prebuilds/win32-x64/winpty-agent.exe +0 -0
- package/extension/native/node-pty/prebuilds/win32-x64/winpty.dll +0 -0
- package/extension/package-lock.json +605 -0
- package/extension/package.json +343 -0
- package/extension/scripts/bundle-native.mjs +104 -0
- package/extension/scripts/deploy-dev.mjs +60 -0
- package/extension/src/ansi-strip.ts +52 -0
- package/extension/src/backends/vscode/claws-pty.ts +483 -0
- package/extension/src/backends/vscode/status-bar.ts +99 -0
- package/extension/src/backends/vscode/vscode-backend.ts +282 -0
- package/extension/src/capture-store.ts +125 -0
- package/extension/src/event-log.ts +629 -0
- package/extension/src/event-schemas.ts +478 -0
- package/extension/src/extension.js +492 -0
- package/extension/src/extension.ts +873 -0
- package/extension/src/lifecycle-engine.ts +60 -0
- package/extension/src/lifecycle-rules.ts +171 -0
- package/extension/src/lifecycle-store.ts +506 -0
- package/extension/src/peer-registry.ts +176 -0
- package/extension/src/pipeline-registry.ts +82 -0
- package/extension/src/platform.ts +64 -0
- package/extension/src/protocol.ts +532 -0
- package/extension/src/server-config.ts +98 -0
- package/extension/src/server.ts +2210 -0
- package/extension/src/task-registry.ts +51 -0
- package/extension/src/terminal-backend.ts +211 -0
- package/extension/src/terminal-manager.ts +395 -0
- package/extension/src/topic-registry.ts +70 -0
- package/extension/src/topic-utils.ts +46 -0
- package/extension/src/transport.ts +45 -0
- package/extension/src/uninstall-cleanup.ts +232 -0
- package/extension/src/wave-registry.ts +314 -0
- package/extension/src/websocket-transport.ts +153 -0
- package/extension/tsconfig.json +23 -0
- package/lib/capabilities.js +145 -0
- package/lib/dry-run.js +43 -0
- package/lib/install.js +1018 -0
- package/lib/mcp-setup.js +92 -0
- package/lib/platform.js +240 -0
- package/lib/preflight.js +152 -0
- package/lib/shell-hook.js +343 -0
- package/lib/uninstall.js +162 -0
- package/lib/verify.js +166 -0
- package/mcp_server.js +3529 -0
- package/package.json +48 -0
- package/rules/claws-default-behavior.md +72 -0
- package/scripts/_helpers/atomic-file.mjs +137 -0
- package/scripts/_helpers/fix-repair.js +64 -0
- package/scripts/_helpers/json-safe.mjs +218 -0
- package/scripts/bump-version.sh +84 -0
- package/scripts/codegen/gen-docs.mjs +61 -0
- package/scripts/codegen/gen-json-schema.mjs +62 -0
- package/scripts/codegen/gen-mcp-tools.mjs +358 -0
- package/scripts/codegen/gen-types.mjs +172 -0
- package/scripts/codegen/index.mjs +42 -0
- package/scripts/dev-hooks/check-extension-dirs.js +77 -0
- package/scripts/dev-hooks/check-open-claws-terminals.js +70 -0
- package/scripts/dev-hooks/check-stale-main.js +55 -0
- package/scripts/dev-hooks/check-tag-pushed.js +51 -0
- package/scripts/dev-hooks/check-tag-vs-main.js +56 -0
- package/scripts/dev-vsix-install.sh +60 -0
- package/scripts/fix.sh +702 -0
- package/scripts/gen-client-types.mjs +81 -0
- package/scripts/git-hooks/pre-commit +31 -0
- package/scripts/hooks/lifecycle-state.js +61 -0
- package/scripts/hooks/package.json +4 -0
- package/scripts/hooks/post-tool-use-claws.js +292 -0
- package/scripts/hooks/pre-bash-no-verify-block.js +72 -0
- package/scripts/hooks/pre-tool-use-claws.js +206 -0
- package/scripts/hooks/session-start-claws.js +97 -0
- package/scripts/hooks/stop-claws.js +88 -0
- package/scripts/inject-claude-md.js +205 -0
- package/scripts/inject-dev-hooks.js +96 -0
- package/scripts/inject-global-claude-md.js +140 -0
- package/scripts/inject-settings-hooks.js +370 -0
- package/scripts/install.ps1 +146 -0
- package/scripts/install.sh +1729 -0
- package/scripts/monitor-arm-watch.js +155 -0
- package/scripts/rebuild-node-pty.sh +245 -0
- package/scripts/report.sh +232 -0
- package/scripts/shell-hook.fish +164 -0
- package/scripts/shell-hook.ps1 +33 -0
- package/scripts/shell-hook.sh +232 -0
- package/scripts/stream-events.js +399 -0
- package/scripts/terminal-wrapper.sh +36 -0
- package/scripts/test-enforcement.sh +132 -0
- package/scripts/test-install.sh +174 -0
- package/scripts/test-installer-parity.sh +135 -0
- package/scripts/test-template-enforcement.sh +76 -0
- package/scripts/uninstall.sh +143 -0
- package/scripts/update.sh +337 -0
- package/scripts/verify-release.sh +323 -0
- package/scripts/verify-wrapped.sh +194 -0
- package/templates/CLAUDE.global.md +135 -0
- package/templates/CLAUDE.project.md +37 -0
package/docs/index.html
ADDED
|
@@ -0,0 +1,716 @@
|
|
|
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>Claws — Terminal Control Bridge for VS Code</title>
|
|
7
|
+
<meta name="description" content="Control any VS Code terminal from the outside. List, create, send, execute, read, and close terminals via a JSON socket. Built for AI pair programming.">
|
|
8
|
+
<meta property="og:title" content="Claws — Terminal Control Bridge for VS Code">
|
|
9
|
+
<meta property="og:description" content="Control any VS Code terminal from the outside via a JSON socket. Built for AI pair programming with Claude Code.">
|
|
10
|
+
<meta property="og:image" content="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/social-preview.png">
|
|
11
|
+
<meta property="og:url" content="https://neunaha.github.io/claws">
|
|
12
|
+
<meta name="twitter:card" content="summary_large_image">
|
|
13
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
14
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
|
15
|
+
<style>
|
|
16
|
+
:root {
|
|
17
|
+
--bg: #0A0A0B;
|
|
18
|
+
--bg-2: #111113;
|
|
19
|
+
--bg-3: #1a1a1d;
|
|
20
|
+
--text: #F5EFE6;
|
|
21
|
+
--text-muted: #8A847B;
|
|
22
|
+
--accent: #C85A3E;
|
|
23
|
+
--accent-dim: rgba(200, 90, 62, 0.15);
|
|
24
|
+
--code-bg: #161618;
|
|
25
|
+
--border: #2a2a2d;
|
|
26
|
+
--font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
27
|
+
--mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
|
|
28
|
+
}
|
|
29
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
30
|
+
body {
|
|
31
|
+
background: var(--bg);
|
|
32
|
+
color: var(--text);
|
|
33
|
+
font-family: var(--font);
|
|
34
|
+
font-size: 16px;
|
|
35
|
+
line-height: 1.7;
|
|
36
|
+
-webkit-font-smoothing: antialiased;
|
|
37
|
+
}
|
|
38
|
+
a { color: var(--accent); text-decoration: none; }
|
|
39
|
+
a:hover { text-decoration: underline; }
|
|
40
|
+
|
|
41
|
+
/* Nav */
|
|
42
|
+
nav {
|
|
43
|
+
position: fixed; top: 0; width: 100%; z-index: 100;
|
|
44
|
+
background: rgba(10, 10, 11, 0.85);
|
|
45
|
+
backdrop-filter: blur(12px);
|
|
46
|
+
border-bottom: 1px solid var(--border);
|
|
47
|
+
padding: 14px 0;
|
|
48
|
+
}
|
|
49
|
+
nav .inner {
|
|
50
|
+
max-width: 1100px; margin: 0 auto; padding: 0 24px;
|
|
51
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
52
|
+
}
|
|
53
|
+
nav .logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
|
|
54
|
+
nav .logo img { width: 28px; height: 28px; border-radius: 6px; }
|
|
55
|
+
nav .links { display: flex; gap: 28px; font-size: 14px; color: var(--text-muted); }
|
|
56
|
+
nav .links a { color: var(--text-muted); }
|
|
57
|
+
nav .links a:hover { color: var(--text); text-decoration: none; }
|
|
58
|
+
.btn {
|
|
59
|
+
display: inline-block; padding: 10px 24px; border-radius: 8px;
|
|
60
|
+
font-weight: 600; font-size: 14px; transition: all 0.2s;
|
|
61
|
+
}
|
|
62
|
+
.btn-primary { background: var(--accent); color: white; }
|
|
63
|
+
.btn-primary:hover { background: #b5502f; text-decoration: none; }
|
|
64
|
+
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
|
|
65
|
+
.btn-ghost:hover { border-color: var(--text-muted); text-decoration: none; }
|
|
66
|
+
|
|
67
|
+
/* Hero */
|
|
68
|
+
.hero {
|
|
69
|
+
padding: 140px 24px 80px;
|
|
70
|
+
text-align: center;
|
|
71
|
+
max-width: 800px; margin: 0 auto;
|
|
72
|
+
}
|
|
73
|
+
.hero img.logo-img { width: 80px; height: 80px; margin-bottom: 24px; border-radius: 16px; }
|
|
74
|
+
.hero h1 { font-size: 52px; font-weight: 800; letter-spacing: -1.5px; margin-bottom: 16px; }
|
|
75
|
+
.hero h1 span { color: var(--accent); }
|
|
76
|
+
.hero p.sub { font-size: 20px; color: var(--text-muted); max-width: 600px; margin: 0 auto 32px; }
|
|
77
|
+
.hero .buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
|
|
78
|
+
.hero .badge-row { margin-top: 24px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
|
|
79
|
+
.hero .badge-row img { height: 22px; }
|
|
80
|
+
|
|
81
|
+
/* Sections */
|
|
82
|
+
section { padding: 80px 24px; max-width: 1100px; margin: 0 auto; }
|
|
83
|
+
section.alt { background: var(--bg-2); max-width: 100%; }
|
|
84
|
+
section.alt .inner { max-width: 1100px; margin: 0 auto; }
|
|
85
|
+
.section-label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); margin-bottom: 8px; }
|
|
86
|
+
h2 { font-size: 36px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 16px; }
|
|
87
|
+
h3 { font-size: 22px; font-weight: 600; margin-bottom: 8px; margin-top: 32px; }
|
|
88
|
+
p { margin-bottom: 16px; color: var(--text-muted); }
|
|
89
|
+
p strong { color: var(--text); }
|
|
90
|
+
|
|
91
|
+
/* Image */
|
|
92
|
+
.img-full {
|
|
93
|
+
width: 100%; border-radius: 12px; border: 1px solid var(--border);
|
|
94
|
+
margin: 24px 0; box-shadow: 0 4px 24px rgba(0,0,0,0.4);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Code */
|
|
98
|
+
pre {
|
|
99
|
+
background: var(--code-bg); border: 1px solid var(--border);
|
|
100
|
+
border-radius: 10px; padding: 20px 24px; overflow-x: auto;
|
|
101
|
+
font-family: var(--mono); font-size: 13px; line-height: 1.6;
|
|
102
|
+
margin: 16px 0 24px; color: var(--text);
|
|
103
|
+
}
|
|
104
|
+
code { font-family: var(--mono); font-size: 13px; }
|
|
105
|
+
p code { background: var(--code-bg); padding: 2px 6px; border-radius: 4px; }
|
|
106
|
+
|
|
107
|
+
/* Feature grid */
|
|
108
|
+
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 32px; }
|
|
109
|
+
.feature-card {
|
|
110
|
+
background: var(--bg-3); border: 1px solid var(--border);
|
|
111
|
+
border-radius: 12px; padding: 28px;
|
|
112
|
+
}
|
|
113
|
+
.feature-card h3 { margin-top: 0; font-size: 18px; }
|
|
114
|
+
.feature-card p { font-size: 14px; }
|
|
115
|
+
.feature-card .icon { font-size: 28px; margin-bottom: 12px; }
|
|
116
|
+
|
|
117
|
+
/* Case study */
|
|
118
|
+
.case-study {
|
|
119
|
+
background: var(--bg-3); border: 1px solid var(--border);
|
|
120
|
+
border-radius: 12px; padding: 32px; margin: 24px 0;
|
|
121
|
+
}
|
|
122
|
+
.case-study .label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); margin-bottom: 8px; }
|
|
123
|
+
.case-study h3 { margin-top: 0; }
|
|
124
|
+
|
|
125
|
+
/* Table */
|
|
126
|
+
table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 14px; }
|
|
127
|
+
th { text-align: left; padding: 10px 16px; border-bottom: 2px solid var(--border); color: var(--text); font-weight: 600; }
|
|
128
|
+
td { padding: 10px 16px; border-bottom: 1px solid var(--border); color: var(--text-muted); }
|
|
129
|
+
td code { background: var(--code-bg); padding: 2px 6px; border-radius: 4px; }
|
|
130
|
+
|
|
131
|
+
/* Footer */
|
|
132
|
+
footer {
|
|
133
|
+
border-top: 1px solid var(--border); padding: 40px 24px;
|
|
134
|
+
text-align: center; color: var(--text-muted); font-size: 14px;
|
|
135
|
+
}
|
|
136
|
+
footer a { color: var(--text-muted); }
|
|
137
|
+
|
|
138
|
+
/* Best practice cards */
|
|
139
|
+
.bp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
|
|
140
|
+
.bp-card { background: var(--bg-3); border-radius: 10px; padding: 20px; border-left: 3px solid var(--accent); }
|
|
141
|
+
.bp-card.dont { border-left-color: #e74c3c; }
|
|
142
|
+
.bp-card h4 { font-size: 14px; margin-bottom: 6px; }
|
|
143
|
+
.bp-card p { font-size: 13px; margin-bottom: 0; }
|
|
144
|
+
|
|
145
|
+
/* Logo glow */
|
|
146
|
+
.logo-glow {
|
|
147
|
+
animation: pulse-glow 3s ease-in-out infinite;
|
|
148
|
+
border-radius: 16px;
|
|
149
|
+
}
|
|
150
|
+
@keyframes pulse-glow {
|
|
151
|
+
0%, 100% { box-shadow: 0 0 30px rgba(200,90,62,0.3); }
|
|
152
|
+
50% { box-shadow: 0 0 60px rgba(200,90,62,0.6), 0 0 100px rgba(200,90,62,0.2); }
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* Scroll reveal */
|
|
156
|
+
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
|
|
157
|
+
.reveal.visible { opacity: 1; transform: translateY(0); }
|
|
158
|
+
|
|
159
|
+
/* Stats bar */
|
|
160
|
+
.stats-bar {
|
|
161
|
+
display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
|
|
162
|
+
padding: 40px 24px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
|
|
163
|
+
margin: 0 auto; max-width: 900px;
|
|
164
|
+
}
|
|
165
|
+
.stat { text-align: center; }
|
|
166
|
+
.stat .num { font-size: 36px; font-weight: 800; color: var(--accent); font-family: var(--mono); }
|
|
167
|
+
.stat .label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
|
|
168
|
+
|
|
169
|
+
/* Image carousel */
|
|
170
|
+
.carousel {
|
|
171
|
+
position: relative; overflow: hidden; border-radius: 12px;
|
|
172
|
+
border: 1px solid var(--border); margin: 32px 0;
|
|
173
|
+
box-shadow: 0 8px 40px rgba(0,0,0,0.5);
|
|
174
|
+
}
|
|
175
|
+
.carousel-track {
|
|
176
|
+
display: flex; transition: transform 0.5s ease;
|
|
177
|
+
}
|
|
178
|
+
.carousel-track img {
|
|
179
|
+
min-width: 100%; height: auto; display: block;
|
|
180
|
+
}
|
|
181
|
+
.carousel-dots {
|
|
182
|
+
display: flex; justify-content: center; gap: 8px;
|
|
183
|
+
padding: 12px 0;
|
|
184
|
+
}
|
|
185
|
+
.carousel-dot {
|
|
186
|
+
width: 10px; height: 10px; border-radius: 50%;
|
|
187
|
+
background: var(--border); cursor: pointer; border: none;
|
|
188
|
+
transition: background 0.3s;
|
|
189
|
+
}
|
|
190
|
+
.carousel-dot.active { background: var(--accent); }
|
|
191
|
+
|
|
192
|
+
/* Floating label badges */
|
|
193
|
+
.tech-badge {
|
|
194
|
+
display: inline-flex; align-items: center; gap: 6px;
|
|
195
|
+
background: var(--bg-3); border: 1px solid var(--border);
|
|
196
|
+
border-radius: 20px; padding: 6px 14px; font-size: 13px;
|
|
197
|
+
color: var(--text-muted); margin: 4px;
|
|
198
|
+
}
|
|
199
|
+
.tech-badge svg { width: 16px; height: 16px; fill: currentColor; }
|
|
200
|
+
.tech-badge.accent { border-color: var(--accent); color: var(--accent); }
|
|
201
|
+
|
|
202
|
+
/* Feature card hover */
|
|
203
|
+
.feature-card { transition: transform 0.2s, border-color 0.2s; }
|
|
204
|
+
.feature-card:hover { transform: translateY(-4px); border-color: var(--accent); }
|
|
205
|
+
|
|
206
|
+
/* Typing animation for code */
|
|
207
|
+
.typing { border-right: 2px solid var(--accent); animation: blink 1s infinite; display: inline; }
|
|
208
|
+
@keyframes blink { 0%, 100% { border-color: var(--accent); } 50% { border-color: transparent; } }
|
|
209
|
+
|
|
210
|
+
@media (max-width: 768px) {
|
|
211
|
+
.hero h1 { font-size: 36px; }
|
|
212
|
+
.hero p.sub { font-size: 17px; }
|
|
213
|
+
.features { grid-template-columns: 1fr; }
|
|
214
|
+
.bp-grid { grid-template-columns: 1fr; }
|
|
215
|
+
nav .links { display: none; }
|
|
216
|
+
.stats-bar { gap: 24px; }
|
|
217
|
+
.stat .num { font-size: 28px; }
|
|
218
|
+
}
|
|
219
|
+
</style>
|
|
220
|
+
</head>
|
|
221
|
+
<body>
|
|
222
|
+
|
|
223
|
+
<nav>
|
|
224
|
+
<div class="inner">
|
|
225
|
+
<div class="logo">
|
|
226
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/extension/icon.png" alt="Claws">
|
|
227
|
+
Claws
|
|
228
|
+
</div>
|
|
229
|
+
<div class="links">
|
|
230
|
+
<a href="#features">Features</a>
|
|
231
|
+
<a href="#how-it-works">How It Works</a>
|
|
232
|
+
<a href="#best-practices">Best Practices</a>
|
|
233
|
+
<a href="#case-studies">Case Studies</a>
|
|
234
|
+
<a href="https://github.com/neunaha/claws">GitHub</a>
|
|
235
|
+
</div>
|
|
236
|
+
<a href="https://github.com/neunaha/claws#install" class="btn btn-primary">Get Started</a>
|
|
237
|
+
</div>
|
|
238
|
+
</nav>
|
|
239
|
+
|
|
240
|
+
<!-- Hero -->
|
|
241
|
+
<div style="position: relative; padding-top: 60px; overflow: hidden;">
|
|
242
|
+
<!-- Cinematic background -->
|
|
243
|
+
<div style="position: relative;">
|
|
244
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/hero-cinematic.png" alt="Claws — Terminal Orchestration" style="width: 100%; display: block; opacity: 0.6;">
|
|
245
|
+
<div style="position: absolute; bottom: 0; left: 0; right: 0; height: 60%; background: linear-gradient(transparent, var(--bg));"></div>
|
|
246
|
+
</div>
|
|
247
|
+
|
|
248
|
+
<!-- Hero content overlaid -->
|
|
249
|
+
<div style="position: relative; text-align: center; max-width: 900px; margin: -200px auto 0; padding: 0 24px 60px; z-index: 2;">
|
|
250
|
+
<img class="logo-glow" src="https://raw.githubusercontent.com/neunaha/claws/main/extension/icon.png" alt="Claws" style="width: 80px; height: 80px; margin-bottom: 20px;">
|
|
251
|
+
<h1 style="font-size: 56px; font-weight: 800; letter-spacing: -2px; margin-bottom: 12px; line-height: 1.1;">
|
|
252
|
+
Your AI just got<br><span style="color: var(--accent);">terminal superpowers</span>.
|
|
253
|
+
</h1>
|
|
254
|
+
<p style="font-size: 20px; color: var(--text-muted); max-width: 650px; margin: 0 auto 12px; line-height: 1.6;">
|
|
255
|
+
One extension. One socket. Full control over every VS Code terminal from the outside. Your AI writes code in one terminal, tests in another, deploys in a third — while you watch.
|
|
256
|
+
</p>
|
|
257
|
+
<p style="font-size: 15px; color: var(--accent); font-family: var(--mono); margin-bottom: 16px;">
|
|
258
|
+
one command · zero dependencies · terminal transforms instantly
|
|
259
|
+
</p>
|
|
260
|
+
<p style="font-size: 14px; color: var(--text-muted); margin-bottom: 8px;">Paste this into any Claude Code terminal:</p>
|
|
261
|
+
<pre style="background: var(--code-bg); border: 2px solid var(--accent); border-radius: 10px; padding: 16px 24px; display: inline-block; text-align: left; font-size: 15px; margin-bottom: 8px; max-width: 750px; cursor: pointer; position: relative;" onclick="navigator.clipboard.writeText('install claws from https://github.com/neunaha/claws — run the install script and set up everything'); this.style.borderColor='#4ade80'; setTimeout(()=>this.style.borderColor='#C85A3E',1500);">install claws from https://github.com/neunaha/claws — run the install script and set up everything</pre>
|
|
262
|
+
<p style="font-size: 12px; color: var(--text-muted); margin-bottom: 20px;">click to copy</p>
|
|
263
|
+
<div style="display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;">
|
|
264
|
+
<a href="https://github.com/neunaha/claws#install" class="btn btn-primary" style="padding: 14px 32px; font-size: 16px;">Get Started — 30 seconds</a>
|
|
265
|
+
<a href="https://github.com/neunaha/claws" class="btn btn-ghost" style="padding: 14px 32px; font-size: 16px;">Star on GitHub</a>
|
|
266
|
+
</div>
|
|
267
|
+
<div style="margin-top: 20px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;">
|
|
268
|
+
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT">
|
|
269
|
+
<img src="https://img.shields.io/badge/VS%20Code-1.93+-007ACC.svg" alt="VS Code">
|
|
270
|
+
<img src="https://img.shields.io/badge/dependencies-zero-brightgreen.svg" alt="Zero deps">
|
|
271
|
+
<img src="https://img.shields.io/badge/Node.js-only-339933.svg" alt="Node.js">
|
|
272
|
+
<img src="https://img.shields.io/badge/Python-not%20required-lightgrey.svg" alt="No Python">
|
|
273
|
+
<img src="https://img.shields.io/github/stars/neunaha/claws?style=social" alt="Stars">
|
|
274
|
+
</div>
|
|
275
|
+
</div>
|
|
276
|
+
</div>
|
|
277
|
+
|
|
278
|
+
<!-- Before/After -->
|
|
279
|
+
<section style="padding: 40px 24px 20px; max-width: 1100px; margin: 0 auto;" class="reveal">
|
|
280
|
+
<div class="section-label" style="text-align: center;">The Problem → The Solution</div>
|
|
281
|
+
<img class="img-full" src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/before-after.png" alt="Before and After Claws">
|
|
282
|
+
<p style="text-align: center; max-width: 700px; margin: 0 auto;">
|
|
283
|
+
<strong>Before:</strong> copy-paste loop between Claude and terminal. One terminal. No visibility.<br>
|
|
284
|
+
<strong>After:</strong> your AI controls every terminal directly. Parallel workers. Full visibility. You just watch.
|
|
285
|
+
</p>
|
|
286
|
+
</section>
|
|
287
|
+
|
|
288
|
+
<!-- Install Flow -->
|
|
289
|
+
<section style="padding: 20px 24px 40px; max-width: 1100px; margin: 0 auto;" class="reveal">
|
|
290
|
+
<div class="section-label" style="text-align: center;">Get Started in 3 Steps</div>
|
|
291
|
+
<h2 style="text-align: center;">Install → Reload → Ready</h2>
|
|
292
|
+
<img class="img-full" src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/install-flow.png" alt="Install Flow">
|
|
293
|
+
<p style="text-align: center; color: var(--text-muted);">Zero dependencies. No Python. No pip. No brew. Just Node.js (ships with VS Code).</p>
|
|
294
|
+
</section>
|
|
295
|
+
|
|
296
|
+
<!-- What You See -->
|
|
297
|
+
<section style="padding: 20px 24px 40px; max-width: 1100px; margin: 0 auto;" class="reveal">
|
|
298
|
+
<div class="section-label" style="text-align: center;">What You'll See</div>
|
|
299
|
+
<h2 style="text-align: center;">Your terminal transforms</h2>
|
|
300
|
+
<img class="img-full" src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/what-you-see.png" alt="What You See After Install">
|
|
301
|
+
<p style="text-align: center; color: var(--text-muted);">CLAWS banner in every terminal. Worker tabs in the panel. "Claws Wrapped Terminal" in the dropdown. Shell commands ready.</p>
|
|
302
|
+
</section>
|
|
303
|
+
|
|
304
|
+
<!-- Stats bar -->
|
|
305
|
+
<div class="stats-bar reveal">
|
|
306
|
+
<div class="stat"><div class="num">8</div><div class="label">Terminal Control Tools</div></div>
|
|
307
|
+
<div class="stat"><div class="num">0</div><div class="label">Dependencies</div></div>
|
|
308
|
+
<div class="stat"><div class="num">30s</div><div class="label">Install Time</div></div>
|
|
309
|
+
<div class="stat"><div class="num">5</div><div class="label">Lines to Full Control</div></div>
|
|
310
|
+
</div>
|
|
311
|
+
|
|
312
|
+
<!-- Tech badges -->
|
|
313
|
+
<div style="text-align: center; padding: 32px 24px;" class="reveal">
|
|
314
|
+
<span class="tech-badge accent">▶ VS Code Extension</span>
|
|
315
|
+
<span class="tech-badge accent">⚙ Node.js Only</span>
|
|
316
|
+
<span class="tech-badge">📡 MCP Server</span>
|
|
317
|
+
<span class="tech-badge">🔒 Safety Gate</span>
|
|
318
|
+
<span class="tech-badge">📄 Pty Capture</span>
|
|
319
|
+
<span class="tech-badge">⚙ File-Based Exec</span>
|
|
320
|
+
<span class="tech-badge">📋 Bracketed Paste</span>
|
|
321
|
+
<span class="tech-badge">🌐 Cross-Device (planned)</span>
|
|
322
|
+
</div>
|
|
323
|
+
|
|
324
|
+
<!-- Image carousel — all architecture diagrams -->
|
|
325
|
+
<section style="padding-top: 20px;" class="reveal">
|
|
326
|
+
<div class="section-label" style="text-align: center;">Visual Overview</div>
|
|
327
|
+
<h2 style="text-align: center;">See the full architecture</h2>
|
|
328
|
+
<div class="carousel" id="archCarousel">
|
|
329
|
+
<div class="carousel-track" id="archTrack">
|
|
330
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/before-after.png" alt="Before and After">
|
|
331
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/architecture.png" alt="Architecture">
|
|
332
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/wrapped-terminal.png" alt="Wrapped Terminal">
|
|
333
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/what-you-see.png" alt="What You See">
|
|
334
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/ai-orchestration.png" alt="AI Orchestration">
|
|
335
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/slash-commands.png" alt="Slash Commands">
|
|
336
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/install-flow.png" alt="Install Flow">
|
|
337
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/zero-dep-install.png" alt="Zero Dependencies">
|
|
338
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/cross-device.png" alt="Cross-Device">
|
|
339
|
+
</div>
|
|
340
|
+
</div>
|
|
341
|
+
<div class="carousel-dots" id="archDots"></div>
|
|
342
|
+
</section>
|
|
343
|
+
|
|
344
|
+
<!-- Problem/Solution -->
|
|
345
|
+
<section class="reveal">
|
|
346
|
+
<div class="section-label">Before Claws vs After</div>
|
|
347
|
+
<h2>VS Code terminals were a black box. Not anymore.</h2>
|
|
348
|
+
<p>Every developer runs code, builds, AI agents, and servers inside VS Code terminals. But there was <strong>no programmatic API to control them from the outside</strong>. You couldn't list what's running. Couldn't send a command from a script. Couldn't read the output of an interactive TUI session.</p>
|
|
349
|
+
<p><strong>Claws changes that with one extension and 5 lines of code.</strong> A socket server inside VS Code accepts JSON commands from any external process — Python scripts, AI orchestrators, CI runners, or other machines on your network.</p>
|
|
350
|
+
<pre>// Raw socket — works from any language
|
|
351
|
+
echo '{"id":1,"cmd":"create","name":"build","wrapped":true}' | nc -U .claws/claws.sock
|
|
352
|
+
echo '{"id":2,"cmd":"exec","id":"1","command":"npm test"}' | nc -U .claws/claws.sock
|
|
353
|
+
echo '{"id":3,"cmd":"close","id":"1"}' | nc -U .claws/claws.sock
|
|
354
|
+
|
|
355
|
+
// Or via MCP — Claude Code gets 8 tools natively, zero code needed</pre>
|
|
356
|
+
</section>
|
|
357
|
+
|
|
358
|
+
<!-- Architecture -->
|
|
359
|
+
<section class="alt" id="how-it-works">
|
|
360
|
+
<div class="inner">
|
|
361
|
+
<div class="section-label">Architecture</div>
|
|
362
|
+
<h2>How Claws works</h2>
|
|
363
|
+
<p>Claws runs inside VS Code as an extension. It creates a Unix socket server that external clients connect to. Wrapped terminals capture full pty output via <code>script(1)</code> — readable even for TUI sessions like Claude Code, vim, and htop.</p>
|
|
364
|
+
<img class="img-full" src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/architecture.png" alt="Claws Architecture">
|
|
365
|
+
</div>
|
|
366
|
+
</section>
|
|
367
|
+
|
|
368
|
+
<!-- Wrapped Terminals -->
|
|
369
|
+
<section>
|
|
370
|
+
<div class="section-label">Core Feature</div>
|
|
371
|
+
<h2>Wrapped Terminals — read everything</h2>
|
|
372
|
+
<p>Regular terminals are write-only from the outside. Wrapped terminals log every pty byte to disk. Claws reads it back with ANSI escapes stripped — giving you <strong>clean text of everything that happened</strong>, including interactive TUI sessions.</p>
|
|
373
|
+
<img class="img-full" src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/wrapped-terminal.png" alt="Wrapped Terminal Data Flow">
|
|
374
|
+
<p>The terminal looks and behaves identically to a regular one. The <code>script(1)</code> layer is invisible. Create one from the dropdown: <strong>Claws Wrapped Terminal</strong>.</p>
|
|
375
|
+
</section>
|
|
376
|
+
|
|
377
|
+
<!-- Capabilities Carousel -->
|
|
378
|
+
<section class="alt" id="features">
|
|
379
|
+
<div class="inner reveal">
|
|
380
|
+
<div class="section-label" style="text-align:center;">Capabilities</div>
|
|
381
|
+
<h2 style="text-align:center;">Everything you can do</h2>
|
|
382
|
+
<p style="text-align:center; max-width:600px; margin:0 auto 32px;">Each capability is a building block. Compose them to orchestrate any terminal workflow — from a single command to a fleet of autonomous AI workers.</p>
|
|
383
|
+
|
|
384
|
+
<div class="carousel" id="capCarousel" style="border:none; box-shadow:none; background:transparent;">
|
|
385
|
+
<div class="carousel-track" id="capTrack">
|
|
386
|
+
<!-- Slide 1 -->
|
|
387
|
+
<div style="min-width:100%; padding:0 24px;">
|
|
388
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/cap-terminal-mgmt.png" alt="Terminal Management" style="width:100%; border-radius:12px; border:1px solid var(--border); box-shadow: 0 8px 40px rgba(0,0,0,0.5);">
|
|
389
|
+
<div style="text-align:center; margin-top:20px;">
|
|
390
|
+
<h3 style="margin-top:0; font-size:24px;">Terminal Management</h3>
|
|
391
|
+
<p style="max-width:500px; margin:8px auto 0;">List every terminal with PID, name, and status. Create new ones with custom names and working directories. Focus, show, or close any terminal programmatically. Stable numeric IDs that persist for the session.</p>
|
|
392
|
+
</div>
|
|
393
|
+
</div>
|
|
394
|
+
<!-- Slide 2 -->
|
|
395
|
+
<div style="min-width:100%; padding:0 24px;">
|
|
396
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/cap-pty-capture.png" alt="Full Pty Capture" style="width:100%; border-radius:12px; border:1px solid var(--border); box-shadow: 0 8px 40px rgba(0,0,0,0.5);">
|
|
397
|
+
<div style="text-align:center; margin-top:20px;">
|
|
398
|
+
<h3 style="margin-top:0; font-size:24px;">Full Pty Capture</h3>
|
|
399
|
+
<p style="max-width:500px; margin:8px auto 0;">Wrapped terminals log every pty byte via <code>script(1)</code>. Read back Claude Code conversations, vim sessions, build logs, REPL outputs — all as clean ANSI-stripped text. The terminal looks and feels completely normal.</p>
|
|
400
|
+
</div>
|
|
401
|
+
</div>
|
|
402
|
+
<!-- Slide 3 -->
|
|
403
|
+
<div style="min-width:100%; padding:0 24px;">
|
|
404
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/cap-exec.png" alt="Command Execution" style="width:100%; border-radius:12px; border:1px solid var(--border); box-shadow: 0 8px 40px rgba(0,0,0,0.5);">
|
|
405
|
+
<div style="text-align:center; margin-top:20px;">
|
|
406
|
+
<h3 style="margin-top:0; font-size:24px;">Command Execution</h3>
|
|
407
|
+
<p style="max-width:500px; margin:8px auto 0;">Run commands and get structured results: stdout, stderr, and exit code. File-based capture that works in every terminal type — no shell integration dependency. Configurable timeouts for long-running processes.</p>
|
|
408
|
+
</div>
|
|
409
|
+
</div>
|
|
410
|
+
<!-- Slide 4 -->
|
|
411
|
+
<div style="min-width:100%; padding:0 24px;">
|
|
412
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/cap-safety.png" alt="Safety Gate" style="width:100%; border-radius:12px; border:1px solid var(--border); box-shadow: 0 8px 40px rgba(0,0,0,0.5);">
|
|
413
|
+
<div style="text-align:center; margin-top:20px;">
|
|
414
|
+
<h3 style="margin-top:0; font-size:24px;">Safety Gate</h3>
|
|
415
|
+
<p style="max-width:500px; margin:8px auto 0;">Detects when a terminal is running a TUI (vim, claude, less, htop). Warns before sending text that would land as TUI input instead of a shell command. Non-blocking by default. Strict mode available for hard-block.</p>
|
|
416
|
+
</div>
|
|
417
|
+
</div>
|
|
418
|
+
<!-- Slide 5 -->
|
|
419
|
+
<div style="min-width:100%; padding:0 24px;">
|
|
420
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/cap-mcp.png" alt="MCP Server" style="width:100%; border-radius:12px; border:1px solid var(--border); box-shadow: 0 8px 40px rgba(0,0,0,0.5);">
|
|
421
|
+
<div style="text-align:center; margin-top:20px;">
|
|
422
|
+
<h3 style="margin-top:0; font-size:24px;">MCP Server — Native AI Integration</h3>
|
|
423
|
+
<p style="max-width:500px; margin:8px auto 0;">Register one JSON block in any project's settings. Claude Code instantly gets 8 terminal control tools as native MCP calls. No imports, no client library, no socket code. Your AI gets terminal superpowers in one line.</p>
|
|
424
|
+
</div>
|
|
425
|
+
</div>
|
|
426
|
+
<!-- Slide 6 -->
|
|
427
|
+
<div style="min-width:100%; padding:0 24px;">
|
|
428
|
+
<img src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/cap-crossdevice.png" alt="Cross-Device Control" style="width:100%; border-radius:12px; border:1px solid var(--border); box-shadow: 0 8px 40px rgba(0,0,0,0.5);">
|
|
429
|
+
<div style="text-align:center; margin-top:20px;">
|
|
430
|
+
<h3 style="margin-top:0; font-size:24px;">Cross-Device Control</h3>
|
|
431
|
+
<p style="max-width:500px; margin:8px auto 0;">Control terminals on remote machines via WebSocket with token auth + TLS. Team configuration with per-device access control. SSH tunnel pattern works today. WebSocket transport coming in v0.3.</p>
|
|
432
|
+
</div>
|
|
433
|
+
</div>
|
|
434
|
+
</div>
|
|
435
|
+
</div>
|
|
436
|
+
<div class="carousel-dots" id="capDots"></div>
|
|
437
|
+
</div>
|
|
438
|
+
</section>
|
|
439
|
+
|
|
440
|
+
<!-- Protocol -->
|
|
441
|
+
<section>
|
|
442
|
+
<div class="section-label">Protocol</div>
|
|
443
|
+
<h2>Simple JSON over Unix socket</h2>
|
|
444
|
+
<p>Newline-delimited JSON. Every request has an <code>id</code> for correlation. Works with any language that can open a socket.</p>
|
|
445
|
+
<table>
|
|
446
|
+
<thead>
|
|
447
|
+
<tr><th>Command</th><th>Input</th><th>Output</th></tr>
|
|
448
|
+
</thead>
|
|
449
|
+
<tbody>
|
|
450
|
+
<tr><td><code>list</code></td><td><code>{}</code></td><td>All terminals with PID, name, log path</td></tr>
|
|
451
|
+
<tr><td><code>create</code></td><td><code>{name, wrapped?}</code></td><td>Terminal ID + log path</td></tr>
|
|
452
|
+
<tr><td><code>send</code></td><td><code>{id, text}</code></td><td>Delivered to terminal input</td></tr>
|
|
453
|
+
<tr><td><code>exec</code></td><td><code>{id, command}</code></td><td>stdout + stderr + exit code</td></tr>
|
|
454
|
+
<tr><td><code>readLog</code></td><td><code>{id}</code></td><td>Clean text from pty log</td></tr>
|
|
455
|
+
<tr><td><code>poll</code></td><td><code>{since?}</code></td><td>Command-completion events</td></tr>
|
|
456
|
+
<tr><td><code>close</code></td><td><code>{id}</code></td><td>Terminal disposed</td></tr>
|
|
457
|
+
</tbody>
|
|
458
|
+
</table>
|
|
459
|
+
<img class="img-full" src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/protocol-flow.png" alt="Protocol Request/Response Flow">
|
|
460
|
+
<p><a href="https://github.com/neunaha/claws/blob/main/docs/protocol.md">Full protocol specification →</a></p>
|
|
461
|
+
</section>
|
|
462
|
+
|
|
463
|
+
<!-- AI Orchestration -->
|
|
464
|
+
<section class="alt">
|
|
465
|
+
<div class="inner">
|
|
466
|
+
<div class="section-label">AI Pair Programming</div>
|
|
467
|
+
<h2>Built for autonomous agent orchestration</h2>
|
|
468
|
+
<p>Claws was designed for a specific use case: <strong>one AI session controlling multiple terminal sessions in parallel</strong>. Spawn workers, send mission prompts, monitor progress via pty log tailing, react to errors in real time, clean up when done.</p>
|
|
469
|
+
<img class="img-full" src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/ai-orchestration.png" alt="AI Orchestration Pattern">
|
|
470
|
+
<pre># Spawn 3 parallel workers
|
|
471
|
+
workers = {}
|
|
472
|
+
for name, cmd in [("lint", "npm run lint"), ("test", "npm test"), ("build", "npm run build")]:
|
|
473
|
+
term = client.create(f"worker-{name}", wrapped=True)
|
|
474
|
+
client.send(term.id, cmd)
|
|
475
|
+
workers[name] = term
|
|
476
|
+
|
|
477
|
+
# Monitor all workers
|
|
478
|
+
import time
|
|
479
|
+
time.sleep(10)
|
|
480
|
+
for name, term in workers.items():
|
|
481
|
+
log = client.read_log(term.id, lines=20)
|
|
482
|
+
print(f"=== {name} ===\n{log}")
|
|
483
|
+
client.close(term.id)</pre>
|
|
484
|
+
</div>
|
|
485
|
+
</section>
|
|
486
|
+
|
|
487
|
+
<!-- Best Practices -->
|
|
488
|
+
<section id="best-practices">
|
|
489
|
+
<div class="section-label">Best Practices</div>
|
|
490
|
+
<h2>Getting the most out of Claws</h2>
|
|
491
|
+
|
|
492
|
+
<div class="bp-grid">
|
|
493
|
+
<div class="bp-card">
|
|
494
|
+
<h4>Always use wrapped terminals for AI workers</h4>
|
|
495
|
+
<p>Without wrapping, you can send but can't read. Every autonomous worker should be <code>wrapped: true</code> so you can observe its state.</p>
|
|
496
|
+
</div>
|
|
497
|
+
<div class="bp-card">
|
|
498
|
+
<h4>Use stable IDs, not names</h4>
|
|
499
|
+
<p>Terminal names can be duplicated or changed. The numeric ID from <code>create</code> is unique and stable for the terminal's lifetime.</p>
|
|
500
|
+
</div>
|
|
501
|
+
<div class="bp-card">
|
|
502
|
+
<h4>Clean up terminals when done</h4>
|
|
503
|
+
<p>Every <code>create</code> should have a matching <code>close</code>. Stale terminals clutter the panel and leak pty log disk space.</p>
|
|
504
|
+
</div>
|
|
505
|
+
<div class="bp-card">
|
|
506
|
+
<h4>Use exec for shell commands, send for TUI input</h4>
|
|
507
|
+
<p><code>exec</code> captures output and waits. <code>send</code> is fire-and-forget. Use the right tool for the job.</p>
|
|
508
|
+
</div>
|
|
509
|
+
<div class="bp-card">
|
|
510
|
+
<h4>Add .claws/ to .gitignore</h4>
|
|
511
|
+
<p>Pty logs can contain passwords, tokens, and secrets. Never commit them. The default <code>.gitignore</code> already excludes <code>.claws/</code>.</p>
|
|
512
|
+
</div>
|
|
513
|
+
<div class="bp-card">
|
|
514
|
+
<h4>Monitor with tail + grep, not polling</h4>
|
|
515
|
+
<p>For real-time observation, <code>tail -F logfile | grep --line-buffered pattern</code> is more responsive than periodic <code>readLog</code> calls.</p>
|
|
516
|
+
</div>
|
|
517
|
+
<div class="bp-card dont">
|
|
518
|
+
<h4>Don't use script -F with TUI sessions</h4>
|
|
519
|
+
<p>The <code>-F</code> flush flag splits Ink-based TUI frames and causes visual corruption in Claude Code. Default buffering is correct.</p>
|
|
520
|
+
</div>
|
|
521
|
+
<div class="bp-card dont">
|
|
522
|
+
<h4>Don't send into terminals you can't observe</h4>
|
|
523
|
+
<p>If you don't know what's running in a terminal (shell vs TUI), check with <code>list</code> first. Blind sends into unknown TUIs corrupt their input state.</p>
|
|
524
|
+
</div>
|
|
525
|
+
</div>
|
|
526
|
+
</section>
|
|
527
|
+
|
|
528
|
+
<!-- Case Studies -->
|
|
529
|
+
<section class="alt" id="case-studies">
|
|
530
|
+
<div class="inner">
|
|
531
|
+
<div class="section-label">Case Studies</div>
|
|
532
|
+
<h2>Real-world usage patterns</h2>
|
|
533
|
+
|
|
534
|
+
<div class="case-study">
|
|
535
|
+
<div class="label">Case Study 1</div>
|
|
536
|
+
<h3>AI Pair Programming — Parallel Codebase Audit</h3>
|
|
537
|
+
<p>An orchestrator spawned 3 wrapped terminals simultaneously, each running an independent analysis task (latency profiling, token auditing, critical-path optimization). Each worker received a scoped mission prompt via <code>send</code>, ran autonomously for ~5 minutes, and wrote its findings to a designated output file. The orchestrator monitored all 3 via <code>tail -F</code> on their pty logs, reacting to events as they arrived. Total: 3 audit reports (140 + 265 + 420 lines) produced in parallel in ~6 minutes.</p>
|
|
538
|
+
</div>
|
|
539
|
+
|
|
540
|
+
<div class="case-study">
|
|
541
|
+
<div class="label">Case Study 2</div>
|
|
542
|
+
<h3>Multi-Commit Implementation Fleet</h3>
|
|
543
|
+
<p>A single worker terminal received a mission to ship 6 atomic git commits implementing pipeline optimizations. The worker read prior analysis files, edited runbooks and Python code, ran verification after each commit, and produced 6 clean commits in 6 minutes 42 seconds — 393 insertions across committee.py, 4 runbook YAMLs, and a cost-log hook. The orchestrator monitored via pty log events and narrated each commit as it landed.</p>
|
|
544
|
+
</div>
|
|
545
|
+
|
|
546
|
+
<div class="case-study">
|
|
547
|
+
<div class="label">Case Study 3</div>
|
|
548
|
+
<h3>Full Infographic Pipeline Test</h3>
|
|
549
|
+
<p>The orchestrator created a wrapped terminal, launched Claude Code inside it, and fired a <code>/infographic-new</code> command — triggering a 10-tier content generation pipeline. The orchestrator monitored tier-by-tier progress via background polling tasks, inspected intermediate artifacts (research JSON, angle selection, design brief, jury verdicts), and read the final committee verdict + 30/30 visual critic score. Total pipeline time: 25 minutes. Result: a production-ready infographic with committee composite score 8.56.</p>
|
|
550
|
+
</div>
|
|
551
|
+
|
|
552
|
+
<div class="case-study">
|
|
553
|
+
<div class="label">Case Study 4</div>
|
|
554
|
+
<h3>Graphify-Driven Code Optimization</h3>
|
|
555
|
+
<p>A worker terminal was directed to use a knowledge graph (graphify) as its primary reasoning surface to identify pipeline bottlenecks. The worker ran graph queries to surface god nodes, cross-file dependencies, and prior audit findings — producing a 100-line optimization plan that identified $30/run savings from CLAUDE.md trimming, $5.69/run from committee-chair fusion, and a $165 cache-read tax that no top-down code review would have surfaced. The graph-derived insights validated 2 of the 5 optimization proposals independently.</p>
|
|
556
|
+
</div>
|
|
557
|
+
</div>
|
|
558
|
+
</section>
|
|
559
|
+
|
|
560
|
+
<!-- Cross-Device -->
|
|
561
|
+
<section>
|
|
562
|
+
<div class="section-label">Coming Soon</div>
|
|
563
|
+
<h2>Cross-device terminal control</h2>
|
|
564
|
+
<p>Control terminals on remote machines via WebSocket. Token-based auth + TLS. Discover other Claws instances on your LAN automatically.</p>
|
|
565
|
+
<img class="img-full" src="https://raw.githubusercontent.com/neunaha/claws/main/docs/images/cross-device.png" alt="Cross-Device Architecture">
|
|
566
|
+
<p><strong>Available today via SSH tunnel:</strong></p>
|
|
567
|
+
<pre>ssh -L /tmp/remote-claws.sock:/remote/workspace/.claws/claws.sock user@remote
|
|
568
|
+
# Then connect locally via raw socket or MCP
|
|
569
|
+
echo '{"id":1,"cmd":"list"}' | nc -U /tmp/remote-claws.sock</pre>
|
|
570
|
+
</section>
|
|
571
|
+
|
|
572
|
+
<!-- MCP Server -->
|
|
573
|
+
<section class="alt">
|
|
574
|
+
<div class="inner">
|
|
575
|
+
<div class="section-label">Instant Integration</div>
|
|
576
|
+
<h2>MCP Server — Claude Code gets terminal control natively</h2>
|
|
577
|
+
<p>Register Claws as an MCP server in any project. <strong>Every Claude Code session instantly gets 8 terminal control tools</strong> — no client library, no imports, no socket code. Just register and go.</p>
|
|
578
|
+
<pre>// .claude/settings.json (add to ANY project)
|
|
579
|
+
{
|
|
580
|
+
"mcpServers": {
|
|
581
|
+
"claws": {
|
|
582
|
+
"command": "node",
|
|
583
|
+
"args": ["/path/to/claws/mcp_server.js"],
|
|
584
|
+
"env": { "CLAWS_SOCKET": ".claws/claws.sock" }
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
}</pre>
|
|
588
|
+
<p>Tools injected: <code>claws_list</code> <code>claws_create</code> <code>claws_send</code> <code>claws_exec</code> <code>claws_read_log</code> <code>claws_poll</code> <code>claws_close</code> <code>claws_worker</code></p>
|
|
589
|
+
<p>Zero dependencies. Pure Node.js. Works on macOS and Linux. Your AI writes code in one terminal, tests in another, deploys in a third — all through native MCP tool calls.</p>
|
|
590
|
+
</div>
|
|
591
|
+
</section>
|
|
592
|
+
|
|
593
|
+
<!-- Documentation Hub -->
|
|
594
|
+
<section id="docs">
|
|
595
|
+
<div class="section-label">Documentation</div>
|
|
596
|
+
<h2>Everything you need to master Claws</h2>
|
|
597
|
+
<div class="features">
|
|
598
|
+
<div class="feature-card">
|
|
599
|
+
<div class="icon">📚</div>
|
|
600
|
+
<h3><a href="https://github.com/neunaha/claws/blob/main/docs/guide.md">The Complete Guide</a></h3>
|
|
601
|
+
<p>12-chapter course from first install to production fleet orchestration. Every feature, pattern, and edge case. 830 lines of detailed walkthroughs.</p>
|
|
602
|
+
</div>
|
|
603
|
+
<div class="feature-card">
|
|
604
|
+
<div class="icon">🔧</div>
|
|
605
|
+
<h3><a href="https://github.com/neunaha/claws/blob/main/docs/features.md">Feature Reference</a></h3>
|
|
606
|
+
<p>Every command, parameter, response field, and edge case. The API reference for builders integrating Claws.</p>
|
|
607
|
+
</div>
|
|
608
|
+
<div class="feature-card">
|
|
609
|
+
<div class="icon">📡</div>
|
|
610
|
+
<h3><a href="https://github.com/neunaha/claws/blob/main/docs/protocol.md">Protocol Spec</a></h3>
|
|
611
|
+
<p>Full JSON socket protocol — 8 commands, request/response schemas, error codes, interactive session transcript.</p>
|
|
612
|
+
</div>
|
|
613
|
+
<div class="feature-card">
|
|
614
|
+
<div class="icon">💡</div>
|
|
615
|
+
<h3><a href="https://github.com/neunaha/claws/blob/main/.claude/skills/prompt-templates/SKILL.md">Prompt Templates</a></h3>
|
|
616
|
+
<p>7 battle-tested mission prompt templates for AI orchestration: workers, fleets, pair programming, debugging.</p>
|
|
617
|
+
</div>
|
|
618
|
+
<div class="feature-card">
|
|
619
|
+
<div class="icon">🚀</div>
|
|
620
|
+
<h3><a href="https://github.com/neunaha/claws/blob/main/CONTRIBUTING.md">Contributing</a></h3>
|
|
621
|
+
<p>Dev setup, workflow, code style, protocol change process. High-priority: TypeScript rewrite, Windows support, Node client.</p>
|
|
622
|
+
</div>
|
|
623
|
+
<div class="feature-card">
|
|
624
|
+
<div class="icon">🔐</div>
|
|
625
|
+
<h3><a href="https://github.com/neunaha/claws/blob/main/SECURITY.md">Security</a></h3>
|
|
626
|
+
<p>Socket permissions, pty log sensitivity, trust model, planned WebSocket auth. Read before shared deployments.</p>
|
|
627
|
+
</div>
|
|
628
|
+
</div>
|
|
629
|
+
</section>
|
|
630
|
+
|
|
631
|
+
<!-- CTA -->
|
|
632
|
+
<section class="alt">
|
|
633
|
+
<div class="inner" style="text-align: center; padding: 60px 24px;">
|
|
634
|
+
<h2>Your AI deserves better than copy-paste.</h2>
|
|
635
|
+
<p style="max-width: 600px; margin: 0 auto 24px; color: var(--text-muted);">Stop manually running commands your AI asks you to run. Stop pasting output back into chat. Give your AI direct terminal control — it reads, writes, monitors, and reacts on its own.</p>
|
|
636
|
+
<div style="display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;">
|
|
637
|
+
<a href="https://github.com/neunaha/claws#install" class="btn btn-primary">Install Claws — 30 seconds</a>
|
|
638
|
+
<a href="https://github.com/neunaha/claws" class="btn btn-ghost">Star on GitHub</a>
|
|
639
|
+
<a href="https://github.com/neunaha/claws/blob/main/docs/guide.md" class="btn btn-ghost">Read the Guide</a>
|
|
640
|
+
</div>
|
|
641
|
+
</div>
|
|
642
|
+
</section>
|
|
643
|
+
|
|
644
|
+
<footer>
|
|
645
|
+
<p>Claws is open-source under the <a href="https://github.com/neunaha/claws/blob/main/LICENSE">MIT License</a>.</p>
|
|
646
|
+
<p style="margin-top: 8px;">Built by <a href="https://github.com/neunaha">Anish Neunaha</a> · <a href="https://github.com/neunaha/claws">GitHub</a> · <a href="https://github.com/neunaha/claws/blob/main/CONTRIBUTING.md">Contribute</a></p>
|
|
647
|
+
</footer>
|
|
648
|
+
|
|
649
|
+
<script>
|
|
650
|
+
// Carousel
|
|
651
|
+
(function() {
|
|
652
|
+
const track = document.getElementById('archTrack');
|
|
653
|
+
const dotsContainer = document.getElementById('archDots');
|
|
654
|
+
if (!track || !dotsContainer) return;
|
|
655
|
+
const imgs = track.querySelectorAll('img');
|
|
656
|
+
const n = imgs.length;
|
|
657
|
+
let current = 0;
|
|
658
|
+
|
|
659
|
+
// Create dots
|
|
660
|
+
for (let i = 0; i < n; i++) {
|
|
661
|
+
const dot = document.createElement('button');
|
|
662
|
+
dot.className = 'carousel-dot' + (i === 0 ? ' active' : '');
|
|
663
|
+
dot.onclick = () => goTo(i);
|
|
664
|
+
dotsContainer.appendChild(dot);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
function goTo(idx) {
|
|
668
|
+
current = idx;
|
|
669
|
+
track.style.transform = `translateX(-${idx * 100}%)`;
|
|
670
|
+
dotsContainer.querySelectorAll('.carousel-dot').forEach((d, i) => {
|
|
671
|
+
d.className = 'carousel-dot' + (i === idx ? ' active' : '');
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
// Auto-advance every 4s
|
|
676
|
+
setInterval(() => goTo((current + 1) % n), 4000);
|
|
677
|
+
})();
|
|
678
|
+
|
|
679
|
+
// Capabilities carousel
|
|
680
|
+
(function() {
|
|
681
|
+
const track = document.getElementById('capTrack');
|
|
682
|
+
const dotsContainer = document.getElementById('capDots');
|
|
683
|
+
if (!track || !dotsContainer) return;
|
|
684
|
+
const slides = track.children;
|
|
685
|
+
const n = slides.length;
|
|
686
|
+
let current = 0;
|
|
687
|
+
|
|
688
|
+
for (let i = 0; i < n; i++) {
|
|
689
|
+
const dot = document.createElement('button');
|
|
690
|
+
dot.className = 'carousel-dot' + (i === 0 ? ' active' : '');
|
|
691
|
+
dot.onclick = () => goTo(i);
|
|
692
|
+
dotsContainer.appendChild(dot);
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
function goTo(idx) {
|
|
696
|
+
current = idx;
|
|
697
|
+
track.style.transform = `translateX(-${idx * 100}%)`;
|
|
698
|
+
dotsContainer.querySelectorAll('.carousel-dot').forEach((d, i) => {
|
|
699
|
+
d.className = 'carousel-dot' + (i === idx ? ' active' : '');
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
setInterval(() => goTo((current + 1) % n), 5000);
|
|
704
|
+
})();
|
|
705
|
+
|
|
706
|
+
// Scroll reveal
|
|
707
|
+
(function() {
|
|
708
|
+
const els = document.querySelectorAll('.reveal');
|
|
709
|
+
const observer = new IntersectionObserver((entries) => {
|
|
710
|
+
entries.forEach(e => { if (e.isIntersecting) e.target.classList.add('visible'); });
|
|
711
|
+
}, { threshold: 0.1 });
|
|
712
|
+
els.forEach(el => observer.observe(el));
|
|
713
|
+
})();
|
|
714
|
+
</script>
|
|
715
|
+
</body>
|
|
716
|
+
</html>
|