SPB Git

spb/khaelor Public

KHAELOR — a terminal-native autonomous engineering agent powered by Anthropic.

TypeScript 82.9% HTML 14.9% CSS 1.1% JavaScript 0.7%
11.5 KB · 216 lines html
Raw Blame History
1<!doctype html>2<!--3KHAELOR4File: website/public/docs/getting-started.html5Description: Getting started — installation, API key setup, and the first session walkthrough.6Author: Simon-Pierre Boucher7Contact: contact@spboucher.ai8-->9<html lang="en">10<head>11<meta charset="utf-8">12<meta name="viewport" content="width=device-width, initial-scale=1">13<title>Getting started — KHAELOR</title>14<meta name="description" content="Install KHAELOR, set up your Anthropic API key, and run your first session.">15<link rel="stylesheet" href="/styles.css">16<script>17(function(){try{var t=localStorage.getItem("khaelor-theme");if(!t&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches)t="light";if(t==="light")document.documentElement.setAttribute("data-theme","light");}catch(e){}})();18</script>19<script defer src="/site.js"></script>20</head>21<body>2223<header class="site-header"><div class="inner">24  <a class="wordmark" href="/"><span class="glyph">&#10095;</span><span class="g-ember">KHAELOR</span></a>25  <nav>26    <a href="/docs/getting-started.html">Docs</a>27    <a href="/#install">Install</a>28    <button id="theme-toggle" type="button" aria-label="Toggle color theme">light</button>29  </nav>30</div></header>3132<main class="page"><div class="docs-layout">3334<aside class="sidebar">35  <div class="group"><div class="group-title">Start</div>36    <a href="/docs/getting-started.html">Getting started</a>37    <a href="/docs/cookbook.html">Cookbook</a>38  </div>39  <div class="group"><div class="group-title">Using KHAELOR</div>40    <a href="/docs/usage.html">The TUI</a>41    <a href="/docs/commands.html">Commands &amp; keyboard</a>42    <a href="/docs/tools.html">Tools</a>43    <a href="/docs/sessions.html">Sessions</a>44  </div>45  <div class="group"><div class="group-title">Autonomy</div>46    <a href="/docs/phases.html">Phase gates</a>47    <a href="/docs/verification.html">Verification</a>48    <a href="/docs/worktrees.html">Parallel worktrees</a>49    <a href="/docs/daemon.html">The daemon</a>50  </div>51  <div class="group"><div class="group-title">Intelligence</div>52    <a href="/docs/repograph.html">Semantic index</a>53    <a href="/docs/memory.html">Project memory</a>54    <a href="/docs/context.html">Context engine</a>55    <a href="/docs/fork-replay.html">Fork · replay · sdiff</a>56  </div>57  <div class="group"><div class="group-title">Control</div>58    <a href="/docs/permissions.html">Permissions</a>59    <a href="/docs/configuration.html">Configuration</a>60    <a href="/docs/cli.html">CLI reference</a>61  </div>62  <div class="group"><div class="group-title">Internals</div>63    <a href="/docs/architecture.html">Architecture</a>64    <a href="/docs/events.html">The event model</a>65    <a href="/docs/theming.html">Theming &amp; terminal</a>66  </div>67  <div class="group"><div class="group-title">Help</div>68    <a href="/docs/faq.html">FAQ &amp; troubleshooting</a>69  </div>70</aside>7172<article class="content">7374<h1>Getting started</h1>75<p class="lead">From zero to a working agent in your terminal in under two minutes.</p>7677<h2 id="requirements">Requirements<a class="anchor" href="#requirements">#</a></h2>78<ul>79  <li><strong>Node.js &ge; 22</strong> and <strong>npm</strong> — check with <code>node --version</code>.</li>80  <li><strong>macOS or Linux</strong> (primary targets). Any reasonably modern terminal emulator works; see the <a href="/docs/faq.html#terminals">terminal compatibility notes</a>.</li>81  <li>An <strong>Anthropic API key</strong> — KHAELOR V1 is Anthropic-only by design.</li>82</ul>8384<h2 id="install">Install<a class="anchor" href="#install">#</a></h2>8586<h3 id="one-liner">The one-liner</h3>87<pre><code>curl -fsSL https://www.khaelor.sh/install.sh | sh</code></pre>88<p>The installer is a short, readable POSIX shell script. It:</p>89<ol>90  <li>Verifies <code>node</code> exists and is version 22 or newer (with a clear message if not).</li>91  <li>Verifies <code>npm</code> exists.</li>92  <li>Runs <code>npm install -g https://www.khaelor.sh/khaelor.tgz</code>.</li>93  <li>Verifies the install by running <code>khaelor --version</code>.</li>94  <li>Prints next steps.</li>95</ol>96<p>You can read it before running it — it is served as plain text at97<a href="/install.sh"><code>https://www.khaelor.sh/install.sh</code></a>. It never uses98<code>sudo</code> on its own; if a global install needs elevated permissions it tells you99exactly what to do instead.</p>100101<h3 id="npm">Manual install with npm</h3>102<p>If you prefer to run npm yourself:</p>103<pre><code>npm install -g https://www.khaelor.sh/khaelor.tgz</code></pre>104105<h3 id="eacces">If npm reports <code>EACCES</code></h3>106<p>A permission error on global install means your npm prefix is owned by root. The clean fix107is a user-owned prefix (never <code>sudo npm install</code> if you can avoid it):</p>108<pre><code>mkdir -p ~/.npm-global109npm config set prefix ~/.npm-global110export PATH="$HOME/.npm-global/bin:$PATH"   # add to your shell profile too111npm install -g https://www.khaelor.sh/khaelor.tgz</code></pre>112113<h2 id="api-key">Set up your Anthropic API key<a class="anchor" href="#api-key">#</a></h2>114<p>KHAELOR reads the key from the <code>ANTHROPIC_API_KEY</code> environment variable — and115<em>only</em> from the environment. Config files that contain an <code>apiKey</code>-style116field are rejected at load time, so a key can never end up committed to a repository.</p>117<pre><code>export ANTHROPIC_API_KEY=sk-ant-...</code></pre>118<p>To make it permanent, add that line to your shell profile119(<code>~/.zshrc</code>, <code>~/.bashrc</code>, or <code>~/.profile</code>).</p>120<div class="note">121<p>KHAELOR never displays the key, never writes it to logs, and redacts it from every122debugging view. <code>/config</code> shows only <code>set via environment &#10003;</code>.</p>123</div>124125<h2 id="first-session">Your first session<a class="anchor" href="#first-session">#</a></h2>126127<p>Change into a project directory and start KHAELOR:</p>128<pre><code>cd ~/dev/my-project129khaelor</code></pre>130131<p>Startup is nearly instant — four lines of identity and an editable prompt:</p>132<pre class="term" data-no-copy><code> <span class="t-b">KHAELOR</span>133 <span class="t-dim">~/dev/my-project &middot; main</span>134 <span class="t-dim">claude-sonnet-4-5 &middot; thinking adaptive</span>135<span class="t-dim">────────────────────────────────────────────────────</span>136 What do you want to build?137 <span class="t-accent">&#10095;</span> _</code></pre>138139<p>If the key is missing you get one calm instruction instead of an error dump:</p>140<pre class="term" data-no-copy><code> <span class="t-b">KHAELOR</span>141 <span class="t-dim">~/dev/my-project &middot; main</span>142<span class="t-dim">────────────────────────────────────────────────────</span>143 No Anthropic API key found.144 Set ANTHROPIC_API_KEY or run /config to add one.145 <span class="t-accent">&#10095;</span> _</code></pre>146147<h3 id="ask-something">Ask for something real</h3>148<p>Type a request and press <kbd>Enter</kbd>:</p>149<pre class="term" data-no-copy><code> <span class="t-accent">&#10095;</span> why does the login test fail intermittently?150151 <span class="t-dim">&#9656;</span> Search <span class="t-b">"login"</span> <span class="t-dim">&middot; 12 matches in 4 files</span>152 <span class="t-dim">&#9656;</span> Read <span class="t-b">tests/auth/login.test.ts</span> <span class="t-dim">&middot; 148 lines</span>153 <span class="t-dim">&#9656;</span> Run <span class="t-b">npm test -- login</span> <span class="t-dim">&middot;</span> <span class="t-err">exit 1</span> <span class="t-dim">&middot; 6.8s</span>154155 The test races the session cookie: it asserts before the async156 store write resolves. The fix is to await the flush in the fixture.</code></pre>157<p>While the agent works, a single status line shows what is actually happening158(<code>&#9679; Searching repository &middot; 2.3s</code>), tool calls settle into compact159one-liners, and you can keep typing — follow-up messages queue and inject safely.</p>160161<h3 id="first-permission">The first permission prompt</h3>162<p>The first time the agent wants to run a command that is not on the safe allowlist, an163inline panel appears. Three keys, no typing:</p>164<pre class="term" data-no-copy><code>&#9581;&#9472; KHAELOR requests permission &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9583;165&#9474;  Run                                              &#9474;166&#9474;  npm install                                      &#9474;167&#9474;                                                   &#9474;168&#9474;  Working directory                                &#9474;169&#9474;  ~/dev/my-project                                 &#9474;170&#9474;                                                   &#9474;171&#9474;  [ Enter ] Allow once                             &#9474;172&#9474;  [ A ]     Always allow in this project           &#9474;173&#9474;  [ Esc ]   Deny                                   &#9474;174&#9585;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9583;</code></pre>175<p>Press <kbd>A</kbd> once for <code>npm test</code> and it never asks again in this project.176Full details: <a href="/docs/permissions.html">Permissions</a>.</p>177178<h3 id="wrap-up">Wrap up</h3>179<ul>180  <li><code>/cost</code> — real token usage and dollars for this session.</li>181  <li><code>/diff</code> — everything KHAELOR changed (never your pre-existing diff).</li>182  <li><code>/quit</code> or <kbd>Ctrl+D</kbd> — exit. The session is persisted automatically; <code>/resume</code> picks it back up later.</li>183</ul>184185<h2 id="cli-flags">CLI reference<a class="anchor" href="#cli-flags">#</a></h2>186<table>187  <tr><th>Invocation</th><th>Meaning</th></tr>188  <tr><td><code>khaelor</code></td><td class="wrap">Start the interactive TUI in the current directory.</td></tr>189  <tr><td><code>khaelor --model &lt;id&gt;</code></td><td class="wrap">Start with a specific Anthropic model id or alias for this session.</td></tr>190  <tr><td><code>khaelor --print "prompt"</code></td><td class="wrap">Non-interactive: run one agent turn, print the answer, exit.</td></tr>191  <tr><td><code>khaelor --debug</code></td><td class="wrap">Write developer logs and performance histograms to <code>~/.khaelor/logs/</code>. The TUI stays clean.</td></tr>192  <tr><td><code>khaelor --version</code></td><td class="wrap">Print the installed version.</td></tr>193</table>194195<h2 id="next">Where to go next<a class="anchor" href="#next">#</a></h2>196<ul>197  <li><a href="/docs/usage.html">The TUI</a> — the composer, file mentions, shell mode, steering.</li>198  <li><a href="/docs/commands.html">Commands &amp; keyboard</a> — every slash command and key binding.</li>199  <li><a href="/docs/configuration.html">Configuration</a> — models, thinking mode, output budget.</li>200</ul>201202<div class="pager">203  <div class="next"><span class="label">Next</span><a href="/docs/usage.html">The TUI &rarr;</a></div>204</div>205206</article>207</div></main>208209<footer class="site-footer"><div class="inner">210  <span>KHAELOR — Simon-Pierre Boucher &middot; <a href="mailto:contact@spboucher.ai">contact@spboucher.ai</a></span>211  <span>Anthropic-powered &middot; terminal-native by design</span>212</div></footer>213214</body>215</html>216