Files
claudaris/index.html
T
2026-07-08 18:23:00 -07:00

545 lines
15 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>claudaris</title>
<style>
:root {
--bg: #0d0e1a;
--bg-panel: #131426;
--bg-panel-2: #1a1b2e;
--border: #2a2c4a;
--purple: #bb9af7;
--blue: #7aa2f7;
--cyan: #7dcfff;
--green: #9ece6a;
--yellow: #e0af68;
--pink: #f7768e;
--text: #c0caf5;
--text-dim: #6b7089;
--mono: "SF Mono", "Fira Code", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body {
margin: 0;
padding: 0;
background: var(--bg);
color: var(--text);
font-family: var(--mono);
overflow-x: hidden;
}
body {
background-image:
linear-gradient(rgba(187,154,247,0.035) 1px, transparent 1px),
linear-gradient(90deg, rgba(187,154,247,0.035) 1px, transparent 1px);
background-size: 40px 40px;
min-height: 100vh;
}
::selection { background: var(--purple); color: var(--bg); }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
/* scanline flicker overlay */
.scanlines {
pointer-events: none;
position: fixed;
inset: 0;
z-index: 50;
background: repeating-linear-gradient(
to bottom,
rgba(255,255,255,0.015) 0px,
rgba(255,255,255,0.015) 1px,
transparent 1px,
transparent 3px
);
mix-blend-mode: overlay;
}
.wrap {
max-width: 900px;
margin: 0 auto;
padding: 48px 24px 96px;
position: relative;
}
/* Header */
header {
border: 1px solid var(--border);
background: linear-gradient(180deg, var(--bg-panel), var(--bg));
border-radius: 8px;
padding: 28px 32px;
margin-bottom: 28px;
position: relative;
overflow: hidden;
}
header::before {
content: "";
position: absolute;
top: 0; left: 0; right: 0;
height: 2px;
background: linear-gradient(90deg, transparent, var(--purple), var(--cyan), var(--purple), transparent);
animation: scan 4s linear infinite;
}
@keyframes scan {
0% { transform: translateX(-100%); }
100% { transform: translateX(100%); }
}
.glitch-title {
font-size: clamp(2rem, 6vw, 3.2rem);
font-weight: 800;
letter-spacing: 2px;
margin: 0;
color: var(--purple);
text-shadow:
0 0 8px rgba(187,154,247,0.6),
0 0 24px rgba(187,154,247,0.25);
position: relative;
display: inline-block;
}
.glitch-title::after {
content: attr(data-text);
position: absolute;
left: 2px;
top: 0;
color: var(--cyan);
opacity: 0.5;
clip-path: inset(0 0 55% 0);
animation: glitch 3.2s infinite steps(1);
}
@keyframes glitch {
0%, 92%, 100% { clip-path: inset(0 0 100% 0); transform: translate(0,0); }
93% { clip-path: inset(10% 0 60% 0); transform: translate(-2px,1px); }
95% { clip-path: inset(50% 0 10% 0); transform: translate(2px,-1px); }
97% { clip-path: inset(20% 0 40% 0); transform: translate(-1px,0); }
}
.subtitle {
color: var(--text-dim);
margin-top: 10px;
font-size: 0.95rem;
}
.subtitle .accent { color: var(--green); }
.subtitle .accent2 { color: var(--yellow); }
.tags {
margin-top: 18px;
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.tag {
font-size: 0.72rem;
padding: 3px 10px;
border: 1px solid var(--border);
border-radius: 999px;
color: var(--text-dim);
background: rgba(255,255,255,0.02);
letter-spacing: 0.5px;
}
/* Nav */
nav {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 32px;
}
nav a {
color: var(--text-dim);
border: 1px solid var(--border);
padding: 6px 14px;
border-radius: 6px;
font-size: 0.8rem;
transition: all 0.15s ease;
text-decoration: none;
}
nav a:hover {
color: var(--bg);
background: var(--purple);
border-color: var(--purple);
box-shadow: 0 0 14px rgba(187,154,247,0.5);
}
/* Section panels */
section {
border: 1px solid var(--border);
background: var(--bg-panel);
border-radius: 8px;
padding: 26px 30px;
margin-bottom: 20px;
scroll-margin-top: 20px;
position: relative;
}
section h2 {
margin: 0 0 14px;
font-size: 1.05rem;
letter-spacing: 1px;
text-transform: uppercase;
color: var(--blue);
display: flex;
align-items: center;
gap: 10px;
}
section h2::before {
content: "";
width: 8px;
height: 8px;
background: var(--cyan);
box-shadow: 0 0 8px var(--cyan);
border-radius: 1px;
transform: rotate(45deg);
flex-shrink: 0;
}
section p {
line-height: 1.7;
color: var(--text);
font-size: 0.92rem;
}
section p.dim, li.dim { color: var(--text-dim); }
code, .kbd {
font-family: var(--mono);
background: rgba(122,162,247,0.1);
color: var(--cyan);
padding: 1px 6px;
border-radius: 4px;
border: 1px solid rgba(122,162,247,0.2);
font-size: 0.86em;
}
pre {
background: #0a0b16;
border: 1px solid var(--border);
border-left: 3px solid var(--purple);
border-radius: 6px;
padding: 16px 18px;
overflow-x: auto;
margin: 14px 0;
position: relative;
}
pre::before {
content: "$";
color: var(--green);
margin-right: 10px;
opacity: 0.7;
}
pre code {
background: none;
border: none;
padding: 0;
color: var(--green);
font-size: 0.9rem;
}
/* Command grid */
.cmd-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 12px;
margin-top: 8px;
}
.cmd-card {
border: 1px solid var(--border);
background: var(--bg-panel-2);
border-radius: 6px;
padding: 14px 16px;
transition: border-color 0.2s ease, transform 0.2s ease;
}
.cmd-card:hover {
border-color: var(--purple);
transform: translateY(-2px);
}
.cmd-card .cmd {
color: var(--pink);
font-weight: 700;
font-size: 0.95rem;
}
.cmd-card .alias {
color: var(--text-dim);
font-size: 0.75rem;
margin-left: 6px;
}
.cmd-card .desc {
color: var(--text-dim);
font-size: 0.82rem;
margin-top: 6px;
line-height: 1.5;
}
/* Config table */
table {
width: 100%;
border-collapse: collapse;
margin-top: 10px;
font-size: 0.86rem;
}
th {
text-align: left;
color: var(--yellow);
font-weight: 600;
padding: 8px 10px;
border-bottom: 1px solid var(--border);
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
td {
padding: 10px 10px;
border-bottom: 1px solid rgba(42,44,74,0.5);
vertical-align: top;
color: var(--text);
}
tr:last-child td { border-bottom: none; }
td.name { color: var(--green); white-space: nowrap; }
td.default { color: var(--text-dim); }
ul.check {
list-style: none;
padding: 0;
margin: 8px 0 0;
}
ul.check li {
padding: 6px 0 6px 24px;
position: relative;
font-size: 0.9rem;
line-height: 1.6;
color: var(--text);
}
ul.check li::before {
content: "▸";
position: absolute;
left: 0;
color: var(--purple);
}
.note {
border-left: 3px solid var(--yellow);
background: rgba(224,175,104,0.06);
padding: 10px 16px;
border-radius: 0 6px 6px 0;
font-size: 0.85rem;
color: var(--text-dim);
margin-top: 14px;
}
.note strong { color: var(--yellow); }
footer {
text-align: center;
color: var(--text-dim);
font-size: 0.78rem;
margin-top: 40px;
padding-top: 24px;
border-top: 1px solid var(--border);
}
footer .blink {
animation: blink 1.4s steps(1) infinite;
color: var(--green);
}
@keyframes blink {
50% { opacity: 0; }
}
@media (max-width: 600px) {
section { padding: 20px 18px; }
header { padding: 22px 20px; }
}
</style>
</head>
<body>
<div class="scanlines"></div>
<div class="wrap">
<header>
<h1 class="glitch-title" data-text="CLAUDARIS">CLAUDARIS</h1>
<div class="subtitle">
/klaw-<span class="accent">DAR</span>-iss/ — a moveable docker container for
<span class="accent2">Claude Code</span>. using Arch btw.
</div>
<div class="tags">
<span class="tag">ARCHLINUX</span>
<span class="tag">TMUX</span>
<span class="tag">SELF-HOSTED</span>
<span class="tag">NO-RESTART-POLICY</span>
</div>
</header>
<nav>
<a href="#configure">01 · configure</a>
<a href="#commands">02 · commands</a>
<a href="#ssh">03 · ssh</a>
<a href="#internals">04 · internals</a>
<a href="#structure">05 · repo</a>
</nav>
<section id="configure">
<h2>Configure</h2>
<p>
Run the interactive wizard — press enter at any prompt to keep the
current/default value:
</p>
<pre><code>./claudaris config</code></pre>
<p>
It writes your answers to <code>.env</code> (gitignored — every user
keeps their own), which every other command sources. Set
<code>NAME</code> to something unique to you (e.g. <code>chris-claude</code>)
if more than one person is running a container from this same repo
checkout. Re-run <code>config</code> / <code>configure</code> any time
to update it.
</p>
<table>
<tr><th>variable</th><th>purpose</th><th>default</th></tr>
<tr>
<td class="name">NAME</td>
<td>Image name, container name, and hostname inside the container (shows up as <code>root@$NAME</code> in the prompt).</td>
<td class="default">claudaris</td>
</tr>
<tr>
<td class="name">DATA_DIR</td>
<td>Host directory for volume mount data — bashrc, aliases, Claude auth, ssh keys.</td>
<td class="default">/data/$NAME</td>
</tr>
<tr>
<td class="name">WORKSPACE_DIR</td>
<td>Host directory mounted as <code>/projects</code> inside the container.</td>
<td class="default">/home/$USER/projects</td>
</tr>
</table>
</section>
<section id="commands">
<h2>Commands</h2>
<p class="dim">Everything runs through the single <code>claudaris</code> entry point.</p>
<div class="cmd-grid">
<div class="cmd-card">
<div><span class="cmd">config</span><span class="alias">configure</span></div>
<div class="desc">Interactive wizard — writes <code>NAME</code>, <code>DATA_DIR</code>, <code>WORKSPACE_DIR</code> to <code>.env</code>.</div>
<pre><code>./claudaris config</code></pre>
</div>
<div class="cmd-card">
<div><span class="cmd">build</span></div>
<div class="desc">Builds the image (always <code>--no-cache --pull</code>, so it picks up the latest Claude Code release).</div>
<pre><code>sudo ./claudaris build</code></pre>
</div>
<div class="cmd-card">
<div><span class="cmd">start</span></div>
<div class="desc">Creates or restarts the container with all volumes wired up.</div>
<pre><code>sudo ./claudaris start</code></pre>
</div>
<div class="cmd-card">
<div><span class="cmd">connect</span></div>
<div class="desc">Starts the container if needed, then attaches your tmux session.</div>
<pre><code>sudo ./claudaris connect</code></pre>
</div>
<div class="cmd-card">
<div><span class="cmd">remove</span><span class="alias">stop · rm</span></div>
<div class="desc">Stops and removes the container so the next <code>start</code> recreates it fresh.</div>
<pre><code>sudo ./claudaris remove</code></pre>
</div>
</div>
</section>
<section id="ssh">
<h2>Optional: SSH access to other nodes</h2>
<p>
To let the container SSH out to other machines, create
<code>$DATA_DIR/ssh</code> on the host and populate it with keys/config
<em>before</em> running <code>./claudaris start</code>. If present, it's
bind-mounted read-only to <code>/root/.ssh</code>.
</p>
<div class="note"><strong>off by default</strong> — nothing is mounted unless the directory exists.</div>
</section>
<section id="internals">
<h2>Internals</h2>
<p><strong style="color:var(--green)">Persistent login.</strong>
Claude Code is installed at build time under <code>/root</code>, so a
rebuild always picks up the latest release. Two files are bind-mounted
individually to survive that: <code>~/.claude/.credentials.json</code>
(the OAuth token) and <code>~/.claude.json</code> (account/onboarding
state — Claude Code checks this too, so persisting the token alone
isn't enough to avoid a re-login prompt after a rebuild).
<code>./claudaris start</code> seeds both from empty on the host the
first time it runs.
</p>
<p><strong style="color:var(--green)">Self-stopping.</strong>
The container stops itself once its tmux session ends (any shell exit
— Ctrl+D, <code>exit</code>, crash) instead of running forever, and
there's no Docker restart policy — <code>connect</code> and
<code>start</code> both bring it back up automatically if you find it
stopped.
</p>
<p><strong style="color:var(--green)">Dotfiles.</strong>
<code>.bashrc</code> and <code>bash_aliases</code> are both bind-mounted
as single files so they can be tweaked per-host (e.g. a coworker
importing their own aliases) without a rebuild.
<code>./claudaris start</code> seeds them from <code>files/bashrc</code>
and <code>files/bash_aliases</code> the first time it runs, without
overwriting later edits. Anything that needs to survive regardless
(PATH, zoxide, git identity) lives in <code>/etc/...</code> inside the
image instead of under <code>/root</code>.
</p>
<p><strong style="color:var(--green)">Hostname.</strong>
The container is started with <code>--hostname "$NAME"</code>, so the
prompt reads <code>root@claudaris</code> (or whatever you set
<code>NAME</code> to) instead of a random container ID.
</p>
</section>
<section id="structure">
<h2>Repo layout</h2>
<ul class="check">
<li><code>claudaris</code> — the entry point: build / start / connect / remove / help.</li>
<li><code>Dockerfile</code> — Arch base image, dotfiles, Claude Code install, entrypoint.</li>
<li><code>.env</code> — written by <code>claudaris config</code>, per-user, gitignored.</li>
<li><code>files/</code><code>bashrc</code>, <code>bash_aliases</code>, <code>entrypoint.sh</code>, <code>tmux</code> wrapper, <code>tmux.conf</code>.</li>
<li><code>AGENTS.md</code> — deep-dive notes for anyone (human or agent) hacking on this repo.</li>
</ul>
</section>
<footer>
claudaris <span class="blink"></span> moveable · self-hosted · always running the latest Claude Code
</footer>
</div>
</body>
</html>