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%
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">❯</span>KHAELOR</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 </div>38 <div class="group"><div class="group-title">Using KHAELOR</div>39 <a href="/docs/usage.html">The TUI</a>40 <a href="/docs/commands.html">Commands & keyboard</a>41 <a href="/docs/tools.html">Tools</a>42 <a href="/docs/sessions.html">Sessions</a>43 </div>44 <div class="group"><div class="group-title">Control</div>45 <a href="/docs/permissions.html">Permissions</a>46 <a href="/docs/configuration.html">Configuration</a>47 </div>48 <div class="group"><div class="group-title">Help</div>49 <a href="/docs/faq.html">FAQ & troubleshooting</a>50 </div>51</aside>5253<article class="content">5455<h1>Getting started</h1>56<p class="lead">From zero to a working agent in your terminal in under two minutes.</p>5758<h2 id="requirements">Requirements<a class="anchor" href="#requirements">#</a></h2>59<ul>60 <li><strong>Node.js ≥ 22</strong> and <strong>npm</strong> — check with <code>node --version</code>.</li>61 <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>62 <li>An <strong>Anthropic API key</strong> — KHAELOR V1 is Anthropic-only by design.</li>63</ul>6465<h2 id="install">Install<a class="anchor" href="#install">#</a></h2>6667<h3 id="one-liner">The one-liner</h3>68<pre><code>curl -fsSL https://www.khaelor.sh/install.sh | sh</code></pre>69<p>The installer is a short, readable POSIX shell script. It:</p>70<ol>71 <li>Verifies <code>node</code> exists and is version 22 or newer (with a clear message if not).</li>72 <li>Verifies <code>npm</code> exists.</li>73 <li>Runs <code>npm install -g https://www.khaelor.sh/khaelor.tgz</code>.</li>74 <li>Verifies the install by running <code>khaelor --version</code>.</li>75 <li>Prints next steps.</li>76</ol>77<p>You can read it before running it — it is served as plain text at78<a href="/install.sh"><code>https://www.khaelor.sh/install.sh</code></a>. It never uses79<code>sudo</code> on its own; if a global install needs elevated permissions it tells you80exactly what to do instead.</p>8182<h3 id="npm">Manual install with npm</h3>83<p>If you prefer to run npm yourself:</p>84<pre><code>npm install -g https://www.khaelor.sh/khaelor.tgz</code></pre>8586<h3 id="eacces">If npm reports <code>EACCES</code></h3>87<p>A permission error on global install means your npm prefix is owned by root. The clean fix88is a user-owned prefix (never <code>sudo npm install</code> if you can avoid it):</p>89<pre><code>mkdir -p ~/.npm-global90npm config set prefix ~/.npm-global91export PATH="$HOME/.npm-global/bin:$PATH" # add to your shell profile too92npm install -g https://www.khaelor.sh/khaelor.tgz</code></pre>9394<h2 id="api-key">Set up your Anthropic API key<a class="anchor" href="#api-key">#</a></h2>95<p>KHAELOR reads the key from the <code>ANTHROPIC_API_KEY</code> environment variable — and96<em>only</em> from the environment. Config files that contain an <code>apiKey</code>-style97field are rejected at load time, so a key can never end up committed to a repository.</p>98<pre><code>export ANTHROPIC_API_KEY=sk-ant-...</code></pre>99<p>To make it permanent, add that line to your shell profile100(<code>~/.zshrc</code>, <code>~/.bashrc</code>, or <code>~/.profile</code>).</p>101<div class="note">102<p>KHAELOR never displays the key, never writes it to logs, and redacts it from every103debugging view. <code>/config</code> shows only <code>set via environment ✓</code>.</p>104</div>105106<h2 id="first-session">Your first session<a class="anchor" href="#first-session">#</a></h2>107108<p>Change into a project directory and start KHAELOR:</p>109<pre><code>cd ~/dev/my-project110khaelor</code></pre>111112<p>Startup is nearly instant — four lines of identity and an editable prompt:</p>113<pre class="term" data-no-copy><code> <span class="t-b">KHAELOR</span>114 <span class="t-dim">~/dev/my-project · main</span>115 <span class="t-dim">claude-sonnet-4-5 · thinking adaptive</span>116<span class="t-dim">────────────────────────────────────────────────────</span>117 What do you want to build?118 <span class="t-accent">❯</span> _</code></pre>119120<p>If the key is missing you get one calm instruction instead of an error dump:</p>121<pre class="term" data-no-copy><code> <span class="t-b">KHAELOR</span>122 <span class="t-dim">~/dev/my-project · main</span>123<span class="t-dim">────────────────────────────────────────────────────</span>124 No Anthropic API key found.125 Set ANTHROPIC_API_KEY or run /config to add one.126 <span class="t-accent">❯</span> _</code></pre>127128<h3 id="ask-something">Ask for something real</h3>129<p>Type a request and press <kbd>Enter</kbd>:</p>130<pre class="term" data-no-copy><code> <span class="t-accent">❯</span> why does the login test fail intermittently?131132 <span class="t-dim">▸</span> Search <span class="t-b">"login"</span> <span class="t-dim">· 12 matches in 4 files</span>133 <span class="t-dim">▸</span> Read <span class="t-b">tests/auth/login.test.ts</span> <span class="t-dim">· 148 lines</span>134 <span class="t-dim">▸</span> Run <span class="t-b">npm test -- login</span> <span class="t-dim">·</span> <span class="t-err">exit 1</span> <span class="t-dim">· 6.8s</span>135136 The test races the session cookie: it asserts before the async137 store write resolves. The fix is to await the flush in the fixture.</code></pre>138<p>While the agent works, a single status line shows what is actually happening139(<code>● Searching repository · 2.3s</code>), tool calls settle into compact140one-liners, and you can keep typing — follow-up messages queue and inject safely.</p>141142<h3 id="first-permission">The first permission prompt</h3>143<p>The first time the agent wants to run a command that is not on the safe allowlist, an144inline panel appears. Three keys, no typing:</p>145<pre class="term" data-no-copy><code>╭─ KHAELOR requests permission ───────────────────╯146│ Run │147│ npm install │148│ │149│ Working directory │150│ ~/dev/my-project │151│ │152│ [ Enter ] Allow once │153│ [ A ] Always allow in this project │154│ [ Esc ] Deny │155╱───────────────────────────────────────────────────╯</code></pre>156<p>Press <kbd>A</kbd> once for <code>npm test</code> and it never asks again in this project.157Full details: <a href="/docs/permissions.html">Permissions</a>.</p>158159<h3 id="wrap-up">Wrap up</h3>160<ul>161 <li><code>/cost</code> — real token usage and dollars for this session.</li>162 <li><code>/diff</code> — everything KHAELOR changed (never your pre-existing diff).</li>163 <li><code>/quit</code> or <kbd>Ctrl+D</kbd> — exit. The session is persisted automatically; <code>/resume</code> picks it back up later.</li>164</ul>165166<h2 id="cli-flags">CLI reference<a class="anchor" href="#cli-flags">#</a></h2>167<table>168 <tr><th>Invocation</th><th>Meaning</th></tr>169 <tr><td><code>khaelor</code></td><td class="wrap">Start the interactive TUI in the current directory.</td></tr>170 <tr><td><code>khaelor --model <id></code></td><td class="wrap">Start with a specific Anthropic model id or alias for this session.</td></tr>171 <tr><td><code>khaelor --print "prompt"</code></td><td class="wrap">Non-interactive: run one agent turn, print the answer, exit.</td></tr>172 <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>173 <tr><td><code>khaelor --version</code></td><td class="wrap">Print the installed version.</td></tr>174</table>175176<h2 id="next">Where to go next<a class="anchor" href="#next">#</a></h2>177<ul>178 <li><a href="/docs/usage.html">The TUI</a> — the composer, file mentions, shell mode, steering.</li>179 <li><a href="/docs/commands.html">Commands & keyboard</a> — every slash command and key binding.</li>180 <li><a href="/docs/configuration.html">Configuration</a> — models, thinking mode, output budget.</li>181</ul>182183<div class="pager">184 <div class="next"><span class="label">Next</span><a href="/docs/usage.html">The TUI →</a></div>185</div>186187</article>188</div></main>189190<footer class="site-footer"><div class="inner">191 <span>KHAELOR — Simon-Pierre Boucher · <a href="mailto:contact@spboucher.ai">contact@spboucher.ai</a></span>192 <span>Anthropic-powered · terminal-native by design</span>193</div></footer>194195</body>196</html>197