clew-code 0.2.4 → 0.2.6
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 +264 -292
- package/dist/clew-dev.js +5118 -2840
- package/dist/main.js +2315 -2090
- package/docs/_config.yml +1 -1
- package/docs/architecture.html +145 -166
- package/docs/architecture.th.html +2 -23
- package/docs/commands.html +1 -22
- package/docs/commands.th.html +1 -22
- package/docs/configuration.html +145 -166
- package/docs/configuration.th.html +2 -23
- package/docs/css/styles.css +22 -0
- package/docs/daemon.html +128 -160
- package/docs/daemon.th.html +2 -30
- package/docs/features/bridge-mode.html +98 -98
- package/docs/features/bridge-mode.th.html +1 -1
- package/docs/features/evals.html +181 -181
- package/docs/features/evals.th.html +1 -1
- package/docs/features/searxng-search.html +150 -150
- package/docs/features/searxng-search.th.html +1 -1
- package/docs/features/sentry-setup.html +156 -156
- package/docs/features/sentry-setup.th.html +1 -1
- package/docs/index.html +298 -333
- package/docs/index.th.html +1 -36
- package/docs/installation.html +103 -124
- package/docs/installation.th.html +2 -23
- package/docs/internals/growthbook-ab-testing.html +112 -112
- package/docs/internals/growthbook-ab-testing.th.html +1 -1
- package/docs/internals/hidden-features.html +147 -147
- package/docs/internals/hidden-features.th.html +1 -1
- package/docs/js/main.js +78 -7
- package/docs/loop.html +180 -0
- package/docs/loop.th.html +226 -0
- package/docs/mcp.html +246 -157
- package/docs/mcp.th.html +156 -60
- package/docs/models.html +1 -22
- package/docs/models.th.html +1 -22
- package/docs/peer.html +235 -0
- package/docs/peer.th.html +279 -0
- package/docs/permission-model.html +101 -122
- package/docs/permission-model.th.html +2 -23
- package/docs/plugins.html +101 -122
- package/docs/plugins.th.html +2 -23
- package/docs/providers.html +117 -138
- package/docs/providers.th.html +2 -23
- package/docs/quick-start.html +92 -120
- package/docs/quick-start.th.html +1 -29
- package/docs/research-memory.html +79 -111
- package/docs/research-memory.th.html +2 -30
- package/docs/skills.html +116 -137
- package/docs/skills.th.html +2 -23
- package/docs/taste.html +96 -29
- package/docs/taste.th.html +193 -54
- package/docs/tools.html +169 -190
- package/docs/tools.th.html +2 -23
- package/docs/troubleshooting.html +105 -126
- package/docs/troubleshooting.th.html +2 -23
- package/package.json +5 -3
package/docs/index.th.html
CHANGED
|
@@ -13,42 +13,7 @@
|
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
<header class="header">
|
|
18
|
-
<div class="header-inner">
|
|
19
|
-
<a href="index.th.html" class="logo">
|
|
20
|
-
<span>Clew Code</span>
|
|
21
|
-
</a>
|
|
22
|
-
<nav class="header-nav">
|
|
23
|
-
<a href="index.th.html" class="active">หน้าแรก</a>
|
|
24
|
-
<a href="#features">ฟีเจอร์</a>
|
|
25
|
-
<a href="#commands">คำสั่ง</a>
|
|
26
|
-
<a href="quick-start.th.html">เอกสาร</a>
|
|
27
|
-
<a href="https://github.com/JonusNattapong/ClewCode" target="_blank">GitHub</a>
|
|
28
|
-
<div class="lang-wrap">
|
|
29
|
-
<button class="lang-btn">🌐</button>
|
|
30
|
-
<div class="lang-menu">
|
|
31
|
-
<a href="../readme/README.zh.md">中文</a>
|
|
32
|
-
<a href="index.th.html" class="active">ไทย</a>
|
|
33
|
-
<a href="../readme/README.ja.md">日本語</a>
|
|
34
|
-
<a href="../readme/README.ko.md">한국어</a>
|
|
35
|
-
<a href="../readme/README.es.md">Español</a>
|
|
36
|
-
<a href="../readme/README.fr.md">Français</a>
|
|
37
|
-
<a href="../readme/README.de.md">Deutsch</a>
|
|
38
|
-
<a href="../readme/README.pt.md">Português</a>
|
|
39
|
-
<a href="../readme/README.vi.md">Tiếng Việt</a>
|
|
40
|
-
<a href="../readme/README.id.md">Bahasa Indonesia</a>
|
|
41
|
-
<a href="../readme/README.ru.md">Русский</a>
|
|
42
|
-
<a href="../readme/README.hi.md">हिन्दी</a>
|
|
43
|
-
<a href="index.html">English</a>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
</nav>
|
|
47
|
-
<button class="menu-btn" id="menuToggle" aria-label="เปิด/ปิดเมนู">
|
|
48
|
-
<span></span><span></span><span></span>
|
|
49
|
-
</button>
|
|
50
|
-
</div>
|
|
51
|
-
</header>
|
|
16
|
+
<header class="header"></header>
|
|
52
17
|
|
|
53
18
|
<div class="app">
|
|
54
19
|
<!-- ─── Sidebar ─── -->
|
package/docs/installation.html
CHANGED
|
@@ -1,124 +1,103 @@
|
|
|
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>Installation — Clew</title>
|
|
7
|
-
<meta name="description" content="Install Clew via npm, run from source, or use the prebuilt binary.">
|
|
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"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<
|
|
80
|
-
<
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
</
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
</table>
|
|
105
|
-
|
|
106
|
-
<h2>Verifying Installation</h2>
|
|
107
|
-
<pre><code>/doctor # Run environment diagnostics
|
|
108
|
-
/status # Check version, model, account, API connectivity</code></pre>
|
|
109
|
-
|
|
110
|
-
<footer class="footer">
|
|
111
|
-
<span>Clew v0.1.2 — Open Source</span>
|
|
112
|
-
<div class="footer-links">
|
|
113
|
-
<a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
|
|
114
|
-
<a href="https://github.com/JonusNattapong/ClewCode/issues">Issues</a>
|
|
115
|
-
<a href="https://npmjs.com/package/clew-code">npm</a>
|
|
116
|
-
</div>
|
|
117
|
-
</footer>
|
|
118
|
-
</main>
|
|
119
|
-
<nav class="toc-sidebar"></nav>
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
<script src="js/main.js"></script>
|
|
123
|
-
</body>
|
|
124
|
-
</html>
|
|
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>Installation — Clew</title>
|
|
7
|
+
<meta name="description" content="Install Clew via npm, run from source, or use the prebuilt binary.">
|
|
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>Installation</span></div>
|
|
19
|
+
<h1>Installation</h1>
|
|
20
|
+
<p class="section-subtitle">Clew runs on Windows, macOS, Linux, and WSL2. Runtime: Bun 1.3+.</p>
|
|
21
|
+
|
|
22
|
+
<h2>Prerequisites</h2>
|
|
23
|
+
<ul>
|
|
24
|
+
<li><strong>Bun 1.3+</strong> — required runtime for both global installs and source builds</li>
|
|
25
|
+
<li>At least one AI provider API key</li>
|
|
26
|
+
</ul>
|
|
27
|
+
|
|
28
|
+
<h2>Via npm (global)</h2>
|
|
29
|
+
<pre><code>npm install -g clew-code
|
|
30
|
+
clew
|
|
31
|
+
|
|
32
|
+
# Verify
|
|
33
|
+
clew --version</code></pre>
|
|
34
|
+
<p><strong>Important:</strong> the npm package installs the launcher only. You must install <a href="https://bun.sh">Bun</a> separately before running <code>clew</code>.</p>
|
|
35
|
+
|
|
36
|
+
<h2>Via Bun (global)</h2>
|
|
37
|
+
<pre><code>bun install -g clew-code
|
|
38
|
+
clew</code></pre>
|
|
39
|
+
|
|
40
|
+
<h2>From Source</h2>
|
|
41
|
+
<pre><code>git clone https://github.com/JonusNattapong/ClewCode.git
|
|
42
|
+
cd ClewCode
|
|
43
|
+
bun install
|
|
44
|
+
bun run build
|
|
45
|
+
bun run start
|
|
46
|
+
|
|
47
|
+
# Development mode with watch
|
|
48
|
+
bun run dev</code></pre>
|
|
49
|
+
|
|
50
|
+
<p>Build output goes to <code>dist/</code>. The build uses Bun bundler with compile-time feature defines (<code>TRANSCRIPT_CLASSIFIER</code>, <code>CHICAGO_MCP</code>).</p>
|
|
51
|
+
|
|
52
|
+
<h2>Platform-Specific Notes</h2>
|
|
53
|
+
|
|
54
|
+
<h3>Windows</h3>
|
|
55
|
+
<ul>
|
|
56
|
+
<li>Both cmd and PowerShell supported as shell targets</li>
|
|
57
|
+
<li>ripgrep bundled at <code>src/utils/vendor/ripgrep/x64-win32/rg.exe</code></li>
|
|
58
|
+
<li>WSL2 recommended for best experience</li>
|
|
59
|
+
<li>Windows argv normalization in <code>src/entry.ts</code></li>
|
|
60
|
+
<li>TTY polyfill for Ink compatibility in <code>src/main.tsx</code></li>
|
|
61
|
+
</ul>
|
|
62
|
+
|
|
63
|
+
<h3>macOS</h3>
|
|
64
|
+
<ul>
|
|
65
|
+
<li>Native support with menu bar app integration (moltbot)</li>
|
|
66
|
+
<li>Voice Wake and Talk Mode overlays</li>
|
|
67
|
+
<li>Keychain prefetch for faster OAuth startup</li>
|
|
68
|
+
<li>WebChat and debug tools available</li>
|
|
69
|
+
</ul>
|
|
70
|
+
|
|
71
|
+
<h3>Linux</h3>
|
|
72
|
+
<ul>
|
|
73
|
+
<li>Full support via terminal</li>
|
|
74
|
+
<li>Tailscale Serve/Funnel for remote gateway access</li>
|
|
75
|
+
</ul>
|
|
76
|
+
|
|
77
|
+
<h2>Release Channels</h2>
|
|
78
|
+
<table>
|
|
79
|
+
<tr><th>Channel</th><th>npm Tag</th><th>Description</th></tr>
|
|
80
|
+
<tr><td>stable</td><td><code>latest</code></td><td>Tagged releases (vYYYY.M.D)</td></tr>
|
|
81
|
+
<tr><td>beta</td><td><code>beta</code></td><td>Prereleases (vYYYY.M.D-beta.N)</td></tr>
|
|
82
|
+
<tr><td>dev</td><td><code>dev</code></td><td>Moving main branch</td></tr>
|
|
83
|
+
</table>
|
|
84
|
+
|
|
85
|
+
<h2>Verifying Installation</h2>
|
|
86
|
+
<pre><code>/doctor # Run environment diagnostics
|
|
87
|
+
/status # Check version, model, account, API connectivity</code></pre>
|
|
88
|
+
|
|
89
|
+
<footer class="footer">
|
|
90
|
+
<span>Clew Code v0.2.4 — Open Source</span>
|
|
91
|
+
<div class="footer-links">
|
|
92
|
+
<a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
|
|
93
|
+
<a href="https://github.com/JonusNattapong/ClewCode/issues">Issues</a>
|
|
94
|
+
<a href="https://npmjs.com/package/clew-code">npm</a>
|
|
95
|
+
</div>
|
|
96
|
+
</footer>
|
|
97
|
+
</main>
|
|
98
|
+
<nav class="toc-sidebar"></nav>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
<script src="js/main.js"></script>
|
|
102
|
+
</body>
|
|
103
|
+
</html>
|
|
@@ -12,28 +12,7 @@
|
|
|
12
12
|
<link rel="icon" type="image/svg+xml" href="./assets/clew.svg">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
|
-
<header class="header"
|
|
16
|
-
<span>Clew Code</span>
|
|
17
|
-
</a><nav class="header-nav"><a href="index.th.html">หน้าแรก</a><a href="index.th.html#features">ฟีเจอร์</a><a href="index.th.html#commands">คำสั่ง</a><a href="quick-start.th.html" class="active">เอกสาร</a><a href="https://github.com/JonusNattapong/ClewCode" target="_blank">GitHub</a>
|
|
18
|
-
<div class="lang-wrap">
|
|
19
|
-
<button class="lang-btn">🌐</button>
|
|
20
|
-
<div class="lang-menu">
|
|
21
|
-
<a href="../readme/README.zh.md">中文</a>
|
|
22
|
-
<a href="../readme/README.th.md">ไทย</a>
|
|
23
|
-
<a href="../readme/README.ja.md">日本語</a>
|
|
24
|
-
<a href="../readme/README.ko.md">한국어</a>
|
|
25
|
-
<a href="../readme/README.es.md">Español</a>
|
|
26
|
-
<a href="../readme/README.fr.md">Français</a>
|
|
27
|
-
<a href="../readme/README.de.md">Deutsch</a>
|
|
28
|
-
<a href="../readme/README.pt.md">Português</a>
|
|
29
|
-
<a href="../readme/README.vi.md">Tiếng Việt</a>
|
|
30
|
-
<a href="../readme/README.id.md">Bahasa Indonesia</a>
|
|
31
|
-
<a href="../readme/README.ru.md">Русский</a>
|
|
32
|
-
<a href="../readme/README.hi.md">हिन्दी</a>
|
|
33
|
-
<a href="installation.html">English</a>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</nav><button class="menu-btn" id="menuToggle" aria-label="เปิด/ปิดเมนู"><span></span><span></span><span></span></button></div></header>
|
|
15
|
+
<header class="header"></header>
|
|
37
16
|
<div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
38
17
|
<div class="content-wrap"><main class="content">
|
|
39
18
|
<div class="breadcrumbs"><a href="index.th.html">หน้าแรก</a><span class="sep">/</span><span>การติดตั้ง</span></div>
|
|
@@ -108,7 +87,7 @@ bun run dev</code></pre>
|
|
|
108
87
|
/status # ตรวจสอบเวอร์ชัน, โมเดล, บัญชี, การเชื่อมต่อ API</code></pre>
|
|
109
88
|
|
|
110
89
|
<footer class="footer">
|
|
111
|
-
<span>Clew v0.
|
|
90
|
+
<span>Clew Code v0.2.4 — โอเพนซอร์ส</span>
|
|
112
91
|
<div class="footer-links">
|
|
113
92
|
<a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
|
|
114
93
|
<a href="https://github.com/JonusNattapong/ClewCode/issues">ปัญหา</a>
|
|
@@ -1,112 +1,112 @@
|
|
|
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>GrowthBook A/B Testing — Clew</title>
|
|
7
|
-
<meta name="description" content="GrowthBook A/B testing system for feature flags, experiments, and gradual rollouts in Clew.">
|
|
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"><div class="header-inner"><a href="../index.html" class="logo">
|
|
16
|
-
<span>Clew Code</span>
|
|
17
|
-
</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>
|
|
18
|
-
<div class="lang-wrap">
|
|
19
|
-
<button class="lang-btn">🌐</button>
|
|
20
|
-
<div class="lang-menu">
|
|
21
|
-
<a href="../../readme/README.zh.md">中文</a>
|
|
22
|
-
<a href="../../readme/README.th.md">ไทย</a>
|
|
23
|
-
<a href="../../readme/README.ja.md">日本語</a>
|
|
24
|
-
<a href="../../readme/README.ko.md">한국어</a>
|
|
25
|
-
<a href="../../readme/README.es.md">Español</a>
|
|
26
|
-
<a href="../../readme/README.fr.md">Français</a>
|
|
27
|
-
<a href="../../readme/README.de.md">Deutsch</a>
|
|
28
|
-
<a href="../../readme/README.pt.md">Português</a>
|
|
29
|
-
<a href="../../readme/README.vi.md">Tiếng Việt</a>
|
|
30
|
-
<a href="../../readme/README.id.md">Bahasa Indonesia</a>
|
|
31
|
-
<a href="../../readme/README.ru.md">Русский</a>
|
|
32
|
-
<a href="../../readme/README.hi.md">हिन्दी</a>
|
|
33
|
-
<a href="../../README.md">English</a>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</nav><button class="menu-btn" id="menuToggle" aria-label="Toggle navigation"><span></span><span></span><span></span></button></div></header>
|
|
37
|
-
<div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
38
|
-
<div class="content-wrap"><main class="content">
|
|
39
|
-
<div class="breadcrumbs"><a href="../index.html">Home</a><span class="sep">/</span><a href="../index.html#features">Internals</a><span class="sep">/</span><span>A/B Testing</span></div>
|
|
40
|
-
<h1>GrowthBook A/B Testing</h1>
|
|
41
|
-
<p class="section-subtitle">Feature flagging and experiment management using GrowthBook for gradual rollouts, A/B tests, and targeted feature releases.</p>
|
|
42
|
-
|
|
43
|
-
<div class="callout callout-warn">
|
|
44
|
-
<strong>Internal Infrastructure</strong>
|
|
45
|
-
GrowthBook integration is used for Clew's own product development telemetry and experiment tracking. It is not a user-facing feature — this documentation is for contributors and integrators.
|
|
46
|
-
</div>
|
|
47
|
-
|
|
48
|
-
<h2>Overview</h2>
|
|
49
|
-
<p>GrowthBook provides feature flagging and A/B testing within Clew. It enables controlled rollouts of new features, experiment tracking, and targeted feature releases based on user segments. The SDK is initialized at startup and evaluates flags locally with caching for minimal latency.</p>
|
|
50
|
-
|
|
51
|
-
<h2>Architecture</h2>
|
|
52
|
-
<ul>
|
|
53
|
-
<li><strong>Feature Flags</strong> — Boolean, string, number, and JSON flag types evaluated locally</li>
|
|
54
|
-
<li><strong>Experiments</strong> — Multi-variant A/B tests with statistical tracking and automatic analysis</li>
|
|
55
|
-
<li><strong>Forced Variations</strong> — Override flag values for testing and debugging</li>
|
|
56
|
-
<li><strong>Sticky Bucketing</strong> — Consistent user experience across sessions based on stable identifiers</li>
|
|
57
|
-
<li><strong>Local Caching</strong> — Feature definitions cached after initial fetch for offline resilience</li>
|
|
58
|
-
</ul>
|
|
59
|
-
|
|
60
|
-
<h2>Usage in Code</h2>
|
|
61
|
-
<pre><code>// Check if a feature is enabled (cached evaluation)
|
|
62
|
-
const isEnabled = getFeatureValue_CACHED_MAY_BE_STALE(
|
|
63
|
-
'tengu_plum_vx3', // Feature key
|
|
64
|
-
false // Default value
|
|
65
|
-
);
|
|
66
|
-
// Use the feature value
|
|
67
|
-
if (isEnabled) {
|
|
68
|
-
// New behavior path
|
|
69
|
-
} else {
|
|
70
|
-
// Control behavior path
|
|
71
|
-
}</code></pre>
|
|
72
|
-
|
|
73
|
-
<h2>Configuration</h2>
|
|
74
|
-
<table>
|
|
75
|
-
<tr><th>Variable</th><th>Purpose</th></tr>
|
|
76
|
-
<tr><td><code>GROWTHBOOK_API_HOST</code></td><td>GrowthBook API endpoint (self-hosted or cloud)</td></tr>
|
|
77
|
-
<tr><td><code>GROWTHBOOK_CLIENT_KEY</code></td><td>Client-side SDK key for feature flag access</td></tr>
|
|
78
|
-
<tr><td><code>GROWTHBOOK_FORCE_VARIATION</code></td><td>Force a specific variation for testing</td></tr>
|
|
79
|
-
</table>
|
|
80
|
-
|
|
81
|
-
<h2>How It Works</h2>
|
|
82
|
-
<ol>
|
|
83
|
-
<li>On startup, Clew initializes the GrowthBook SDK with the configured API host and client key</li>
|
|
84
|
-
<li>Feature definitions are fetched from the GrowthBook server and cached locally</li>
|
|
85
|
-
<li>Throughout the session, code checks feature flags using the cached evaluation function</li>
|
|
86
|
-
<li>Flag values are re-evaluated periodically or on explicit refresh</li>
|
|
87
|
-
<li>Experiment results are tracked and sent back to GrowthBook for statistical analysis</li>
|
|
88
|
-
<li>Forced variations can override normal bucket assignment for testing</li>
|
|
89
|
-
</ol>
|
|
90
|
-
|
|
91
|
-
<h2>Best Practices</h2>
|
|
92
|
-
<ul>
|
|
93
|
-
<li>Always provide a sensible default value (usually <code>false</code> for features not yet released)</li>
|
|
94
|
-
<li>Use descriptive, unique feature keys</li>
|
|
95
|
-
<li>Cache-aware design: do not rely on flag values being real-time; they are evaluated at session start</li>
|
|
96
|
-
<li>Clean up stale flags after experiments conclude</li>
|
|
97
|
-
</ul>
|
|
98
|
-
|
|
99
|
-
<footer class="footer">
|
|
100
|
-
<span>Clew v0.
|
|
101
|
-
<div class="footer-links">
|
|
102
|
-
<a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
|
|
103
|
-
<a href="https://github.com/JonusNattapong/ClewCode/issues">Issues</a>
|
|
104
|
-
</div>
|
|
105
|
-
</footer>
|
|
106
|
-
</main>
|
|
107
|
-
<nav class="toc-sidebar"></nav>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
<script src="../js/main.js"></script>
|
|
111
|
-
</body>
|
|
112
|
-
</html>
|
|
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>GrowthBook A/B Testing — Clew</title>
|
|
7
|
+
<meta name="description" content="GrowthBook A/B testing system for feature flags, experiments, and gradual rollouts in Clew.">
|
|
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"><div class="header-inner"><a href="../index.html" class="logo">
|
|
16
|
+
<span>Clew Code</span>
|
|
17
|
+
</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>
|
|
18
|
+
<div class="lang-wrap">
|
|
19
|
+
<button class="lang-btn">🌐</button>
|
|
20
|
+
<div class="lang-menu">
|
|
21
|
+
<a href="../../readme/README.zh.md">中文</a>
|
|
22
|
+
<a href="../../readme/README.th.md">ไทย</a>
|
|
23
|
+
<a href="../../readme/README.ja.md">日本語</a>
|
|
24
|
+
<a href="../../readme/README.ko.md">한국어</a>
|
|
25
|
+
<a href="../../readme/README.es.md">Español</a>
|
|
26
|
+
<a href="../../readme/README.fr.md">Français</a>
|
|
27
|
+
<a href="../../readme/README.de.md">Deutsch</a>
|
|
28
|
+
<a href="../../readme/README.pt.md">Português</a>
|
|
29
|
+
<a href="../../readme/README.vi.md">Tiếng Việt</a>
|
|
30
|
+
<a href="../../readme/README.id.md">Bahasa Indonesia</a>
|
|
31
|
+
<a href="../../readme/README.ru.md">Русский</a>
|
|
32
|
+
<a href="../../readme/README.hi.md">हिन्दी</a>
|
|
33
|
+
<a href="../../README.md">English</a>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</nav><button class="menu-btn" id="menuToggle" aria-label="Toggle navigation"><span></span><span></span><span></span></button></div></header>
|
|
37
|
+
<div class="app"><aside class="sidebar" id="sidebar"></aside><div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
38
|
+
<div class="content-wrap"><main class="content">
|
|
39
|
+
<div class="breadcrumbs"><a href="../index.html">Home</a><span class="sep">/</span><a href="../index.html#features">Internals</a><span class="sep">/</span><span>A/B Testing</span></div>
|
|
40
|
+
<h1>GrowthBook A/B Testing</h1>
|
|
41
|
+
<p class="section-subtitle">Feature flagging and experiment management using GrowthBook for gradual rollouts, A/B tests, and targeted feature releases.</p>
|
|
42
|
+
|
|
43
|
+
<div class="callout callout-warn">
|
|
44
|
+
<strong>Internal Infrastructure</strong>
|
|
45
|
+
GrowthBook integration is used for Clew's own product development telemetry and experiment tracking. It is not a user-facing feature — this documentation is for contributors and integrators.
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<h2>Overview</h2>
|
|
49
|
+
<p>GrowthBook provides feature flagging and A/B testing within Clew. It enables controlled rollouts of new features, experiment tracking, and targeted feature releases based on user segments. The SDK is initialized at startup and evaluates flags locally with caching for minimal latency.</p>
|
|
50
|
+
|
|
51
|
+
<h2>Architecture</h2>
|
|
52
|
+
<ul>
|
|
53
|
+
<li><strong>Feature Flags</strong> — Boolean, string, number, and JSON flag types evaluated locally</li>
|
|
54
|
+
<li><strong>Experiments</strong> — Multi-variant A/B tests with statistical tracking and automatic analysis</li>
|
|
55
|
+
<li><strong>Forced Variations</strong> — Override flag values for testing and debugging</li>
|
|
56
|
+
<li><strong>Sticky Bucketing</strong> — Consistent user experience across sessions based on stable identifiers</li>
|
|
57
|
+
<li><strong>Local Caching</strong> — Feature definitions cached after initial fetch for offline resilience</li>
|
|
58
|
+
</ul>
|
|
59
|
+
|
|
60
|
+
<h2>Usage in Code</h2>
|
|
61
|
+
<pre><code>// Check if a feature is enabled (cached evaluation)
|
|
62
|
+
const isEnabled = getFeatureValue_CACHED_MAY_BE_STALE(
|
|
63
|
+
'tengu_plum_vx3', // Feature key
|
|
64
|
+
false // Default value
|
|
65
|
+
);
|
|
66
|
+
// Use the feature value
|
|
67
|
+
if (isEnabled) {
|
|
68
|
+
// New behavior path
|
|
69
|
+
} else {
|
|
70
|
+
// Control behavior path
|
|
71
|
+
}</code></pre>
|
|
72
|
+
|
|
73
|
+
<h2>Configuration</h2>
|
|
74
|
+
<table>
|
|
75
|
+
<tr><th>Variable</th><th>Purpose</th></tr>
|
|
76
|
+
<tr><td><code>GROWTHBOOK_API_HOST</code></td><td>GrowthBook API endpoint (self-hosted or cloud)</td></tr>
|
|
77
|
+
<tr><td><code>GROWTHBOOK_CLIENT_KEY</code></td><td>Client-side SDK key for feature flag access</td></tr>
|
|
78
|
+
<tr><td><code>GROWTHBOOK_FORCE_VARIATION</code></td><td>Force a specific variation for testing</td></tr>
|
|
79
|
+
</table>
|
|
80
|
+
|
|
81
|
+
<h2>How It Works</h2>
|
|
82
|
+
<ol>
|
|
83
|
+
<li>On startup, Clew initializes the GrowthBook SDK with the configured API host and client key</li>
|
|
84
|
+
<li>Feature definitions are fetched from the GrowthBook server and cached locally</li>
|
|
85
|
+
<li>Throughout the session, code checks feature flags using the cached evaluation function</li>
|
|
86
|
+
<li>Flag values are re-evaluated periodically or on explicit refresh</li>
|
|
87
|
+
<li>Experiment results are tracked and sent back to GrowthBook for statistical analysis</li>
|
|
88
|
+
<li>Forced variations can override normal bucket assignment for testing</li>
|
|
89
|
+
</ol>
|
|
90
|
+
|
|
91
|
+
<h2>Best Practices</h2>
|
|
92
|
+
<ul>
|
|
93
|
+
<li>Always provide a sensible default value (usually <code>false</code> for features not yet released)</li>
|
|
94
|
+
<li>Use descriptive, unique feature keys</li>
|
|
95
|
+
<li>Cache-aware design: do not rely on flag values being real-time; they are evaluated at session start</li>
|
|
96
|
+
<li>Clean up stale flags after experiments conclude</li>
|
|
97
|
+
</ul>
|
|
98
|
+
|
|
99
|
+
<footer class="footer">
|
|
100
|
+
<span>Clew Code v0.2.4 — Open Source</span>
|
|
101
|
+
<div class="footer-links">
|
|
102
|
+
<a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
|
|
103
|
+
<a href="https://github.com/JonusNattapong/ClewCode/issues">Issues</a>
|
|
104
|
+
</div>
|
|
105
|
+
</footer>
|
|
106
|
+
</main>
|
|
107
|
+
<nav class="toc-sidebar"></nav>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
<script src="../js/main.js"></script>
|
|
111
|
+
</body>
|
|
112
|
+
</html>
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
</table>
|
|
66
66
|
|
|
67
67
|
<footer class="footer">
|
|
68
|
-
<span>Clew v0.
|
|
68
|
+
<span>Clew Code v0.2.4 — โอเพนซอร์ส</span>
|
|
69
69
|
<div class="footer-links">
|
|
70
70
|
<a href="https://github.com/JonusNattapong/ClewCode">GitHub</a>
|
|
71
71
|
<a href="https://github.com/JonusNattapong/ClewCode/issues">ปัญหา</a>
|