clew-code 0.3.1 → 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.
Files changed (47) hide show
  1. package/README.md +181 -113
  2. package/dist/generated/version.json +1 -1
  3. package/dist/main.js +2948 -3258
  4. package/package.json +1 -1
  5. package/docs/.nojekyll +0 -0
  6. package/docs/_config.yml +0 -3
  7. package/docs/architecture.html +0 -90
  8. package/docs/assets/clew-agent-loop.png +0 -0
  9. package/docs/assets/clew-general-architecture.png +0 -0
  10. package/docs/assets/clew-mcp-architecture.png +0 -0
  11. package/docs/assets/clew-p2p-swarm.png +0 -0
  12. package/docs/assets/clew.svg +0 -33
  13. package/docs/changelog.html +0 -141
  14. package/docs/cli-reference.html +0 -89
  15. package/docs/commands.html +0 -161
  16. package/docs/configuration.html +0 -85
  17. package/docs/contributing.html +0 -91
  18. package/docs/css/styles.css +0 -545
  19. package/docs/daemon.html +0 -62
  20. package/docs/features/bridge-mode.html +0 -62
  21. package/docs/features/evals.html +0 -58
  22. package/docs/features/searxng-search.html +0 -59
  23. package/docs/features/sentry-setup.html +0 -62
  24. package/docs/generated/providers.html +0 -625
  25. package/docs/generated/tools.html +0 -559
  26. package/docs/index.html +0 -182
  27. package/docs/installation.html +0 -77
  28. package/docs/internals/claude-ai-backend-dependencies.md +0 -278
  29. package/docs/internals/growthbook-ab-testing.html +0 -70
  30. package/docs/internals/hidden-features.html +0 -82
  31. package/docs/internals/long-term-memory-design.md +0 -173
  32. package/docs/js/main.js +0 -438
  33. package/docs/loop.html +0 -69
  34. package/docs/mcp.html +0 -99
  35. package/docs/models.html +0 -81
  36. package/docs/permission-model.html +0 -86
  37. package/docs/personal-profile.html +0 -113
  38. package/docs/plugins.html +0 -84
  39. package/docs/providers.html +0 -625
  40. package/docs/quick-start.html +0 -81
  41. package/docs/research-memory.html +0 -71
  42. package/docs/security.html +0 -71
  43. package/docs/skills.html +0 -67
  44. package/docs/swarm.html +0 -78
  45. package/docs/tools.html +0 -559
  46. package/docs/troubleshooting.html +0 -86
  47. package/docs/voice-mode.html +0 -79
@@ -1,81 +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>Quick Start — Clew Code</title>
7
- <meta name="description" content="Get started with Clew Code in under a minute.">
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">Quick Start</span></div>
22
-
23
- <h1>Quick Start</h1>
24
- <p class="sub">Get Clew Code running in under a minute.</p>
25
-
26
- <h2 id="install">1. Install</h2>
27
- <pre><code class="language-bash">npm install -g clew-code
28
- </code></pre>
29
- <p>Requires <a href="https://bun.sh">Bun</a> 1.3+, Node.js 18+, Git, and one provider API key.</p>
30
-
31
- <h2 id="run">2. Run</h2>
32
- <pre><code class="language-bash">cd my-project
33
- clew
34
- </code></pre>
35
- <p>On first launch you'll be prompted to select a provider.</p>
36
-
37
- <h2 id="configure-provider">3. Configure a Provider</h2>
38
- <p>Inside the REPL, pick your provider and model:</p>
39
- <pre><code class="language-bash">❯ /model openai
40
- ❯ /model gpt-5.5
41
-
42
- ❯ /model deepseek-v4-pro
43
-
44
- ❯ /model ollama/llama3.3
45
- </code></pre>
46
- <p>Or set environment variables before starting:</p>
47
- <pre><code class="language-bash">export ANTHROPIC_API_KEY=sk-ant-...
48
- export OPENAI_API_KEY=sk-...
49
- export GOOGLE_API_KEY=...
50
- export DEEPSEEK_API_KEY=...
51
- </code></pre>
52
-
53
- <h2 id="first-commands">4. Try Commands</h2>
54
- <pre><code class="language-bash">❯ /help # list everything
55
- ❯ /status # current provider, model, context info
56
- ❯ /peer discover # find other Clew instances on LAN
57
- ❯ /mcp list # connected MCP servers
58
- </code></pre>
59
-
60
- <h2 id="one-shot">One-Shot Mode</h2>
61
- <p>Pipe-friendly single-use mode:</p>
62
- <pre><code class="language-bash">clew -p "summarize CHANGELOG.md"
63
- </code></pre>
64
-
65
- <h2 id="resume">Resume Last Session</h2>
66
- <pre><code class="language-bash">clew --resume last
67
- </code></pre>
68
-
69
- <h2 id="next">Next Steps</h2>
70
- <ul>
71
- <li><a href="installation.html">Full installation guide</a></li>
72
- <li><a href="configuration.html">Configuration reference</a></li>
73
- <li><a href="providers.html">All 27 providers</a></li>
74
- <li><a href="commands.html">Slash commands</a></li>
75
- </ul>
76
- </div>
77
- </div>
78
-
79
- <script src="js/main.js"></script>
80
- </body>
81
- </html>
@@ -1,71 +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>Research &amp; Memory — Clew Code</title>
7
- <meta name="description" content="Persistent memory and research system 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">Research &amp; Memory</span></div>
22
-
23
- <h1>Research &amp; Memory</h1>
24
- <p class="sub">Clew Code learns from your sessions over time. The memory system persists knowledge, preferences, and project context across sessions.</p>
25
-
26
- <h2 id="auto-memory">Auto-Memory</h2>
27
- <p>Clew Code automatically captures lessons from edit and exec sessions, storing them in <code>.moocode/memory.md</code>. The system tracks:</p>
28
- <ul>
29
- <li>Project conventions and patterns</li>
30
- <li>User preferences and workflow choices</li>
31
- <li>Frequently used commands and tools</li>
32
- <li>Architectural decisions and their rationale</li>
33
- </ul>
34
-
35
- <h2 id="ltm">Long-Term Memory</h2>
36
- <p>The long-term memory system uses SQLite (<code>~/.clew/projects/&lt;project&gt;/session-memory.db</code>) with a human-like consolidation model:</p>
37
-
38
- <table>
39
- <thead>
40
- <tr><th>Age</th><th>Level</th><th>Detail</th></tr>
41
- </thead>
42
- <tbody>
43
- <tr><td>&lt; 7 days</td><td>Raw</td><td>Full session detail</td></tr>
44
- <tr><td>1-4 weeks</td><td>Weekly digest</td><td>Summary + patterns</td></tr>
45
- <tr><td>&gt; 1 month</td><td>Monthly digest</td><td>High-level trends</td></tr>
46
- <tr><td>Ancient</td><td>Patterns only</td><td>Recurring topics preserved</td></tr>
47
- </tbody>
48
- </table>
49
-
50
- <h2 id="memory-commands">Memory Commands</h2>
51
- <pre><code class="language-bash">❯ /memory save # save session summary
52
- ❯ /memory timeline # show chronological session history
53
- ❯ /memory stats # activity density chart
54
- ❯ /memory digest # weekly/monthly digests
55
- ❯ /memory preview # preview sessions ready for consolidation
56
- ❯ /memory consolidate # mark old sessions as consolidated
57
- ❯ /memory search &lt;q&gt; # search stored memory entries
58
- </code></pre>
59
-
60
- <h2 id="research">Research System</h2>
61
- <p>The research system enables deep-dive investigations with persistent findings. Research results are indexed and searchable across sessions.</p>
62
- <pre><code class="language-bash">❯ /research start "topic" # start a research session
63
- ❯ /research list # list all research topics
64
- ❯ /research show &lt;id&gt; # show research findings
65
- </code></pre>
66
- </div>
67
- </div>
68
-
69
- <script src="js/main.js"></script>
70
- </body>
71
- </html>
@@ -1,71 +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>Security — Clew Code</title>
7
- <meta name="description" content="Security model, license, and responsible disclosure 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">Security</span></div>
22
-
23
- <h1>Security</h1>
24
-
25
- <h2 id="overview">License Notice</h2>
26
- <p>Clew Code is an unofficial, reverse-engineered rebuild of Anthropic's Claude Code CLI, renamed and extended for research, local development, and self-hosted use. This repository is not an official Anthropic product. Anthropic has not authorized, endorsed, or sponsored this project.</p>
27
- <p>The upstream Claude Code product is proprietary software owned by Anthropic PBC.</p>
28
-
29
- <h2 id="api-keys">API Key Safety</h2>
30
- <p>Clew Code reads API keys from environment variables or <code>.env</code> files. Keys are never committed or shared:</p>
31
- <ul>
32
- <li>Keep API keys in environment variables or <code>.env</code> (already in <code>.gitignore</code>)</li>
33
- <li>Never include keys in prompts or tool calls</li>
34
- <li>Use <code>/doctor</code> to verify provider connectivity without exposing secrets</li>
35
- </ul>
36
-
37
- <h2 id="permissions">Permission Security</h2>
38
- <p>Clew Code's 7-tier permission model prevents unauthorized operations:</p>
39
- <ul>
40
- <li><strong>default/ask</strong> — user must approve every action</li>
41
- <li><strong>auto</strong> — safe operations auto-approved, destructive ones still ask</li>
42
- <li><strong>dontAsk</strong> — full trust. Use only in sandboxed environments</li>
43
- </ul>
44
- <p>See <a href="permission-model.html">Permission Model</a> for details.</p>
45
-
46
- <h2 id="safety">Safety Gates</h2>
47
- <p>The built-in safety gate system validates:</p>
48
- <ul>
49
- <li>Command paths — blocks dangerous shell commands</li>
50
- <li>File paths — prevents writes outside project boundaries</li>
51
- <li>Output limits — 100 MB bash output cap</li>
52
- <li>Malformed tool call guard — prevents injection attacks</li>
53
- <li>PowerShell rule enforcement on Windows</li>
54
- </ul>
55
-
56
- <h2 id="responsible-disclosure">Responsible Disclosure</h2>
57
- <p>If you discover a security vulnerability, please open an issue on <a href="https://github.com/ClewCode/ClewCode/issues">GitHub</a> rather than posting publicly. Do not submit vulnerabilities as regular issues — use the security issue template.</p>
58
-
59
- <h2 id="reporting">Reporting a Vulnerability</h2>
60
- <p>To report a security issue, please:</p>
61
- <ol>
62
- <li>Go to <a href="https://github.com/ClewCode/ClewCode/security">github.com/ClewCode/ClewCode/security</a></li>
63
- <li>Click "Report a vulnerability"</li>
64
- <li>Include as much context as possible (OS, version, steps to reproduce)</li>
65
- </ol>
66
- </div>
67
- </div>
68
-
69
- <script src="js/main.js"></script>
70
- </body>
71
- </html>
package/docs/skills.html DELETED
@@ -1,67 +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>Skills — Clew Code</title>
7
- <meta name="description" href="The skills system in Clew Code — Claude Code compatible.">
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">Skills</span></div>
22
-
23
- <h1>Skills</h1>
24
- <p class="sub">Skills are reusable, invocable capabilities that extend Clew Code with domain-specific expertise. The skills system is Claude Code compatible.</p>
25
-
26
- <h2 id="overview">Overview</h2>
27
- <p>Skills are defined in <code>SKILL.md</code> files and matched by name or description. When a user or agent invokes a skill, its prompt is loaded into the conversation, providing specialized instructions and context.</p>
28
-
29
- <h2 id="builtin">Built-in Skills</h2>
30
- <table>
31
- <thead>
32
- <tr><th>Skill</th><th>Description</th></tr>
33
- </thead>
34
- <tbody>
35
- <tr><td><code>/verify</code></td><td>Run full verification — typecheck, lint, and tests</td></tr>
36
- <tr><td><code>/precommit</code></td><td>Pre-commit review with verification and git diff summary</td></tr>
37
- <tr><td><code>/commit</code></td><td>Stage, commit, and push git changes with conventional commits</td></tr>
38
- <tr><td><code>/code-review</code></td><td>Review code for correctness bugs at configurable effort</td></tr>
39
- <tr><td><code>/loop</code></td><td>Run a prompt or command on a recurring interval</td></tr>
40
- <tr><td><code>/update-config</code></td><td>Configure Clew Code via settings.json</td></tr>
41
- <tr><td><code>/scrapling</code></td><td>Web scraping using Scrapling framework</td></tr>
42
- </tbody>
43
- </table>
44
-
45
- <h2 id="creating">Creating a Skill</h2>
46
- <p>Create a <code>SKILL.md</code> file in your project:</p>
47
- <pre><code class="language-markdown"># my-skill
48
-
49
- Invoke with `/my-skill [args]`.
50
-
51
- ## Instructions
52
-
53
- Provide detailed instructions for what this skill should do.
54
- Include context, constraints, and examples.
55
- </code></pre>
56
- <p>Skills are automatically discovered from the project root.</p>
57
-
58
- <h2 id="skill-commands">Skill Commands</h2>
59
- <pre><code class="language-bash">❯ /skills # list all available skills
60
- ❯ /my-skill args # invoke a specific skill with arguments
61
- </code></pre>
62
- </div>
63
- </div>
64
-
65
- <script src="js/main.js"></script>
66
- </body>
67
- </html>
package/docs/swarm.html DELETED
@@ -1,78 +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>Swarm System — Clew Code</title>
7
- <meta name="description" content="Multi-agent swarm coordination 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">Swarm System</span></div>
22
-
23
- <h1>Swarm System</h1>
24
- <p class="sub">Coordinate multiple AI agents working together on complex tasks.</p>
25
-
26
- <h2 id="overview">Overview</h2>
27
- <p>The swarm system enables multiple agent instances to work together as a team. Each agent has an identity, mailbox, task queue, and can communicate with other agents in the swarm.</p>
28
-
29
- <h2 id="architecture">Architecture</h2>
30
- <pre><code>Agent A (Coordinator)
31
- ├── Agent B (Researcher)
32
- │ └── Agent D (Data Collector)
33
- ├── Agent C (Implementer)
34
- └── Agent E (Reviewer)
35
- </code></pre>
36
-
37
- <p>Agents communicate via a message bus. Each agent has its own:</p>
38
- <ul>
39
- <li><strong>Identity</strong> — name, role, capabilities</li>
40
- <li><strong>Mailbox</strong> — receives messages from other agents</li>
41
- <li><strong>Task queue</strong> — pending and completed tasks</li>
42
- <li><strong>Result channel</strong> — output is collected by the coordinator</li>
43
- </ul>
44
-
45
- <h2 id="execution">Execution Modes</h2>
46
- <table>
47
- <thead>
48
- <tr><th>Mode</th><th>Description</th></tr>
49
- </thead>
50
- <tbody>
51
- <tr><td>Pane/tmux</td><td>Each agent runs in its own terminal pane</td></tr>
52
- <tr><td>In-process</td><td>Agents run as lightweight coroutines within the same process</td></tr>
53
- </tbody>
54
- </table>
55
-
56
- <h2 id="vs-subagent">Swarm vs. Subagent</h2>
57
- <table>
58
- <thead>
59
- <tr><th>Subagent</th><th>Swarm/Teammate</th></tr>
60
- </thead>
61
- <tbody>
62
- <tr><td>One-shot, isolated</td><td>Persistent, collaborative</td></tr>
63
- <tr><td>No inter-agent communication</td><td>Full mailbox system</td></tr>
64
- <tr><td>Results returned once</td><td>Continuous coordination</td></tr>
65
- <tr><td>Best for exploration</td><td>Best for long-running complex tasks</td></tr>
66
- </tbody>
67
- </table>
68
-
69
- <h2 id="commands">Swarm Commands</h2>
70
- <pre><code class="language-bash">❯ /agents # open agent dashboard
71
- ❯ /agent dispatch ... # dispatch a subagent
72
- </code></pre>
73
- </div>
74
- </div>
75
-
76
- <script src="js/main.js"></script>
77
- </body>
78
- </html>