clew-code 0.2.20 → 0.2.22

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 (66) hide show
  1. package/dist/main.js +1888 -1883
  2. package/docs/architecture.html +91 -148
  3. package/docs/assets/clew-agent-loop.png +0 -0
  4. package/docs/assets/clew-general-architecture.png +0 -0
  5. package/docs/assets/clew-mcp-architecture.png +0 -0
  6. package/docs/assets/clew-p2p-swarm.png +0 -0
  7. package/docs/changelog.html +150 -0
  8. package/docs/cli-reference.html +90 -0
  9. package/docs/commands.html +156 -265
  10. package/docs/configuration.html +85 -147
  11. package/docs/contributing.html +91 -0
  12. package/docs/css/styles.css +425 -425
  13. package/docs/daemon.html +62 -129
  14. package/docs/features/bridge-mode.html +61 -66
  15. package/docs/features/evals.html +57 -149
  16. package/docs/features/searxng-search.html +58 -118
  17. package/docs/features/sentry-setup.html +61 -124
  18. package/docs/index.html +137 -125
  19. package/docs/installation.html +77 -105
  20. package/docs/internals/growthbook-ab-testing.html +69 -91
  21. package/docs/internals/hidden-features.html +81 -143
  22. package/docs/js/main.js +29 -0
  23. package/docs/loop.html +69 -181
  24. package/docs/mcp.html +99 -247
  25. package/docs/models.html +69 -110
  26. package/docs/permission-model.html +86 -102
  27. package/docs/plugins.html +84 -102
  28. package/docs/providers.html +87 -127
  29. package/docs/quick-start.html +81 -93
  30. package/docs/research-memory.html +71 -102
  31. package/docs/security.html +71 -0
  32. package/docs/skills.html +67 -117
  33. package/docs/swarm.html +78 -236
  34. package/docs/tools.html +152 -151
  35. package/docs/troubleshooting.html +86 -106
  36. package/docs/voice-mode.html +79 -0
  37. package/package.json +1 -1
  38. package/docs/architecture.th.html +0 -79
  39. package/docs/clew-code-architecture.html +0 -1126
  40. package/docs/commands.th.html +0 -269
  41. package/docs/configuration.th.html +0 -108
  42. package/docs/daemon.th.html +0 -73
  43. package/docs/features/bridge-mode.th.html +0 -62
  44. package/docs/features/evals.th.html +0 -62
  45. package/docs/features/searxng-search.th.html +0 -67
  46. package/docs/features/sentry-setup.th.html +0 -69
  47. package/docs/features/swarm.html +0 -156
  48. package/docs/generated/providers.html +0 -625
  49. package/docs/generated/tools.html +0 -558
  50. package/docs/index.th.html +0 -292
  51. package/docs/installation.th.html +0 -105
  52. package/docs/internals/growthbook-ab-testing.th.html +0 -60
  53. package/docs/internals/hidden-features.th.html +0 -107
  54. package/docs/loop.th.html +0 -227
  55. package/docs/mcp.th.html +0 -207
  56. package/docs/models.th.html +0 -61
  57. package/docs/permission-model.th.html +0 -67
  58. package/docs/plugins.th.html +0 -79
  59. package/docs/prompts-and-features.html +0 -806
  60. package/docs/providers.th.html +0 -81
  61. package/docs/quick-start.th.html +0 -89
  62. package/docs/research-memory.th.html +0 -72
  63. package/docs/skills.th.html +0 -90
  64. package/docs/swarm.th.html +0 -280
  65. package/docs/tools.th.html +0 -84
  66. package/docs/troubleshooting.th.html +0 -85
@@ -1,127 +1,87 @@
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>Providers — Clew</title>
7
- <meta name="description" content="Complete AI provider reference for Clew — 29 supported providers with configuration and capabilities.">
8
- <link rel="preconnect" href="https://fonts.googleapis.com">
9
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
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
- <link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
13
- </head>
14
- <body>
15
- <header class="header"></header>
16
- <div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
17
- <div class="content-wrap"><main class="content">
18
- <div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Providers</span></div>
19
- <h1>Providers</h1>
20
- <p class="section-subtitle">Clew supports <strong>29 AI providers</strong> with a unified adapter layer. Set your API keys as environment variables and switch between providers at runtime with <code>/model</code>.</p>
21
-
22
- <p>Provider configuration is declared in <code>src/services/ai/providers.json</code>. The <strong>ProviderManager</strong> resolves API keys, selects models, and manages provider config. Non-Anthropic providers are normalized via the <strong>AnthropicAdapter</strong> or <strong>GoogleAdapter</strong>.</p>
23
-
24
- <h2>All Providers</h2>
25
- <table>
26
- <tr><th>Provider</th><th>Env Key</th><th>Default Model</th><th>Notes</th></tr>
27
- <tr><td>Clew Gateway</td><td><code>CLEW_GATEWAY_KEY</code></td><td>clew-code</td><td>Self-hosted AI proxy for provider fallback, model routing, and usage tracking across upstream providers. Set base URL with <code>CLEW_GATEWAY_URL</code>.</td></tr>
28
- <tr><td>Custom (OpenAI-Compatible)</td><td><code>CUSTOM_API_KEY</code></td><td>—</td><td>Generic OpenAI-compatible provider. Set base URL with <code>CUSTOM_API_BASE_URL</code>.</td></tr>
29
- <tr><td>Anthropic</td><td><code>ANTHROPIC_API_KEY</code></td><td>claude-sonnet-4-7</td><td>Native Claude support with full tool calling and reasoning. Context: 1M tokens.</td></tr>
30
- <tr><td>OpenAI</td><td><code>OPENAI_API_KEY</code></td><td>gpt-5.5</td><td>GPT-5.5, GPT-5.5 Pro, GPT-5.4 Mini. Context: 1M+ tokens.</td></tr>
31
- <tr><td>Google</td><td><code>GOOGLE_API_KEY</code></td><td>gemini-3.1-pro-preview</td><td>Gemini 3.1 Pro Preview &amp; Flash Lite. Context: up to 2M tokens. Uses GoogleAdapter.</td></tr>
32
- <tr><td>OpenRouter</td><td><code>OPENROUTER_API_KEY</code></td><td>—</td><td>100+ models via routed API. OpenAI-compatible.</td></tr>
33
- <tr><td>DeepSeek</td><td><code>DEEPSEEK_API_KEY</code></td><td>deepseek-v4-pro</td><td>DeepSeek V4 Pro, V4 Flash. Context: 1M tokens. MoE architecture.</td></tr>
34
- <tr><td>OpenCode</td><td><code>OPENCODE_API_KEY</code></td><td>claude-opus-4-7</td><td>OpenCode AI gateway. OpenAI-compatible. Includes Claude, GPT, Gemini, Kimi, GLM, MiniMax.</td></tr>
35
- <tr><td>OpenCode Go</td><td><code>OPENCODE_GO_API_KEY</code></td><td>minimax-m2.7</td><td>Low cost subscription tier for open coding models.</td></tr>
36
- <tr><td>Cline API</td><td><code>CLINE_API_KEY</code></td><td>anthropic/claude-opus-4-7</td><td>OpenAI-compatible. Model IDs format: provider/model-name.</td></tr>
37
- <tr><td>Groq</td><td><code>GROQ_API_KEY</code></td><td>llama-3.3-70b-versatile</td><td>Llama 3.3 70B, Llama 4 Scout. Fast inference. Context: 128K tokens.</td></tr>
38
- <tr><td>xAI</td><td><code>XAI_API_KEY</code></td><td>grok-4.3</td><td>Grok 4.3. Context: 128K tokens. Vision and tool calling.</td></tr>
39
- <tr><td>Mistral</td><td><code>MISTRAL_API_KEY</code></td><td>mistral-small-latest</td><td>Mistral Large 4, Small 4, Ministral 3 14B. Tool calling and vision support.</td></tr>
40
- <tr><td>KiloCode</td><td><code>KILOCODE_API_KEY</code></td><td>kilo-auto/free</td><td>Gateway with 500+ models. Includes free tier.</td></tr>
41
- <tr><td>Ollama (Local)</td><td><code>OLLAMA_API_KEY</code></td><td>llama3.3</td><td>Local models via Ollama server at <code>http://localhost:11434/v1</code>. Offline-capable.</td></tr>
42
- <tr><td>Together AI</td><td><code>TOGETHER_API_KEY</code></td><td>—</td><td>Llama 4 models. OpenAI-compatible.</td></tr>
43
- <tr><td>Fireworks AI</td><td><code>FIREWORKS_API_KEY</code></td><td>—</td><td>Llama 4 70B. Fast inference.</td></tr>
44
- <tr><td>NVIDIA NIM</td><td><code>NVIDIA_API_KEY</code></td><td>—</td><td>NVIDIA AI Foundation Models. DeepSeek, Llama 3.1, Nemotron. Live model list fetched from API on /model list.</td></tr>
45
- <tr><td>Cohere</td><td><code>COHERE_API_KEY</code></td><td>command-a-plus-05-2026</td><td>Command A+ model. 128K context. No vision.</td></tr>
46
- <tr><td>Deep Infra</td><td><code>DEEPINFRA_API_KEY</code></td><td>—</td><td>OpenAI-compatible gateway. Llama 4 Scout with 327K context.</td></tr>
47
- <tr><td>Perplexity</td><td><code>PERPLEXITY_API_KEY</code></td><td>—</td><td>Sonar Huge Online. No tool calling support.</td></tr>
48
- <tr><td>Cerebras</td><td><code>CEREBRAS_API_KEY</code></td><td>—</td><td>Wafer-Scale Engine. Extremely fast inference. Qwen 3 235B.</td></tr>
49
- <tr><td>SiliconFlow</td><td><code>SILICONFLOW_API_KEY</code></td><td>—</td><td>China-based AI platform. DeepSeek V4 Pro and Flash.</td></tr>
50
- <tr><td>Moonshot AI (Kimi)</td><td><code>MOONSHOT_API_KEY</code></td><td>kimi-latest</td><td>Kimi models. 128K context. Vision and tool calling.</td></tr>
51
- <tr><td>Zhipu AI (GLM)</td><td><code>ZHIPU_API_KEY</code></td><td>glm-4</td><td>GLM-4 model. 128K context.</td></tr>
52
- <tr><td>Hugging Face</td><td><code>HUGGINGFACE_API_KEY</code></td><td>—</td><td>Inference API. Llama 3.1 70B. No tool calling.</td></tr>
53
- <tr><td>Poe</td><td><code>POE_API_KEY</code></td><td>—</td><td>OpenAI-compatible gateway. Claude 3.7 Sonnet available.</td></tr>
54
- <tr><td>DigitalOcean</td><td><code>DIGITALOCEAN_API_KEY</code></td><td>—</td><td>Serverless Inference. Llama 3.1 70B.</td></tr>
55
- </table>
56
-
57
- <h2>Provider Selection</h2>
58
- <p>ProviderManager resolves the active provider by:</p>
59
- <ol>
60
- <li>Scanning environment variables for configured API keys</li>
61
- <li>Loading provider metadata from <code>providers.json</code></li>
62
- <li>Resolving model names to provider-specific identifiers</li>
63
- <li>Applying the adapter layer for non-Anthropic providers</li>
64
- <li>Handling config migration and backward compatibility</li>
65
- </ol>
66
-
67
- <h2>Adapter Layer</h2>
68
- <p>Non-Anthropic providers pass through adapters that normalize:</p>
69
- <ul>
70
- <li><strong>Content blocks</strong> — text, tool_use, tool_result, thinking block conversion (<code>contentBlockUtils.ts</code>)</li>
71
- <li><strong>Tool calls</strong> — parsing across provider formats (<code>toolCallParser.ts</code>)</li>
72
- <li><strong>Streaming chunks</strong> per-chunk normalization for real-time display</li>
73
- <li><strong>Errors</strong> normalization with retry/rate-limit handling (<code>errorNormalizer.ts</code>)</li>
74
- <li><strong>Usage</strong> — token counting and cost estimation (<code>usageNormalizer.ts</code>)</li>
75
- </ul>
76
-
77
- <h2>Runtime Switching</h2>
78
- <pre><code>/model # Interactive model picker
79
- /model list # List all available models across providers
80
- /model claude-sonnet-4-7 # Switch to a specific model
81
- /provider-select # Show or change active provider</code></pre>
82
-
83
- <h2>Provider Capabilities</h2>
84
- <p>Each provider declares capabilities in <code>providers.json</code>:</p>
85
- <ul>
86
- <li><strong>chat</strong> — Chat completion endpoint</li>
87
- <li><strong>streaming</strong> — full, partial, or none</li>
88
- <li><strong>toolCalling</strong> — native, adapted, or none</li>
89
- <li><strong>vision</strong> — Image input support</li>
90
- <li><strong>jsonSchema</strong> — Structured output via JSON schema</li>
91
- <li><strong>reasoningEffort</strong> — Configurable reasoning depth</li>
92
- <li><strong>contextLength</strong> — Maximum context window size</li>
93
- </ul>
94
-
95
- <h2>Local / Offline Development</h2>
96
- <pre><code># Ollama — fully offline
97
- export OLLAMA_API_KEY=ollama # (any non-empty value)
98
- export OLLAMA_HOST=http://localhost:11434
99
- clew
100
- > /model ollama/llama4:70b
101
-
102
- # Debug specific provider
103
- DEBUG=provider:anthropic clew</code></pre>
104
-
105
- <footer class="footer">
106
- <span>Clew Code 0.2.14 — Open Source</span>
107
- <div class="footer-links">
108
- <a href="https://github.com/ClewCode/ClewCode">GitHub</a>
109
- <a href="https://github.com/ClewCode/ClewCode/issues">Issues</a>
110
- </div>
111
- </footer>
112
- </main>
113
- <nav class="toc-sidebar"></nav>
114
- </div>
115
- </div>
116
- <script src="js/main.js"></script>
117
- </body>
118
- </html>
119
- /footer>
120
- </main>
121
- <nav class="toc-sidebar"></nav>
122
- </div>
123
- </div>
124
- <script src="js/main.js"></script>
125
- </body>
126
- </html>
127
-
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>Providers — Clew Code</title>
7
+ <meta name="description" href="All 27 AI providers supported by 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">Providers</span></div>
22
+
23
+ <h1>Providers</h1>
24
+ <p class="sub">Clew Code supports 27 AI providers. Switch between them anytime with <code>/model</code>.</p>
25
+
26
+ <h2 id="supported">Supported Providers</h2>
27
+ <table>
28
+ <thead>
29
+ <tr><th>Provider</th><th>Env Variable</th><th>Notes</th></tr>
30
+ </thead>
31
+ <tbody>
32
+ <tr><td>Anthropic</td><td><code>ANTHROPIC_API_KEY</code></td><td>Claude models</td></tr>
33
+ <tr><td>OpenAI</td><td><code>OPENAI_API_KEY</code></td><td>GPT-4, GPT-4o, o-series</td></tr>
34
+ <tr><td>Google Gemini</td><td><code>GOOGLE_API_KEY</code></td><td>Gemini 1.5/2.0</td></tr>
35
+ <tr><td>DeepSeek</td><td><code>DEEPSEEK_API_KEY</code></td><td>DeepSeek-V3, R1</td></tr>
36
+ <tr><td>Groq</td><td><code>GROQ_API_KEY</code></td><td>Fast inference</td></tr>
37
+ <tr><td>xAI (Grok)</td><td><code>XAI_API_KEY</code></td><td>Grok models</td></tr>
38
+ <tr><td>Mistral</td><td><code>MISTRAL_API_KEY</code></td><td>Mistral Large, Small</td></tr>
39
+ <tr><td>Cohere</td><td><code>COHERE_API_KEY</code></td><td>Command R+</td></tr>
40
+ <tr><td>Perplexity</td><td><code>PERPLEXITY_API_KEY</code></td><td>Sonar models</td></tr>
41
+ <tr><td>Cerebras</td><td><code>CEREBRAS_API_KEY</code></td><td>Fast ASIC inference</td></tr>
42
+ <tr><td>Moonshot (Kimi)</td><td><code>MOONSHOT_API_KEY</code></td><td>Chinese market</td></tr>
43
+ <tr><td>Zhipu (GLM)</td><td><code>ZHIPU_API_KEY</code></td><td>GLM models</td></tr>
44
+ <tr><td>NVIDIA NIM</td><td><code>NVIDIA_API_KEY</code></td><td>Self-hosted NIM</td></tr>
45
+ <tr><td>OpenRouter</td><td><code>OPENROUTER_API_KEY</code></td><td>Unified API to many models</td></tr>
46
+ <tr><td>GitHub Copilot</td><td><code>COPILOT_GITHUB_TOKEN</code></td><td>Copilot models</td></tr>
47
+ <tr><td>OpenCode</td><td><code>OPENCODE_API_KEY</code></td><td>Open-source provider</td></tr>
48
+ <tr><td>KiloCode</td><td><code>KILOCODE_API_KEY</code></td><td>Kilo API</td></tr>
49
+ <tr><td>Ollama</td><td><code>OLLAMA_HOST</code></td><td>Local models (<code>http://localhost:11434</code>)</td></tr>
50
+ <tr><td>Together AI</td><td><code>TOGETHER_API_KEY</code></td><td>Hosted open models</td></tr>
51
+ <tr><td>Fireworks AI</td><td><code>FIREWORKS_API_KEY</code></td><td>Fast inference</td></tr>
52
+ <tr><td>Deep Infra</td><td><code>DEEP_INFRA_API_KEY</code></td><td>Serverless GPU</td></tr>
53
+ <tr><td>SiliconFlow</td><td><code>SILICONFLOW_API_KEY</code></td><td>Asian cloud</td></tr>
54
+ <tr><td>Hugging Face</td><td><code>HUGGINGFACE_API_KEY</code></td><td>HF Inference API</td></tr>
55
+ <tr><td>Poe</td><td><code>POE_API_KEY</code></td><td>Poe by Quora</td></tr>
56
+ <tr><td>DigitalOcean</td><td><code>DIGITALOCEAN_API_KEY</code></td><td>GPU droplets</td></tr>
57
+ <tr><td>Cline</td><td><code>CLINE_API_KEY</code></td><td>Cline provider</td></tr>
58
+ <tr><td>OpenCode Go</td><td><code>OPENCODE_GO_API_KEY</code></td><td>OpenCode Go variant</td></tr>
59
+ </tbody>
60
+ </table>
61
+
62
+ <h2 id="switch">Switching Providers</h2>
63
+ <p>Use the <code>/model</code> command inside the REPL:</p>
64
+ <pre><code class="language-bash">❯ /model openai
65
+ ❯ /model gpt-5.5
66
+
67
+ /model deepseek-v4-flash
68
+
69
+ ❯ /model ollama/llama3.3
70
+ </code></pre>
71
+
72
+ <h2 id="list">List Available Models</h2>
73
+ <pre><code class="language-bash">❯ /model list
74
+ </code></pre>
75
+ <p>Shows live model lists from provider APIs with capability tags:<br>
76
+ <code>[200K ctx, vision, tools, reason, free]</code></p>
77
+
78
+ <h2 id="effort">Reasoning Effort</h2>
79
+ <p>Some providers expose <code>reasoningEffort</code> (NVIDIA, DeepSeek, OpenRouter, etc.). Control it with:</p>
80
+ <pre><code class="language-bash">❯ /effort high
81
+ </code></pre>
82
+ </div>
83
+ </div>
84
+
85
+ <script src="js/main.js"></script>
86
+ </body>
87
+ </html>
@@ -1,93 +1,81 @@
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</title>
7
- <meta name="description" content="Get started with Clew in minutes — install, configure a provider, and run your first session.">
8
- <link rel="preconnect" href="https://fonts.googleapis.com">
9
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
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
- <link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
13
- </head>
14
- <body>
15
- <header class="header"></header>
16
- <div class="app">
17
- <aside class="sidebar" id="sidebar"></aside>
18
- <div class="sidebar-overlay" id="sidebarOverlay"></div>
19
- <div class="content-wrap">
20
- <main class="content">
21
- <div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Quick Start</span></div>
22
- <h1>Quick Start</h1>
23
- <p class="section-subtitle">From zero to AI-assisted coding in under a minute.</p>
24
-
25
- <h2>1. Install</h2>
26
- <pre><code>npm install -g clew-code
27
- clew --version</code></pre>
28
- <p>Make sure <a href="installation.html">Bun 1.3+</a> is installed first. The npm package does not bundle Bun.</p>
29
-
30
- <h2>2. Set a Provider Key</h2>
31
- <p>Set at least one API key as an environment variable. See <a href="providers.html">Providers</a> for all 29 options.</p>
32
- <pre><code># Anthropic (recommended for best tool calling)
33
- export ANTHROPIC_API_KEY=sk-ant-...
34
-
35
- # Or DeepSeek
36
- export DEEPSEEK_API_KEY=sk-...
37
-
38
- # Or Google Gemini
39
- export GOOGLE_API_KEY=...</code></pre>
40
-
41
- <h2>3. Launch</h2>
42
- <pre><code>cd /path/to/your/project
43
- clew</code></pre>
44
- <p>The terminal UI starts with model name, provider, and context usage in the status bar.</p>
45
-
46
- <h2>4. First Commands</h2>
47
- <pre><code>> "explain this project's structure"
48
-
49
- > "find all the test files"
50
-
51
- > /status # Check model, provider, API status
52
-
53
- > /model sonnet # Switch model (alias or full ID)
54
-
55
- > /doctor # Run environment diagnostics</code></pre>
56
-
57
- <h2>5. Key Commands to Know</h2>
58
- <table>
59
- <tr><th>Command</th><th>Use</th></tr>
60
- <tr><td><code>/clear</code></td><td>Clear conversation and free context</td></tr>
61
- <tr><td><code>/compact</code></td><td>Compress context to save tokens (auto multi-pass for large sessions)</td></tr>
62
- <tr><td><code>/model &lt;name&gt;</code></td><td>Switch model or provider</td></tr>
63
- <tr><td><code>/permissions</code></td><td>Manage tool permission rules</td></tr>
64
- <tr><td><code>/plan</code></td><td>Toggle plan mode</td></tr>
65
- <tr><td><code>/config</code></td><td>Open config panel</td></tr>
66
- <tr><td><code>/help</code></td><td>Show all available commands</td></tr>
67
- </table>
68
-
69
- <h2>6. Sessions</h2>
70
- <pre><code># Continue last conversation
71
- clew -c
72
-
73
- # Resume a specific session
74
- clew -r
75
-
76
- # Print mode (non-interactive, pipe-friendly)
77
- clew -p "find all unused exports"
78
-
79
- # With structured output
80
- clew -p --output-format json "list all dependencies"</code></pre>
81
-
82
- <div class="callout callout-info">
83
- <strong>Tips</strong>
84
- Type <code>/</code> to discover all commands. Use <code>/powerup</code> for interactive lessons. Set <code>--model sonnet</code> at startup to skip the default model.
85
- </div>
86
- </main>
87
- <nav class="toc-sidebar"></nav>
88
- </div>
89
- </div>
90
- <script src="js/main.js"></script>
91
- </body>
92
- </html>
93
-
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
+ ❯ /mesh 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,102 +1,71 @@
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 & Memory — Clew</title>
7
- <meta name="description" content="Deep research system and semantic memory citation extraction, claim verification, dossier generation, cross-lingual memory search.">
8
- <link rel="preconnect" href="https://fonts.googleapis.com">
9
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
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
- <link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
13
- </head>
14
- <body>
15
- <header class="header"></header>
16
- <div class="app">
17
- <aside class="sidebar" id="sidebar"></aside>
18
- <div class="sidebar-overlay" id="sidebarOverlay"></div>
19
- <div class="content-wrap">
20
- <main class="content">
21
- <div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Research &amp; Memory</span></div>
22
- <h1>Research &amp; Memory</h1>
23
- <p class="section-subtitle">Clew provides a built-in deep research system and cross-session semantic memory — both designed to work with local files, web sources, and a persistent knowledge store.</p>
24
-
25
- <h2>Research System</h2>
26
- <p>The research system lives in <code>src/research/</code> and supports deep, source-grounded research across local files, wiki content, and memory:</p>
27
- <ul>
28
- <li><strong>Citation extraction</strong> — Automatic extraction of citations from research sources</li>
29
- <li><strong>Claim verification</strong> Fact-check claims against multiple sources</li>
30
- <li><strong>Dossier generation</strong> Structured reports with source attribution</li>
31
- <li><strong>Truth checking</strong> Cross-reference claims for accuracy</li>
32
- <li><strong>Source ranking</strong> Prioritize authoritative sources</li>
33
- </ul>
34
-
35
- <h3>Research Commands</h3>
36
- <table>
37
- <tr><th>Command</th><th>Description</th></tr>
38
- <tr><td><code>/research</code></td><td>Deep source-grounded research across local files, wiki, and memory</td></tr>
39
- </table>
40
-
41
- <h2>Memory System</h2>
42
- <p>Clew has a <strong>two-tier memory system</strong>:</p>
43
-
44
- <h3>1. FTS5 Semantic Search (<code>src/memory/</code>)</h3>
45
- <p>Cross-session persistent knowledge storage with SQLite FTS5 search:</p>
46
- <ul>
47
- <li><strong>SQLite FTS5 search</strong> — Find relevant memories using FTS5 similarity</li>
48
- <li><strong>Cross-lingual</strong> — Search across languages using FTS5 indexing</li>
49
- <li><strong>Token-aware chunking</strong> — 3000-token chunks with word-boundary splitting</li>
50
- <li><strong>Secret redaction</strong> — Strips API keys and tokens before indexing</li>
51
- </ul>
52
-
53
- <h3>2. Cross-Session Long-Term Memory (<code>src/services/longTermMemory/</code>)</h3>
54
- <p>Session persistence with <strong>knowledge graph</strong> and <strong>experience system</strong>:</p>
55
- <ul>
56
- <li><strong>Knowledge Graph</strong> Entities (session, decision, file, tag, model) with typed edges; multi-hop traversal via recursive CTE</li>
57
- <li><strong>Experience System</strong> XP, levels, streak bonuses, expertise profile, cold detection, correction learning</li>
58
- <li><strong>Human-like consolidation</strong> — Recent=detail, old=weekly/monthly digests, patterns extracted</li>
59
- <li><strong>Auto-inject</strong> — Previous session context auto-injected at session start</li>
60
- <li><strong>Timeline</strong> — Chronological view with density stats</li>
61
- </ul>
62
-
63
- <h3>Memory Commands</h3>
64
- <table>
65
- <tr><th>Command</th><th>Description</th></tr>
66
- <tr><td><code>/memory save [summary]</code></td><td>Save current session to long-term memory + knowledge graph</td></tr>
67
- <tr><td><code>/memory timeline</code></td><td>Show session history chronologically</td></tr>
68
- <tr><td><code>/memory stats</code></td><td>Show memory density stats and activity chart</td></tr>
69
- <tr><td><code>/memory xp</code></td><td>Show experience report, expertise profile, XP progress</td></tr>
70
- <tr><td><code>/memory graph</code></td><td>Show knowledge graph stats and structure</td></tr>
71
- <tr><td><code>/memory digest</code></td><td>Show consolidated weekly/monthly digests</td></tr>
72
- <tr><td><code>/memory preview</code></td><td>Preview sessions ready for consolidation</td></tr>
73
- <tr><td><code>/memory consolidate</code></td><td>Mark old sessions as consolidated</td></tr>
74
- <tr><td><code>/memory search &lt;query&gt;</code></td><td>Search indexed memory facts using SQLite FTS5</td></tr>
75
- <tr><td><code>/memory-search</code></td><td>Search memories using FTS5 (cross-lingual)</td></tr>
76
- </table>
77
-
78
- <h2>Architecture Files</h2>
79
- <table>
80
- <tr><th>Path</th><th>Role</th></tr>
81
- <tr><td><code>src/research/</code></td><td>Deep research, dossier generation, truth checking, source ranking</td></tr>
82
- <tr><td><code>src/memory/</code></td><td>SQLite FTS5 memory search (14 files, no embeddings)</td></tr>
83
- <tr><td><code>src/services/longTermMemory/</code></td><td>Knowledge graph, experience system, consolidation, timeline, cross-session, auto-inject</td></tr>
84
- </table>
85
-
86
- <footer class="footer">
87
- <span>Clew Code 0.2.14 — Open Source</span>
88
- <div class="footer-links">
89
- <a href="https://github.com/ClewCode/ClewCode">GitHub</a>
90
- <a href="https://github.com/ClewCode/ClewCode/issues">Issues</a>
91
- </div>
92
- </footer>
93
- </main>
94
- <nav class="toc-sidebar"></nav>
95
- </div>
96
- </div>
97
- <script src="js/main.js"></script>
98
- </body>
99
- </html>
100
-
101
-
102
-
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>