clew-code 0.2.1
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/LICENSE.md +71 -0
- package/README.md +356 -0
- package/bin/claudevil +2 -0
- package/bin/claudevil.cjs +96 -0
- package/bin/clew +2 -0
- package/bin/clew.cjs +96 -0
- package/dist/main.js +10766 -0
- package/docs/.nojekyll +0 -0
- package/docs/PLAN.md +304 -0
- package/docs/_config.yml +3 -0
- package/docs/architecture.html +144 -0
- package/docs/commands.html +222 -0
- package/docs/configuration.html +144 -0
- package/docs/css/styles.css +790 -0
- package/docs/daemon.html +139 -0
- package/docs/features/bridge-mode.html +77 -0
- package/docs/features/evals.html +160 -0
- package/docs/features/searxng-search.html +129 -0
- package/docs/features/sentry-setup.html +135 -0
- package/docs/index.html +307 -0
- package/docs/installation.html +102 -0
- package/docs/internals/claude-ai-backend-dependencies.md +278 -0
- package/docs/internals/growthbook-ab-testing.html +90 -0
- package/docs/internals/hidden-features.html +126 -0
- package/docs/js/main.js +272 -0
- package/docs/mcp.html +136 -0
- package/docs/models.html +108 -0
- package/docs/permission-model.html +100 -0
- package/docs/plugins.html +100 -0
- package/docs/providers.html +116 -0
- package/docs/quick-start.html +99 -0
- package/docs/research-memory.html +90 -0
- package/docs/skills.html +115 -0
- package/docs/taste.html +181 -0
- package/docs/taste1.html +177 -0
- package/docs/tools.html +168 -0
- package/docs/troubleshooting.html +104 -0
- package/package.json +157 -0
|
@@ -0,0 +1,100 @@
|
|
|
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>Plugins — Clew</title>
|
|
7
|
+
<meta name="description" content="Extend Clew with plugins — commands, agents, skills, hooks, MCP servers, and marketplace support.">
|
|
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
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<header class="header"><div class="header-inner"><a href="index.html" class="logo"><span>Clew</span></a><nav class="header-nav"><a href="index.html">Home</a><a href="index.html#features">Features</a><a href="index.html#commands">Commands</a><a href="quick-start.html" class="active">Docs</a><a href="https://github.com/JonusNattapong/ClewCode" target="_blank">GitHub</a></nav><button class="menu-btn" id="menuToggle" aria-label="Toggle navigation"><span></span><span></span><span></span></button></div></header>
|
|
15
|
+
<div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
16
|
+
<div class="content-wrap"><main class="content">
|
|
17
|
+
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Plugins</span></div>
|
|
18
|
+
<h1>Plugins</h1>
|
|
19
|
+
<p class="section-subtitle">Plugins extend Clew with custom commands, agents, skills, execution hooks, MCP servers, and LSP integrations. Plugin management is handled by <code>src/services/plugins/</code> and <code>src/utils/plugins/</code>.</p>
|
|
20
|
+
|
|
21
|
+
<h2>What Plugins Can Provide</h2>
|
|
22
|
+
<table>
|
|
23
|
+
<tr><th>Extension</th><th>Description</th></tr>
|
|
24
|
+
<tr><td>Slash Commands</td><td>Custom <code>/command</code> implementations registered via plugin manifest</td></tr>
|
|
25
|
+
<tr><td>Agents</td><td>Specialized agent configurations with custom prompts and tool access</td></tr>
|
|
26
|
+
<tr><td>Skills</td><td>Reusable task instructions from plugin skill directories</td></tr>
|
|
27
|
+
<tr><td>Execution Hooks</td><td>Pre/post hooks at tool, bash, prompt, and edit stages</td></tr>
|
|
28
|
+
<tr><td>MCP Servers</td><td>Model Context Protocol server definitions bundled with the plugin</td></tr>
|
|
29
|
+
<tr><td>LSP Servers</td><td>Language Server Protocol integration</td></tr>
|
|
30
|
+
</table>
|
|
31
|
+
|
|
32
|
+
<h2>Hook System</h2>
|
|
33
|
+
<table>
|
|
34
|
+
<tr><th>Hook Point</th><th>When It Fires</th></tr>
|
|
35
|
+
<tr><td><code>PreToolUse</code></td><td>Before a tool executes — validation, input modification, logging</td></tr>
|
|
36
|
+
<tr><td><code>PostToolUse</code></td><td>After a tool completes — result transformation, audit</td></tr>
|
|
37
|
+
<tr><td><code>PreBash</code></td><td>Before shell command execution — sanitization, env injection</td></tr>
|
|
38
|
+
<tr><td><code>PostPrompt</code></td><td>After prompt construction — context augmentation</td></tr>
|
|
39
|
+
<tr><td><code>PreAcceptEdit</code></td><td>Before accepting an edit — validation, policy enforcement</td></tr>
|
|
40
|
+
</table>
|
|
41
|
+
|
|
42
|
+
<h2>Plugin Management</h2>
|
|
43
|
+
<pre><code>/plugin # List installed plugins
|
|
44
|
+
/plugin-details # Show detailed plugin information
|
|
45
|
+
/reload-plugins # Activate pending plugin changes
|
|
46
|
+
claude plugin validate /path # Validate a plugin manifest (CLI)</code></pre>
|
|
47
|
+
|
|
48
|
+
<p>Plugins are loaded from these locations:</p>
|
|
49
|
+
<ul>
|
|
50
|
+
<li><strong>Bundled</strong> — Shipped with Clew</li>
|
|
51
|
+
<li><strong>User</strong> — Installed by the user (via marketplace or manual)</li>
|
|
52
|
+
<li><strong>Plugin dir</strong> — Custom directories via <code>--plugin-dir <path></code> (repeatable)</li>
|
|
53
|
+
</ul>
|
|
54
|
+
|
|
55
|
+
<p>The <code>PluginInstallationManager</code> (<code>src/services/plugins/PluginInstallationManager.ts</code>) handles automatic installation, marketplace reconciliation, and plugin refresh. Use <code>/reload-plugins</code> after installing or updating plugins.</p>
|
|
56
|
+
|
|
57
|
+
<h2>Built-in Plugins</h2>
|
|
58
|
+
<table>
|
|
59
|
+
<tr><th>Plugin</th><th>Description</th></tr>
|
|
60
|
+
<tr><td><code>commit-commands</code></td><td>Git workflow — commit, push, PR creation, branch cleanup (<code>clean_gone</code>)</td></tr>
|
|
61
|
+
<tr><td><code>commit-push-pr</code></td><td>Commit, push, and open a PR in one step</td></tr>
|
|
62
|
+
<tr><td><code>code-review</code></td><td>Automated PR code review</td></tr>
|
|
63
|
+
<tr><td><code>feature-dev</code></td><td>Guided feature development with codebase understanding</td></tr>
|
|
64
|
+
<tr><td><code>frontend-design</code></td><td>Production-grade UI/UX generation</td></tr>
|
|
65
|
+
<tr><td><code>verify</code></td><td>Typecheck, lint, build, and test pipeline</td></tr>
|
|
66
|
+
<tr><td><code>precommit</code></td><td>Pre-commit review with full verification</td></tr>
|
|
67
|
+
<tr><td><code>commit</code></td><td>Conventional git commit message generation</td></tr>
|
|
68
|
+
<tr><td><code>simplify</code></td><td>Code quality and reuse review</td></tr>
|
|
69
|
+
<tr><td><code>debug</code></td><td>Debugging assistance and diagnosis</td></tr>
|
|
70
|
+
<tr><td><code>web-search</code></td><td>Multi-provider web search</td></tr>
|
|
71
|
+
<tr><td><code>scrapling</code></td><td>Web scraping with Scrapling framework</td></tr>
|
|
72
|
+
<tr><td><code>skillify</code></td><td>Create reusable skills from workflows</td></tr>
|
|
73
|
+
<tr><td><code>remember</code></td><td>Save user preferences</td></tr>
|
|
74
|
+
</table>
|
|
75
|
+
|
|
76
|
+
<h2>Plugin Structure</h2>
|
|
77
|
+
<pre><code>my-plugin/
|
|
78
|
+
manifest.json # Plugin metadata and capability declarations
|
|
79
|
+
commands/ # Custom slash commands
|
|
80
|
+
skills/ # Reusable task instructions
|
|
81
|
+
agents/ # Agent configurations
|
|
82
|
+
hooks/ # Hook implementations</code></pre>
|
|
83
|
+
|
|
84
|
+
<h2>Marketplace</h2>
|
|
85
|
+
<p>Plugins can be distributed through marketplaces. The <code>marketplaceManager</code> (<code>src/utils/plugins/marketplaceManager.ts</code>) handles marketplace source discovery, cache management, and plugin installation from remote sources.</p>
|
|
86
|
+
|
|
87
|
+
<footer class="footer">
|
|
88
|
+
<span>Clew v0.1.2 — Open Source</span>
|
|
89
|
+
<div class="footer-links">
|
|
90
|
+
<a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
|
|
91
|
+
<a href="https://github.com/JonusNattapong/ClewCode/issues">Issues</a>
|
|
92
|
+
</div>
|
|
93
|
+
</footer>
|
|
94
|
+
</main>
|
|
95
|
+
<nav class="toc-sidebar"></nav>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
<script src="js/main.js"></script>
|
|
99
|
+
</body>
|
|
100
|
+
</html>
|
|
@@ -0,0 +1,116 @@
|
|
|
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 — 27 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
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<header class="header"><div class="header-inner"><a href="index.html" class="logo"><span>Clew</span></a><nav class="header-nav"><a href="index.html">Home</a><a href="index.html#features">Features</a><a href="index.html#commands">Commands</a><a href="quick-start.html" class="active">Docs</a><a href="https://github.com/JonusNattapong/ClewCode" target="_blank">GitHub</a></nav><button class="menu-btn" id="menuToggle" aria-label="Toggle navigation"><span></span><span></span><span></span></button></div></header>
|
|
15
|
+
<div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
16
|
+
<div class="content-wrap"><main class="content">
|
|
17
|
+
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Providers</span></div>
|
|
18
|
+
<h1>Providers</h1>
|
|
19
|
+
<p class="section-subtitle">Clew supports <strong>27 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>
|
|
20
|
+
|
|
21
|
+
<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>
|
|
22
|
+
|
|
23
|
+
<h2>All Providers</h2>
|
|
24
|
+
<table>
|
|
25
|
+
<tr><th>Provider</th><th>Env Key</th><th>Default Model</th><th>Notes</th></tr>
|
|
26
|
+
<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>
|
|
27
|
+
<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>
|
|
28
|
+
<tr><td>Google</td><td><code>GOOGLE_API_KEY</code></td><td>gemini-3.1-flash</td><td>Gemini 3.1 Flash, Pro. Context: up to 2M tokens. Uses GoogleAdapter.</td></tr>
|
|
29
|
+
<tr><td>GitHub Copilot</td><td><code>COPILOT_GITHUB_TOKEN</code></td><td>gpt-5.5</td><td>Access via GitHub token. Includes Claude and GPT models. Context: 1M tokens.</td></tr>
|
|
30
|
+
<tr><td>OpenRouter</td><td><code>OPENROUTER_API_KEY</code></td><td>—</td><td>100+ models via routed API. OpenAI-compatible.</td></tr>
|
|
31
|
+
<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>
|
|
32
|
+
<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>
|
|
33
|
+
<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>
|
|
34
|
+
<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>
|
|
35
|
+
<tr><td>Groq</td><td><code>GROQ_API_KEY</code></td><td>—</td><td>Llama 4 70B, 8B. Fast inference. Context: 128K tokens.</td></tr>
|
|
36
|
+
<tr><td>xAI</td><td><code>XAI_API_KEY</code></td><td>grok-4-20</td><td>Grok 4.20, Grok 4. Context: 128K tokens. Vision and tool calling.</td></tr>
|
|
37
|
+
<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>
|
|
38
|
+
<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>
|
|
39
|
+
<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>
|
|
40
|
+
<tr><td>Together AI</td><td><code>TOGETHER_API_KEY</code></td><td>—</td><td>Llama 4 models. OpenAI-compatible.</td></tr>
|
|
41
|
+
<tr><td>Fireworks AI</td><td><code>FIREWORKS_API_KEY</code></td><td>—</td><td>Llama 4 70B. Fast inference.</td></tr>
|
|
42
|
+
<tr><td>NVIDIA NIM</td><td><code>NVIDIA_API_KEY</code></td><td>—</td><td>NVIDIA AI Foundation Models. DeepSeek, Llama 3.1, Nemotron.</td></tr>
|
|
43
|
+
<tr><td>Cohere</td><td><code>COHERE_API_KEY</code></td><td>command-r-plus</td><td>Command R+ model. 128K context. No vision.</td></tr>
|
|
44
|
+
<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>
|
|
45
|
+
<tr><td>Perplexity</td><td><code>PERPLEXITY_API_KEY</code></td><td>—</td><td>Sonar Huge Online. No tool calling support.</td></tr>
|
|
46
|
+
<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>
|
|
47
|
+
<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>
|
|
48
|
+
<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>
|
|
49
|
+
<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>
|
|
50
|
+
<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>
|
|
51
|
+
<tr><td>Poe</td><td><code>POE_API_KEY</code></td><td>—</td><td>OpenAI-compatible gateway. Claude 3.7 Sonnet available.</td></tr>
|
|
52
|
+
<tr><td>DigitalOcean</td><td><code>DIGITALOCEAN_API_KEY</code></td><td>—</td><td>Serverless Inference. Llama 3.1 70B.</td></tr>
|
|
53
|
+
</table>
|
|
54
|
+
|
|
55
|
+
<h2>Provider Selection</h2>
|
|
56
|
+
<p>ProviderManager resolves the active provider by:</p>
|
|
57
|
+
<ol>
|
|
58
|
+
<li>Scanning environment variables for configured API keys</li>
|
|
59
|
+
<li>Loading provider metadata from <code>providers.json</code></li>
|
|
60
|
+
<li>Resolving model names to provider-specific identifiers</li>
|
|
61
|
+
<li>Applying the adapter layer for non-Anthropic providers</li>
|
|
62
|
+
<li>Handling config migration and backward compatibility</li>
|
|
63
|
+
</ol>
|
|
64
|
+
|
|
65
|
+
<h2>Adapter Layer</h2>
|
|
66
|
+
<p>Non-Anthropic providers pass through adapters that normalize:</p>
|
|
67
|
+
<ul>
|
|
68
|
+
<li><strong>Content blocks</strong> — text, tool_use, tool_result, thinking block conversion (<code>contentBlockUtils.ts</code>)</li>
|
|
69
|
+
<li><strong>Tool calls</strong> — parsing across provider formats (<code>toolCallParser.ts</code>)</li>
|
|
70
|
+
<li><strong>Streaming chunks</strong> — per-chunk normalization for real-time display</li>
|
|
71
|
+
<li><strong>Errors</strong> — normalization with retry/rate-limit handling (<code>errorNormalizer.ts</code>)</li>
|
|
72
|
+
<li><strong>Usage</strong> — token counting and cost estimation (<code>usageNormalizer.ts</code>)</li>
|
|
73
|
+
</ul>
|
|
74
|
+
|
|
75
|
+
<h2>Runtime Switching</h2>
|
|
76
|
+
<pre><code>/model # Interactive model picker
|
|
77
|
+
/model list # List all available models across providers
|
|
78
|
+
/model claude-sonnet-4-7 # Switch to a specific model
|
|
79
|
+
/provider-select # Show or change active provider</code></pre>
|
|
80
|
+
|
|
81
|
+
<h2>Provider Capabilities</h2>
|
|
82
|
+
<p>Each provider declares capabilities in <code>providers.json</code>:</p>
|
|
83
|
+
<ul>
|
|
84
|
+
<li><strong>chat</strong> — Chat completion endpoint</li>
|
|
85
|
+
<li><strong>streaming</strong> — full, partial, or none</li>
|
|
86
|
+
<li><strong>toolCalling</strong> — native, adapted, or none</li>
|
|
87
|
+
<li><strong>vision</strong> — Image input support</li>
|
|
88
|
+
<li><strong>jsonSchema</strong> — Structured output via JSON schema</li>
|
|
89
|
+
<li><strong>reasoningEffort</strong> — Configurable reasoning depth</li>
|
|
90
|
+
<li><strong>contextLength</strong> — Maximum context window size</li>
|
|
91
|
+
</ul>
|
|
92
|
+
|
|
93
|
+
<h2>Local / Offline Development</h2>
|
|
94
|
+
<pre><code># Ollama — fully offline
|
|
95
|
+
export OLLAMA_API_KEY=ollama # (any non-empty value)
|
|
96
|
+
export OLLAMA_HOST=http://localhost:11434
|
|
97
|
+
clew
|
|
98
|
+
> /model ollama/llama4:70b
|
|
99
|
+
|
|
100
|
+
# Debug specific provider
|
|
101
|
+
DEBUG=provider:anthropic clew</code></pre>
|
|
102
|
+
|
|
103
|
+
<footer class="footer">
|
|
104
|
+
<span>Clew v0.1.2 — Open Source</span>
|
|
105
|
+
<div class="footer-links">
|
|
106
|
+
<a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
|
|
107
|
+
<a href="https://github.com/JonusNattapong/ClewCode/issues">Issues</a>
|
|
108
|
+
</div>
|
|
109
|
+
</footer>
|
|
110
|
+
</main>
|
|
111
|
+
<nav class="toc-sidebar"></nav>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<script src="js/main.js"></script>
|
|
115
|
+
</body>
|
|
116
|
+
</html>
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<header class="header">
|
|
15
|
+
<div class="header-inner">
|
|
16
|
+
<a href="index.html" class="logo"><span>Clew</span></a>
|
|
17
|
+
<nav class="header-nav">
|
|
18
|
+
<a href="index.html">Home</a><a href="index.html#features">Features</a><a href="index.html#commands">Commands</a><a href="quick-start.html" class="active">Docs</a><a href="https://github.com/JonusNattapong/ClewCode" target="_blank">GitHub</a>
|
|
19
|
+
</nav>
|
|
20
|
+
<button class="menu-btn" id="menuToggle" aria-label="Toggle navigation"><span></span><span></span><span></span></button>
|
|
21
|
+
</div>
|
|
22
|
+
</header>
|
|
23
|
+
<div class="app">
|
|
24
|
+
<aside class="sidebar" id="sidebar"></aside>
|
|
25
|
+
<div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
26
|
+
<div class="content-wrap">
|
|
27
|
+
<main class="content">
|
|
28
|
+
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Quick Start</span></div>
|
|
29
|
+
<h1>Quick Start</h1>
|
|
30
|
+
<p class="section-subtitle">From zero to AI-assisted coding in under a minute.</p>
|
|
31
|
+
|
|
32
|
+
<h2>1. Install</h2>
|
|
33
|
+
<pre><code>npm install -g clew-code
|
|
34
|
+
clew --version</code></pre>
|
|
35
|
+
<p>Make sure <a href="installation.html">Bun 1.3+</a> is installed first. The npm package does not bundle Bun.</p>
|
|
36
|
+
|
|
37
|
+
<h2>2. Set a Provider Key</h2>
|
|
38
|
+
<p>Set at least one API key as an environment variable. See <a href="providers.html">Providers</a> for all 27 options.</p>
|
|
39
|
+
<pre><code># Anthropic (recommended for best tool calling)
|
|
40
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
41
|
+
|
|
42
|
+
# Or DeepSeek
|
|
43
|
+
export DEEPSEEK_API_KEY=sk-...
|
|
44
|
+
|
|
45
|
+
# Or Google Gemini
|
|
46
|
+
export GOOGLE_API_KEY=...</code></pre>
|
|
47
|
+
|
|
48
|
+
<h2>3. Launch</h2>
|
|
49
|
+
<pre><code>cd /path/to/your/project
|
|
50
|
+
clew</code></pre>
|
|
51
|
+
<p>The terminal UI starts with model name, provider, and context usage in the status bar.</p>
|
|
52
|
+
|
|
53
|
+
<h2>4. First Commands</h2>
|
|
54
|
+
<pre><code>> "explain this project's structure"
|
|
55
|
+
|
|
56
|
+
> "find all the test files"
|
|
57
|
+
|
|
58
|
+
> /status # Check model, provider, API status
|
|
59
|
+
|
|
60
|
+
> /model sonnet # Switch model (alias or full ID)
|
|
61
|
+
|
|
62
|
+
> /doctor # Run environment diagnostics</code></pre>
|
|
63
|
+
|
|
64
|
+
<h2>5. Key Commands to Know</h2>
|
|
65
|
+
<table>
|
|
66
|
+
<tr><th>Command</th><th>Use</th></tr>
|
|
67
|
+
<tr><td><code>/clear</code></td><td>Clear conversation and free context</td></tr>
|
|
68
|
+
<tr><td><code>/compact</code></td><td>Compress context to save tokens</td></tr>
|
|
69
|
+
<tr><td><code>/model <name></code></td><td>Switch model or provider</td></tr>
|
|
70
|
+
<tr><td><code>/permissions</code></td><td>Manage tool permission rules</td></tr>
|
|
71
|
+
<tr><td><code>/plan</code></td><td>Toggle plan mode</td></tr>
|
|
72
|
+
<tr><td><code>/config</code></td><td>Open config panel</td></tr>
|
|
73
|
+
<tr><td><code>/help</code></td><td>Show all available commands</td></tr>
|
|
74
|
+
</table>
|
|
75
|
+
|
|
76
|
+
<h2>6. Sessions</h2>
|
|
77
|
+
<pre><code># Continue last conversation
|
|
78
|
+
clew -c
|
|
79
|
+
|
|
80
|
+
# Resume a specific session
|
|
81
|
+
clew -r
|
|
82
|
+
|
|
83
|
+
# Print mode (non-interactive, pipe-friendly)
|
|
84
|
+
clew -p "find all unused exports"
|
|
85
|
+
|
|
86
|
+
# With structured output
|
|
87
|
+
clew -p --output-format json "list all dependencies"</code></pre>
|
|
88
|
+
|
|
89
|
+
<div class="callout callout-info">
|
|
90
|
+
<strong>Tips</strong>
|
|
91
|
+
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.
|
|
92
|
+
</div>
|
|
93
|
+
</main>
|
|
94
|
+
<nav class="toc-sidebar"></nav>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
<script src="js/main.js"></script>
|
|
98
|
+
</body>
|
|
99
|
+
</html>
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<header class="header">
|
|
15
|
+
<div class="header-inner">
|
|
16
|
+
<a href="index.html" class="logo"><span>Clew</span></a>
|
|
17
|
+
<nav class="header-nav">
|
|
18
|
+
<a href="index.html">Home</a>
|
|
19
|
+
<a href="index.html#features">Features</a>
|
|
20
|
+
<a href="index.html#commands">Commands</a>
|
|
21
|
+
<a href="quick-start.html" class="active">Docs</a>
|
|
22
|
+
<a href="https://github.com/JonusNattapong/ClewCode" target="_blank">GitHub</a>
|
|
23
|
+
</nav>
|
|
24
|
+
<button class="menu-btn" id="menuToggle" aria-label="Toggle navigation"><span></span><span></span><span></span></button>
|
|
25
|
+
</div>
|
|
26
|
+
</header>
|
|
27
|
+
<div class="app">
|
|
28
|
+
<aside class="sidebar" id="sidebar"></aside>
|
|
29
|
+
<div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
30
|
+
<div class="content-wrap">
|
|
31
|
+
<main class="content">
|
|
32
|
+
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Research & Memory</span></div>
|
|
33
|
+
<h1>Research & Memory</h1>
|
|
34
|
+
<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>
|
|
35
|
+
|
|
36
|
+
<h2>Research System</h2>
|
|
37
|
+
<p>The research system lives in <code>src/research/</code> and supports deep, source-grounded research across local files, wiki content, and memory:</p>
|
|
38
|
+
<ul>
|
|
39
|
+
<li><strong>Citation extraction</strong> — Automatic extraction of citations from research sources</li>
|
|
40
|
+
<li><strong>Claim verification</strong> — Fact-check claims against multiple sources</li>
|
|
41
|
+
<li><strong>Dossier generation</strong> — Structured reports with source attribution</li>
|
|
42
|
+
<li><strong>Truth checking</strong> — Cross-reference claims for accuracy</li>
|
|
43
|
+
<li><strong>Source ranking</strong> — Prioritize authoritative sources</li>
|
|
44
|
+
</ul>
|
|
45
|
+
|
|
46
|
+
<h3>Research Commands</h3>
|
|
47
|
+
<table>
|
|
48
|
+
<tr><th>Command</th><th>Description</th></tr>
|
|
49
|
+
<tr><td><code>/research</code></td><td>Deep source-grounded research across local files, wiki, and memory</td></tr>
|
|
50
|
+
</table>
|
|
51
|
+
|
|
52
|
+
<h2>Memory System</h2>
|
|
53
|
+
<p>The memory system lives in <code>src/memdir/</code> and provides cross-session persistent knowledge storage with semantic search:</p>
|
|
54
|
+
<ul>
|
|
55
|
+
<li><strong>Semantic search</strong> — Find relevant memories using text embedding similarity</li>
|
|
56
|
+
<li><strong>Cross-lingual</strong> — Search across languages using semantic embeddings</li>
|
|
57
|
+
<li><strong>Memory age tracking</strong> — Automatically age and prune old memories</li>
|
|
58
|
+
<li><strong>Auto-memory capture</strong> — Automatically save important information</li>
|
|
59
|
+
<li><strong>Hybrid recall</strong> — Combines local embedding search with LLM-based retrieval</li>
|
|
60
|
+
<li><strong>Team sync</strong> — Share memory across team members</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</code></td><td>Edit Claude memory files</td></tr>
|
|
67
|
+
<tr><td><code>/memory-search</code></td><td>Search memories using semantic search (cross-lingual)</td></tr>
|
|
68
|
+
</table>
|
|
69
|
+
|
|
70
|
+
<h2>Architecture Files</h2>
|
|
71
|
+
<table>
|
|
72
|
+
<tr><th>Path</th><th>Role</th></tr>
|
|
73
|
+
<tr><td><code>src/research/</code></td><td>Deep research, dossier generation, truth checking, source ranking</td></tr>
|
|
74
|
+
<tr><td><code>src/memdir/</code></td><td>Semantic memory search and storage</td></tr>
|
|
75
|
+
</table>
|
|
76
|
+
|
|
77
|
+
<footer class="footer">
|
|
78
|
+
<span>Clew v0.1.2 — Open Source</span>
|
|
79
|
+
<div class="footer-links">
|
|
80
|
+
<a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
|
|
81
|
+
<a href="https://github.com/JonusNattapong/ClewCode/issues">Issues</a>
|
|
82
|
+
</div>
|
|
83
|
+
</footer>
|
|
84
|
+
</main>
|
|
85
|
+
<nav class="toc-sidebar"></nav>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
<script src="js/main.js"></script>
|
|
89
|
+
</body>
|
|
90
|
+
</html>
|
package/docs/skills.html
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
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</title>
|
|
7
|
+
<meta name="description" content="Reusable task instructions and workflows in Clew — create, use, and share skills across projects.">
|
|
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
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<header class="header"><div class="header-inner"><a href="index.html" class="logo"><span>Clew</span></a><nav class="header-nav"><a href="index.html">Home</a><a href="index.html#features">Features</a><a href="index.html#commands">Commands</a><a href="quick-start.html" class="active">Docs</a><a href="https://github.com/JonusNattapong/ClewCode" target="_blank">GitHub</a></nav><button class="menu-btn" id="menuToggle" aria-label="Toggle navigation"><span></span><span></span><span></span></button></div></header>
|
|
15
|
+
<div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
16
|
+
<div class="content-wrap"><main class="content">
|
|
17
|
+
<div class="breadcrumbs"><a href="index.html">Home</a><span class="sep">/</span><span>Skills</span></div>
|
|
18
|
+
<h1>Skills</h1>
|
|
19
|
+
<p class="section-subtitle">Skills are reusable prompt-type commands — markdown files that provide structured instructions to the AI model. They are loaded from bundled, user, project, and plugin directories.</p>
|
|
20
|
+
|
|
21
|
+
<h2>Overview</h2>
|
|
22
|
+
<p>Skills are commands of type <code>prompt</code> — they expand to text that is sent to the model. Unlike plugins (which provide JavaScript code), skills are purely instructional. They bridge the gap between ad-hoc prompts and full plugin development.</p>
|
|
23
|
+
|
|
24
|
+
<h2>Skill Locations</h2>
|
|
25
|
+
<p>Skills are loaded from four sources (order: bundled user project plugin):</p>
|
|
26
|
+
<table>
|
|
27
|
+
<tr><th>Source</th><th>Path</th><th>Scope</th></tr>
|
|
28
|
+
<tr><td>Bundled</td><td>Ships with Clew</td><td>All users</td></tr>
|
|
29
|
+
<tr><td>User</td><td><code>~/.claude/skills/<name>/SKILL.md</code></td><td>Personal</td></tr>
|
|
30
|
+
<tr><td>Project</td><td><code>.claude/skills/<name>/SKILL.md</code></td><td>Team (in-repo)</td></tr>
|
|
31
|
+
<tr><td>Plugin</td><td>Inside plugin directories</td><td>Plugin users</td></tr>
|
|
32
|
+
</table>
|
|
33
|
+
|
|
34
|
+
<h2>Skill Structure</h2>
|
|
35
|
+
<pre><code>my-skill/
|
|
36
|
+
SKILL.md # Skill instructions (required)
|
|
37
|
+
assets/ # Optional: scripts, references, examples</code></pre>
|
|
38
|
+
|
|
39
|
+
<p>The <code>SKILL.md</code> file uses frontmatter for metadata and markdown for instructions. Skills are registered as <code>prompt</code>-type commands and can be invoked by the model via the <code>SkillTool</code>.</p>
|
|
40
|
+
|
|
41
|
+
<h2>Managing Skills</h2>
|
|
42
|
+
<pre><code>/skill # List available skills or show skill details
|
|
43
|
+
/skills # List available skills
|
|
44
|
+
/skill-name # Invoke a specific skill directly</code></pre>
|
|
45
|
+
|
|
46
|
+
<h2>Skill Frontmatter</h2>
|
|
47
|
+
<p>Skills support YAML frontmatter for metadata and configuration:</p>
|
|
48
|
+
<pre><code>---
|
|
49
|
+
name: my-skill
|
|
50
|
+
description: Does focused text work
|
|
51
|
+
allowed-tools:
|
|
52
|
+
- Read
|
|
53
|
+
- Grep
|
|
54
|
+
disallowed-tools:
|
|
55
|
+
- Bash
|
|
56
|
+
- Edit
|
|
57
|
+
hooks:
|
|
58
|
+
PreToolUse:
|
|
59
|
+
- matcher: Bash
|
|
60
|
+
hooks:
|
|
61
|
+
- type: command
|
|
62
|
+
command: echo "About to run bash"
|
|
63
|
+
model: claude-sonnet-4-6
|
|
64
|
+
effort: high
|
|
65
|
+
user-invocable: true
|
|
66
|
+
context: fork
|
|
67
|
+
---</code></pre>
|
|
68
|
+
<p>Key frontmatter fields:</p>
|
|
69
|
+
<ul>
|
|
70
|
+
<li><code>allowed-tools</code> — Restrict which tools the model can use while this skill is active</li>
|
|
71
|
+
<li><code>disallowed-tools</code> — Explicitly block tools (e.g., <code>Bash</code>, <code>Edit</code>) for read-only skills</li>
|
|
72
|
+
<li><code>hooks</code> — Register PreToolUse, PostToolUse, or MessageDisplay hooks for the skill</li>
|
|
73
|
+
<li><code>model</code> — Override the model used when this skill runs</li>
|
|
74
|
+
<li><code>effort</code> — Set effort level (low, medium, high, xhigh, max)</li>
|
|
75
|
+
<li><code>context</code> — <code>inline</code> (default) expands into current conversation; <code>fork</code> runs as sub-agent</li>
|
|
76
|
+
</ul>
|
|
77
|
+
|
|
78
|
+
<h2>Creating a Skill</h2>
|
|
79
|
+
<pre><code>mkdir -p ~/.claude/skills/my-skill
|
|
80
|
+
touch ~/.claude/skills/my-skill/SKILL.md
|
|
81
|
+
# Edit SKILL.md with frontmatter and instructions</code></pre>
|
|
82
|
+
<p>Or use the <code>skillify</code> plugin to create a skill from an existing workflow.</p>
|
|
83
|
+
|
|
84
|
+
<h2>Project-Level Skills</h2>
|
|
85
|
+
<p>Place skills in <code>.claude/skills/</code> inside your repository to share with your team:</p>
|
|
86
|
+
<pre><code>.claude/
|
|
87
|
+
skills/
|
|
88
|
+
code-review/
|
|
89
|
+
SKILL.md
|
|
90
|
+
migration-workflow/
|
|
91
|
+
SKILL.md</code></pre>
|
|
92
|
+
<p>Project skills are automatically available to everyone working in the repository.</p>
|
|
93
|
+
|
|
94
|
+
<h2>Dynamic Skills</h2>
|
|
95
|
+
<p>Skills can be discovered dynamically during file operations. When a skill file is created or modified, it's automatically added to the available command list without restarting. Use <code>clearCommandMemoizationCaches()</code> to refresh the skill index.</p>
|
|
96
|
+
|
|
97
|
+
<div class="callout callout-info">
|
|
98
|
+
<strong>Skills vs. Plugins</strong>
|
|
99
|
+
Skills are instruction-only (markdown), no code required. Plugins provide executable JavaScript — commands, hooks, agents, MCP servers. Use skills to standardize AI behavior; use plugins for custom tooling.
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<footer class="footer">
|
|
103
|
+
<span>Clew v0.1.2 — Open Source</span>
|
|
104
|
+
<div class="footer-links">
|
|
105
|
+
<a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
|
|
106
|
+
<a href="https://github.com/JonusNattapong/ClewCode/issues">Issues</a>
|
|
107
|
+
</div>
|
|
108
|
+
</footer>
|
|
109
|
+
</main>
|
|
110
|
+
<nav class="toc-sidebar"></nav>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
<script src="js/main.js"></script>
|
|
114
|
+
</body>
|
|
115
|
+
</html>
|