clew-code 0.2.22 → 0.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -45
- package/dist/main.js +2886 -2707
- package/docs/commands.html +157 -156
- package/docs/css/styles.css +545 -425
- package/docs/index.html +185 -160
- package/docs/installation.html +1 -1
- package/docs/js/main.js +3 -3
- package/docs/models.html +81 -69
- package/docs/tools.html +183 -172
- package/package.json +1 -1
package/docs/index.html
CHANGED
|
@@ -1,160 +1,185 @@
|
|
|
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>Clew Code — Multi-Provider AI Coding Agent</title>
|
|
7
|
-
<meta name="description" content="The open-source AI coding agent with 27 providers, LAN mesh coordination, autonomous agent loop, MCP integration, and 50+ built-in tools.">
|
|
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
|
-
<section class="hero">
|
|
22
|
-
<div class="badge"><span class="dot"></span> v0.2.
|
|
23
|
-
<h1>Code with <span class="hl">any</span> AI.</h1>
|
|
24
|
-
<p>Clew Code is an open-source AI coding agent that runs in your terminal,
|
|
25
|
-
coordinates across machines on your LAN, and works with 27 different
|
|
26
|
-
AI providers — no lock-in.</p>
|
|
27
|
-
<div class="hero-actions">
|
|
28
|
-
<a href="quick-start.html" class="btn btn-p">Get Started →</a>
|
|
29
|
-
<a href="installation.html" class="btn btn-ghost">Installation</a>
|
|
30
|
-
<a href="https://github.com/ClewCode/ClewCode" class="btn btn-ghost" target="_blank">GitHub</a>
|
|
31
|
-
</div>
|
|
32
|
-
</section>
|
|
33
|
-
|
|
34
|
-
<div class="term">
|
|
35
|
-
<div class="term-bar">
|
|
36
|
-
<span class="term-dot"></span><span class="term-dot"></span><span class="term-dot"></span>
|
|
37
|
-
<span class="term-title">clew</span>
|
|
38
|
-
</div>
|
|
39
|
-
<div class="term-body"><span class="p">❯</span> clew
|
|
40
|
-
<span class="d">│ Starting Clew Code v0.2.
|
|
41
|
-
<span class="d">│ Select a provider:</span>
|
|
42
|
-
<span class="h">│ ● Anthropic</span>
|
|
43
|
-
<span class="h">│ ● OpenAI</span>
|
|
44
|
-
○ Google Gemini
|
|
45
|
-
○ DeepSeek
|
|
46
|
-
○ Ollama (local)
|
|
47
|
-
…
|
|
48
|
-
<span class="p">❯</span> /model deepseek-v4-flash
|
|
49
|
-
|
|
50
|
-
<span class="p">❯</span> /mesh discover
|
|
51
|
-
<span class="d">│ Found 2 peers on LAN</span>
|
|
52
|
-
|
|
53
|
-
<span class="p">❯</span> write a web scraper in Go
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<div class="stats">
|
|
57
|
-
<div class="stat"><div class="stat-num">27</div><div class="stat-lbl">Providers</div></div>
|
|
58
|
-
<div class="stat"><div class="stat-num">50+</div><div class="stat-lbl">Built-in Tools</div></div>
|
|
59
|
-
<div class="stat"><div class="stat-num">15</div><div class="stat-lbl">Mesh Tools</div></div>
|
|
60
|
-
<div class="stat"><div class="stat-num">7</div><div class="stat-lbl">Permission Modes</div></div>
|
|
61
|
-
</div>
|
|
62
|
-
|
|
63
|
-
<h2 id="features">Features</h2>
|
|
64
|
-
<div class="grid">
|
|
65
|
-
<div class="card">
|
|
66
|
-
<h3>27 Providers</h3>
|
|
67
|
-
<p>Anthropic, OpenAI, Google Gemini, DeepSeek, Groq, Mistral, Ollama, OpenRouter, and 19 more. Switch mid-session with <code>/model</code>.</p>
|
|
68
|
-
</div>
|
|
69
|
-
<div class="card">
|
|
70
|
-
<h3>LAN Mesh</h3>
|
|
71
|
-
<p>Discover peers, assign tasks, execute remote commands, and coordinate across machines via UDP multicast or file registry.</p>
|
|
72
|
-
<span class="tag">15 tools</span>
|
|
73
|
-
</div>
|
|
74
|
-
<div class="card">
|
|
75
|
-
<h3>Autonomous Loop</h3>
|
|
76
|
-
<p>Persistent task queue, lease-based concurrency, exponential-backoff retry, dead-letter management, and cron scheduling.</p>
|
|
77
|
-
</div>
|
|
78
|
-
<div class="card">
|
|
79
|
-
<h3>MCP Integration</h3>
|
|
80
|
-
<p>Model Context Protocol via stdio, SSE with OAuth, or DirectConnect for in-process plugin servers.</p>
|
|
81
|
-
</div>
|
|
82
|
-
<div class="card">
|
|
83
|
-
<h3>50+ Built-in Tools</h3>
|
|
84
|
-
<p>Read, Write, Edit, Bash, WebSearch, WebFetch, Browser (Playwright), PR, NotebookEdit, JsonPath, and more.</p>
|
|
85
|
-
</div>
|
|
86
|
-
<div class="card">
|
|
87
|
-
<h3>3 Execution Layers</h3>
|
|
88
|
-
<p>Subagents (one-shot), Swarm/Teammates (long-running), Process Mesh (Codex via exec/pty).</p>
|
|
89
|
-
</div>
|
|
90
|
-
<div class="card">
|
|
91
|
-
<h3>Skills & Plugins</h3>
|
|
92
|
-
<p>Extend via SKILL.md, plugin manifests with lifecycle hooks at every stage (PreToolUse, PostBash, and more).</p>
|
|
93
|
-
</div>
|
|
94
|
-
<div class="card">
|
|
95
|
-
<h3>7 Permission Modes</h3>
|
|
96
|
-
<p>Default, ask, plan, auto, acceptEdits, bypassPermissions, dontAsk — with granular allow/deny rule patterns.</p>
|
|
97
|
-
</div>
|
|
98
|
-
<div class="card">
|
|
99
|
-
<h3>Plan Mode</h3>
|
|
100
|
-
<p>Full-access planning with bypass permissions. Explore, read, write, and edit freely. Plans persist with progress snapshots.</p>
|
|
101
|
-
</div>
|
|
102
|
-
<div class="card">
|
|
103
|
-
<h3>Memory System</h3>
|
|
104
|
-
<p>Persistent auto-memory, topic indexing, session digests with weekly/monthly consolidation — like human memory decay.</p>
|
|
105
|
-
</div>
|
|
106
|
-
<div class="card">
|
|
107
|
-
<h3>Web UI & Remote</h3>
|
|
108
|
-
<p>Local WebSocket server with one-time auth tokens, optional NAT-traversal relay, and session management.</p>
|
|
109
|
-
</div>
|
|
110
|
-
<div class="card">
|
|
111
|
-
<h3>
|
|
112
|
-
<p>
|
|
113
|
-
</div>
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
</
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
<
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
<
|
|
153
|
-
|
|
154
|
-
</div>
|
|
155
|
-
|
|
156
|
-
</
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
</
|
|
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>Clew Code — Multi-Provider AI Coding Agent</title>
|
|
7
|
+
<meta name="description" content="The open-source AI coding agent with 27 providers, LAN mesh coordination, autonomous agent loop, MCP integration, and 50+ built-in tools.">
|
|
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
|
+
<section class="hero">
|
|
22
|
+
<div class="badge"><span class="dot"></span> v0.2.22 — Multi-Provider AI Coding Agent</div>
|
|
23
|
+
<h1>Code with <span class="hl">any</span> AI.</h1>
|
|
24
|
+
<p>Clew Code is an open-source AI coding agent that runs in your terminal,
|
|
25
|
+
coordinates across machines on your LAN, and works with 27 different
|
|
26
|
+
AI providers — no lock-in.</p>
|
|
27
|
+
<div class="hero-actions">
|
|
28
|
+
<a href="quick-start.html" class="btn btn-p">Get Started →</a>
|
|
29
|
+
<a href="installation.html" class="btn btn-ghost">Installation</a>
|
|
30
|
+
<a href="https://github.com/ClewCode/ClewCode" class="btn btn-ghost" target="_blank">GitHub</a>
|
|
31
|
+
</div>
|
|
32
|
+
</section>
|
|
33
|
+
|
|
34
|
+
<div class="term">
|
|
35
|
+
<div class="term-bar">
|
|
36
|
+
<span class="term-dot"></span><span class="term-dot"></span><span class="term-dot"></span>
|
|
37
|
+
<span class="term-title">clew</span>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="term-body"><span class="p">❯</span> clew
|
|
40
|
+
<span class="d">│ Starting Clew Code v0.2.22 …</span>
|
|
41
|
+
<span class="d">│ Select a provider:</span>
|
|
42
|
+
<span class="h">│ ● Anthropic</span>
|
|
43
|
+
<span class="h">│ ● OpenAI</span>
|
|
44
|
+
○ Google Gemini
|
|
45
|
+
○ DeepSeek
|
|
46
|
+
○ Ollama (local)
|
|
47
|
+
…
|
|
48
|
+
<span class="p">❯</span> /model deepseek-v4-flash
|
|
49
|
+
|
|
50
|
+
<span class="p">❯</span> /mesh discover
|
|
51
|
+
<span class="d">│ Found 2 peers on LAN</span>
|
|
52
|
+
|
|
53
|
+
<span class="p">❯</span> write a web scraper in Go<span class="term-cursor"></span></div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div class="stats">
|
|
57
|
+
<div class="stat"><div class="stat-num">27</div><div class="stat-lbl">Providers</div></div>
|
|
58
|
+
<div class="stat"><div class="stat-num">50+</div><div class="stat-lbl">Built-in Tools</div></div>
|
|
59
|
+
<div class="stat"><div class="stat-num">15</div><div class="stat-lbl">Mesh Tools</div></div>
|
|
60
|
+
<div class="stat"><div class="stat-num">7</div><div class="stat-lbl">Permission Modes</div></div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<h2 id="features">Features</h2>
|
|
64
|
+
<div class="grid">
|
|
65
|
+
<div class="card">
|
|
66
|
+
<h3><span class="card-icon">🤖</span>27 Providers</h3>
|
|
67
|
+
<p>Anthropic, OpenAI, Google Gemini, DeepSeek, Groq, Mistral, Ollama, OpenRouter, and 19 more. Switch mid-session with <code>/model</code>.</p>
|
|
68
|
+
</div>
|
|
69
|
+
<div class="card">
|
|
70
|
+
<h3><span class="card-icon">🌐</span>LAN Mesh</h3>
|
|
71
|
+
<p>Discover peers, assign tasks, execute remote commands, and coordinate across machines via UDP multicast or file registry.</p>
|
|
72
|
+
<span class="tag">15 tools</span>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="card">
|
|
75
|
+
<h3><span class="card-icon">🔄</span>Autonomous Loop</h3>
|
|
76
|
+
<p>Persistent task queue, lease-based concurrency, exponential-backoff retry, dead-letter management, and cron scheduling.</p>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="card">
|
|
79
|
+
<h3><span class="card-icon">🔌</span>MCP Integration</h3>
|
|
80
|
+
<p>Model Context Protocol via stdio, SSE with OAuth, or DirectConnect for in-process plugin servers.</p>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="card">
|
|
83
|
+
<h3><span class="card-icon">🛠️</span>50+ Built-in Tools</h3>
|
|
84
|
+
<p>Read, Write, Edit, Bash, WebSearch, WebFetch, Browser (Playwright), PR, NotebookEdit, JsonPath, and more.</p>
|
|
85
|
+
</div>
|
|
86
|
+
<div class="card">
|
|
87
|
+
<h3><span class="card-icon">⚡</span>3 Execution Layers</h3>
|
|
88
|
+
<p>Subagents (one-shot), Swarm/Teammates (long-running), Process Mesh (Codex via exec/pty).</p>
|
|
89
|
+
</div>
|
|
90
|
+
<div class="card">
|
|
91
|
+
<h3><span class="card-icon">🧩</span>Skills & Plugins</h3>
|
|
92
|
+
<p>Extend via SKILL.md, plugin manifests with lifecycle hooks at every stage (PreToolUse, PostBash, and more).</p>
|
|
93
|
+
</div>
|
|
94
|
+
<div class="card">
|
|
95
|
+
<h3><span class="card-icon">🔒</span>7 Permission Modes</h3>
|
|
96
|
+
<p>Default, ask, plan, auto, acceptEdits, bypassPermissions, dontAsk — with granular allow/deny rule patterns.</p>
|
|
97
|
+
</div>
|
|
98
|
+
<div class="card">
|
|
99
|
+
<h3><span class="card-icon">📋</span>Plan Mode</h3>
|
|
100
|
+
<p>Full-access planning with bypass permissions. Explore, read, write, and edit freely. Plans persist with progress snapshots.</p>
|
|
101
|
+
</div>
|
|
102
|
+
<div class="card">
|
|
103
|
+
<h3><span class="card-icon">🧠</span>Memory System</h3>
|
|
104
|
+
<p>Persistent auto-memory, topic indexing, session digests with weekly/monthly consolidation — like human memory decay.</p>
|
|
105
|
+
</div>
|
|
106
|
+
<div class="card">
|
|
107
|
+
<h3><span class="card-icon">🌐</span>Web UI & Remote</h3>
|
|
108
|
+
<p>Local WebSocket server with one-time auth tokens, optional NAT-traversal relay, and session management.</p>
|
|
109
|
+
</div>
|
|
110
|
+
<div class="card">
|
|
111
|
+
<h3><span class="card-icon">🎨</span>Image & Video Generation</h3>
|
|
112
|
+
<p>AI-callable tools for DALL-E 3, Imagen 3, OpenRouter image models, and Runway Gen-4. Auto-discovers models from provider APIs.</p>
|
|
113
|
+
</div>
|
|
114
|
+
<div class="card">
|
|
115
|
+
<h3><span class="card-icon">📦</span>Multi-Pass Compaction</h3>
|
|
116
|
+
<p>Automatic chunk-based context compression with recursive re-compaction when context exceeds the model window.</p>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<h2 id="quick-start">Quick Start</h2>
|
|
121
|
+
<div class="code-block-wrap">
|
|
122
|
+
<div class="code-block-header">
|
|
123
|
+
<span>bash</span>
|
|
124
|
+
<button class="copy-btn" onclick="navigator.clipboard.writeText(this.nextElementSibling.textContent);this.textContent='Copied';setTimeout(()=>this.textContent='Copy',1500)">Copy</button>
|
|
125
|
+
</div>
|
|
126
|
+
<pre><code class="language-bash">npm install -g clew-code
|
|
127
|
+
cd my-project
|
|
128
|
+
clew
|
|
129
|
+
|
|
130
|
+
# Inside the REPL:
|
|
131
|
+
# /model openai # pick a provider
|
|
132
|
+
# /help # list all commands
|
|
133
|
+
# /mesh discover # find peers on LAN</code></pre>
|
|
134
|
+
</div>
|
|
135
|
+
|
|
136
|
+
<h2 id="concepts">Core Concepts</h2>
|
|
137
|
+
<p>Clew Code has several execution layers, each serving a different purpose:</p>
|
|
138
|
+
<div class="grid">
|
|
139
|
+
<div class="card">
|
|
140
|
+
<h3><span class="card-icon">🎯</span>Agent</h3>
|
|
141
|
+
<p>An AI worker with a prompt, model, tools, and permissions. The main chat session is an agent. Custom agents live in <code>.clew/agents/*.md</code>.</p>
|
|
142
|
+
</div>
|
|
143
|
+
<div class="card">
|
|
144
|
+
<h3><span class="card-icon">🧪</span>Subagent</h3>
|
|
145
|
+
<p>A short-lived child agent for independent work like codebase exploration or test triage. The built-in <code>Explore</code> agent is read-only.</p>
|
|
146
|
+
</div>
|
|
147
|
+
<div class="card">
|
|
148
|
+
<h3><span class="card-icon">🐝</span>Teammate / Swarm</h3>
|
|
149
|
+
<p>A longer-lived agent team member with identity, mailbox, task coordination, and optional pane/tmux execution.</p>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="card">
|
|
152
|
+
<h3><span class="card-icon">🌐</span>LAN Mesh</h3>
|
|
153
|
+
<p>A network of Clew instances on the same machine or LAN. <code>/mesh</code> discovers peers, sends messages, and assigns tasks.</p>
|
|
154
|
+
</div>
|
|
155
|
+
<div class="card">
|
|
156
|
+
<h3><span class="card-icon">⚙️</span>Process Mesh</h3>
|
|
157
|
+
<p>Local process-backed worker. Delegates prompts to external CLIs like Codex using exec or pty modes.</p>
|
|
158
|
+
</div>
|
|
159
|
+
<div class="card">
|
|
160
|
+
<h3><span class="card-icon">📡</span>ACP</h3>
|
|
161
|
+
<p>Agent Client Protocol — an external boundary for editors, IDEs, REST clients, or other agents to send work into Clew.</p>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
<button class="back-to-top" id="backToTop" onclick="window.scrollTo({top:0,behavior:'smooth'})">↑</button>
|
|
168
|
+
|
|
169
|
+
<script src="js/main.js"></script>
|
|
170
|
+
<script>
|
|
171
|
+
// Back to top button
|
|
172
|
+
(function(){
|
|
173
|
+
var btn = document.getElementById('backToTop');
|
|
174
|
+
if (!btn) return;
|
|
175
|
+
window.addEventListener('scroll', function(){
|
|
176
|
+
if (window.scrollY > 400) {
|
|
177
|
+
btn.classList.add('visible');
|
|
178
|
+
} else {
|
|
179
|
+
btn.classList.remove('visible');
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
})();
|
|
183
|
+
</script>
|
|
184
|
+
</body>
|
|
185
|
+
</html>
|
package/docs/installation.html
CHANGED
package/docs/js/main.js
CHANGED
|
@@ -418,8 +418,8 @@
|
|
|
418
418
|
|
|
419
419
|
// ── Footer Injection ──
|
|
420
420
|
function injectFooter() {
|
|
421
|
-
var
|
|
422
|
-
if (!
|
|
421
|
+
var content = document.querySelector('.content');
|
|
422
|
+
if (!content || content.querySelector('.footer')) return;
|
|
423
423
|
|
|
424
424
|
var footer = document.createElement('div');
|
|
425
425
|
footer.className = 'footer';
|
|
@@ -430,7 +430,7 @@
|
|
|
430
430
|
' <a href="https://github.com/ClewCode/ClewCode/issues">Issues</a>' +
|
|
431
431
|
' <a href="https://www.npmjs.com/package/clew-code">npm</a>' +
|
|
432
432
|
'</div>';
|
|
433
|
-
|
|
433
|
+
content.appendChild(footer);
|
|
434
434
|
}
|
|
435
435
|
|
|
436
436
|
injectFooter();
|
package/docs/models.html
CHANGED
|
@@ -1,69 +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>Models — Clew Code</title>
|
|
7
|
-
<meta name="description" href="Model configuration and selection 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">Models</span></div>
|
|
22
|
-
|
|
23
|
-
<h1>Models</h1>
|
|
24
|
-
<p class="sub">Select and configure AI models from any supported provider. Switch mid-session without restarting.</p>
|
|
25
|
-
|
|
26
|
-
<h2 id="switching">Switching Models</h2>
|
|
27
|
-
<p>Use the <code>/model</code> command in the REPL:</p>
|
|
28
|
-
<pre><code class="language-bash">❯ /model # interactive provider/model picker
|
|
29
|
-
❯ /model openai # switch to OpenAI provider
|
|
30
|
-
❯ /model gpt-5.5 # set specific model
|
|
31
|
-
❯ /model list # list available models from all providers
|
|
32
|
-
</code></pre>
|
|
33
|
-
|
|
34
|
-
<h2 id="capabilities">Capability Tags</h2>
|
|
35
|
-
<p>The <code>/model list</code> command fetches live model lists from provider APIs and displays capability tags:</p>
|
|
36
|
-
<pre><code>deepseek-v4-flash [200K ctx, tools, reason, free]
|
|
37
|
-
gpt-5.5 [128K ctx, vision, tools]
|
|
38
|
-
claude-sonnet-5 [200K ctx, vision, tools, reason]
|
|
39
|
-
gemini-2.0-flash [1M ctx, vision, tools, free]
|
|
40
|
-
</code></pre>
|
|
41
|
-
<p>Tags include context window size, vision support, tool calling, reasoning, and free tier availability.</p>
|
|
42
|
-
|
|
43
|
-
<h2 id="reasoning">Reasoning Effort</h2>
|
|
44
|
-
<p>For models that support configurable reasoning (DeepSeek, NVIDIA, OpenRouter, etc.):</p>
|
|
45
|
-
<pre><code class="language-bash">❯ /effort low
|
|
46
|
-
❯ /effort medium
|
|
47
|
-
❯ /effort high
|
|
48
|
-
</code></pre>
|
|
49
|
-
|
|
50
|
-
<h2 id="local">Local Models (Ollama)</h2>
|
|
51
|
-
<p>Run models locally with Ollama:</p>
|
|
52
|
-
<pre><code class="language-bash">❯ /model ollama/llama3.3
|
|
53
|
-
❯ /model ollama/mistral
|
|
54
|
-
❯ /model ollama/codellama
|
|
55
|
-
</code></pre>
|
|
56
|
-
<p>Set the Ollama host:</p>
|
|
57
|
-
<pre><code class="language-bash">export OLLAMA_HOST=http://localhost:11434
|
|
58
|
-
</code></pre>
|
|
59
|
-
|
|
60
|
-
<h2 id="
|
|
61
|
-
<p>
|
|
62
|
-
<
|
|
63
|
-
</
|
|
64
|
-
|
|
65
|
-
</
|
|
66
|
-
|
|
67
|
-
<
|
|
68
|
-
</
|
|
69
|
-
</
|
|
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>Models — Clew Code</title>
|
|
7
|
+
<meta name="description" href="Model configuration and selection 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">Models</span></div>
|
|
22
|
+
|
|
23
|
+
<h1>Models</h1>
|
|
24
|
+
<p class="sub">Select and configure AI models from any supported provider. Switch mid-session without restarting.</p>
|
|
25
|
+
|
|
26
|
+
<h2 id="switching">Switching Models</h2>
|
|
27
|
+
<p>Use the <code>/model</code> command in the REPL:</p>
|
|
28
|
+
<pre><code class="language-bash">❯ /model # interactive provider/model picker
|
|
29
|
+
❯ /model openai # switch to OpenAI provider
|
|
30
|
+
❯ /model gpt-5.5 # set specific model
|
|
31
|
+
❯ /model list # list available models from all providers
|
|
32
|
+
</code></pre>
|
|
33
|
+
|
|
34
|
+
<h2 id="capabilities">Capability Tags</h2>
|
|
35
|
+
<p>The <code>/model list</code> command fetches live model lists from provider APIs and displays capability tags:</p>
|
|
36
|
+
<pre><code>deepseek-v4-flash [200K ctx, tools, reason, free]
|
|
37
|
+
gpt-5.5 [128K ctx, vision, tools]
|
|
38
|
+
claude-sonnet-5 [200K ctx, vision, tools, reason]
|
|
39
|
+
gemini-2.0-flash [1M ctx, vision, tools, free]
|
|
40
|
+
</code></pre>
|
|
41
|
+
<p>Tags include context window size, vision support, tool calling, reasoning, and free tier availability.</p>
|
|
42
|
+
|
|
43
|
+
<h2 id="reasoning">Reasoning Effort</h2>
|
|
44
|
+
<p>For models that support configurable reasoning (DeepSeek, NVIDIA, OpenRouter, etc.):</p>
|
|
45
|
+
<pre><code class="language-bash">❯ /effort low
|
|
46
|
+
❯ /effort medium
|
|
47
|
+
❯ /effort high
|
|
48
|
+
</code></pre>
|
|
49
|
+
|
|
50
|
+
<h2 id="local">Local Models (Ollama)</h2>
|
|
51
|
+
<p>Run models locally with Ollama:</p>
|
|
52
|
+
<pre><code class="language-bash">❯ /model ollama/llama3.3
|
|
53
|
+
❯ /model ollama/mistral
|
|
54
|
+
❯ /model ollama/codellama
|
|
55
|
+
</code></pre>
|
|
56
|
+
<p>Set the Ollama host:</p>
|
|
57
|
+
<pre><code class="language-bash">export OLLAMA_HOST=http://localhost:11434
|
|
58
|
+
</code></pre>
|
|
59
|
+
|
|
60
|
+
<h2 id="image-gen">Image Generation Models</h2>
|
|
61
|
+
<p><code>GenerateImage</code> auto-discovers image-capable models from provider APIs on first use:</p>
|
|
62
|
+
<table>
|
|
63
|
+
<thead><tr><th>Provider</th><th>Models Discovered</th><th>API Key</th></tr></thead>
|
|
64
|
+
<tbody>
|
|
65
|
+
<tr><td>OpenAI</td><td><code>dall-e-3</code>, future DALL-E versions</td><td><code>OPENAI_API_KEY</code></td></tr>
|
|
66
|
+
<tr><td>OpenRouter</td><td><code>gemini-3.1-flash-image-preview</code>, <code>flux.2-pro</code>, <code>recraft-v3</code>, etc.</td><td><code>OPENROUTER_API_KEY</code></td></tr>
|
|
67
|
+
<tr><td>Google</td><td><code>imagen-3.0-generate-002</code>, future Imagen versions</td><td><code>GOOGLE_API_KEY</code></td></tr>
|
|
68
|
+
</tbody>
|
|
69
|
+
</table>
|
|
70
|
+
<p>To override auto-discovery, add <code>"capabilities": { "imageGen": { "defaultModel": "...", "apiType": "..." } }</code> to the provider in <code>providers.json</code>.</p>
|
|
71
|
+
|
|
72
|
+
<h2 id="provider-defaults">Provider Defaults</h2>
|
|
73
|
+
<p>Each provider has a default model. The first time you switch to a provider, its default model is selected automatically. Override with:</p>
|
|
74
|
+
<pre><code class="language-bash">❯ /model deepseek-v4-flash
|
|
75
|
+
</code></pre>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<script src="js/main.js"></script>
|
|
80
|
+
</body>
|
|
81
|
+
</html>
|