repositories / smith

smith

There are many coding harnesses - but this one is fast

owned by bugabinga

Add a branded social preview card for the repository (#34)

b0c7ba9b592984d963261b0c8a4dde30fa8cf225

Oliver Jan Krylow <oliver@bugabinga.net> ·

SSH signature · not checked

Browse filesCompare with HEAD

Shared links to the repo currently render GitHub's blank Open Graph
card,
which says nothing about what smith is. A terminal-window card carrying
the
wordmark, the one-line pitch, and the status bar the TUI actually shows
lets a
reader grasp the product before the first click.

GitHub offers no API for this — the card is applied by hand under
Settings.
So the raster is committed alongside its Chromium-rendered source rather
than
generated by the build, keeping the asset reproducible without touching
the
cargo-only toolchain. New files live under docs/assets/ (image, HTML
source,
README).

Co-authored-by: Claude <noreply@anthropic.com>

Changed files (3)

+211 / −0 text lines · 1 binary (striped old/new sizes in 64-byte units, not churn) · lines and sizes scale separately

Diff layout

docs/assets/README.md

Added
new file mode 100644

+28 / −0 text lines

1# docs/assets
2
3Repository imagery. Currently: the GitHub **social preview** card.
4
5## social-preview.png
6
7The image GitHub shows when the repo is shared on social platforms (the Open
8Graph card). Sized to GitHub's recommended **1280×640** with every meaningful
9element kept inside the 40px safe border so previews are never cropped.
11GitHub exposes no API for this — apply it by hand:
12**Settings → General → Social preview → Edit → Upload an image.**
14### Regenerating
16`social-preview.png` is rendered from `social-preview.html` (Catppuccin Mocha,
17the spec's default theme example) with headless Chromium. The window renders
18short when the page body equals the viewport, so render on a taller canvas and
19crop the top 1280×640:
21```sh
22chromium --headless=new --force-device-scale-factor=1 \
23 --window-size=1280,760 --default-background-color=00000000 \
24 --screenshot=full.png docs/assets/social-preview.html
25# then crop full.png to (0,0,1280,640) -> social-preview.png
26```
28Edit the HTML, re-render, and commit both files together.

docs/assets/social-preview.html

Added
new file mode 100644

+183 / −0 text lines

1<!doctype html>
2<!--
3 Source for docs/assets/social-preview.png — the repository's GitHub social
4 preview card, rendered at the GitHub-recommended 1280x640 with headless
5 Chromium at device-scale 1. Palette: Catppuccin Mocha (the spec's default
6 theme example). The window is inset 72px/48px so all content clears the 40px
7 safe border social platforms may crop. Design asset, not part of the build.
8-->
9<html lang="en">
10<head>
11<meta charset="utf-8">
12<style>
13 :root {
14 --base: #1e1e2e;
15 --text: #cdd6f4;
16 --subtext: #a6adc8;
17 --overlay: #6c7086;
18 --surface: #313244;
19 --mauve: #cba6f7;
20 --blue: #89b4fa;
21 --green: #a6e3a1;
22 --peach: #fab387;
23 --red: #f38ba8;
24 --yellow: #f9e2af;
25 --teal: #94e2d5;
26 }
27 * { margin: 0; padding: 0; box-sizing: border-box; }
28 html, body { width: 1280px; height: 640px; }
29 body {
30 position: relative;
31 font-family: "DejaVu Sans Mono", "Liberation Mono", monospace;
32 background:
33 radial-gradient(1100px 720px at 80% -14%, rgba(203,166,247,0.16), transparent 60%),
34 radial-gradient(900px 620px at 6% 118%, rgba(137,180,250,0.13), transparent 60%),
35 #11111b;
36 -webkit-font-smoothing: antialiased;
37 }
39 /* Terminal window mock — inset well inside the 40px safe border */
40 .window {
41 position: absolute;
42 top: 48px; left: 72px;
43 width: 1136px; height: 544px; /* bottom edge at y=592 */
44 background: linear-gradient(180deg, #24243a 0%, var(--base) 24%);
45 border: 1px solid #3a3a52;
46 border-radius: 16px;
47 box-shadow: 0 34px 90px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.04);
48 overflow: hidden;
49 }
51 .titlebar {
52 position: absolute;
53 top: 0; left: 0; right: 0;
54 height: 48px;
55 display: flex;
56 align-items: center;
57 padding: 0 22px;
58 background: rgba(17,17,27,0.5);
59 border-bottom: 1px solid #2a2a3d;
60 gap: 9px;
61 }
62 .dot { width: 13px; height: 13px; border-radius: 50%; }
63 .dot.r { background: var(--red); }
64 .dot.y { background: var(--yellow); }
65 .dot.g { background: var(--green); }
66 .titlebar .path {
67 margin-left: 16px;
68 color: var(--overlay);
69 font-size: 16px;
70 }
72 /* Hero fills the space between title bar and status bar */
73 .hero {
74 position: absolute;
75 top: 48px; bottom: 48px; left: 0; right: 0;
76 display: flex;
77 flex-direction: column;
78 justify-content: center;
79 padding: 0 54px;
80 }
82 .wordmark { display: flex; align-items: baseline; }
83 .wordmark .name {
84 font-size: 110px;
85 font-weight: bold;
86 line-height: 0.9;
87 letter-spacing: -2px;
88 background: linear-gradient(92deg, var(--mauve) 0%, var(--blue) 56%, var(--teal) 100%);
89 -webkit-background-clip: text;
90 background-clip: text;
91 color: transparent;
92 }
93 .caret {
94 display: inline-block;
95 width: 24px; height: 84px;
96 background: var(--peach);
97 margin-left: 12px;
98 border-radius: 3px;
99 box-shadow: 0 0 26px rgba(250,179,135,0.5);
100 }
102 .tagline {
103 margin-top: 30px;
104 font-size: 30px;
105 color: var(--text);
106 }
107 .tagline .accent { color: var(--peach); }
109 .features {
110 margin-top: 26px;
111 display: flex;
112 gap: 14px;
113 flex-wrap: wrap;
114 }
115 .chip {
116 font-size: 19px;
117 color: var(--subtext);
118 background: rgba(49,50,68,0.5);
119 border: 1px solid #3a3a52;
120 border-radius: 999px;
121 padding: 9px 18px;
122 }
123 .chip b { color: var(--text); font-weight: bold; }
125 /* Status bar — the spec's status bar shows model, context %, cost */
126 .statusbar {
127 position: absolute;
128 bottom: 0; left: 0; right: 0;
129 height: 48px;
130 background: rgba(17,17,27,0.85);
131 border-top: 1px solid #2a2a3d;
132 display: flex;
133 align-items: center;
134 padding: 0 28px;
135 font-size: 17px;
136 color: var(--subtext);
137 gap: 24px;
138 }
139 .statusbar .seg { display: flex; align-items: center; gap: 10px; }
140 .statusbar .sep { color: #3a3a52; }
141 .statusbar .ok { color: var(--green); }
142 .statusbar .blue { color: var(--blue); }
143 .statusbar .peach { color: var(--peach); }
144 .statusbar .spacer { flex: 1; }
145 .bar { display: inline-block; width: 96px; height: 8px; border-radius: 4px;
146 background: var(--surface); overflow: hidden; }
147 .bar > i { display: block; height: 100%; width: 37%;
148 background: linear-gradient(90deg, var(--blue), var(--teal)); }
149</style>
150</head>
151<body>
152 <div class="window">
153 <div class="titlebar">
154 <span class="dot r"></span><span class="dot y"></span><span class="dot g"></span>
155 <span class="path">smith — ~/project</span>
156 </div>
158 <div class="hero">
159 <div class="wordmark">
160 <span class="name">smith</span>
161 <span class="caret"></span>
162 </div>
163 <div class="tagline">A fast, extensible AI coding agent <span class="accent">for your terminal.</span></div>
164 <div class="features">
165 <span class="chip"><b>Rust</b> TUI</span>
166 <span class="chip">Provider-independent <b>agent loop</b></span>
167 <span class="chip">Sandboxed <b>Lua plugins</b></span>
168 <span class="chip">Deterministic <b>replay</b></span>
169 </div>
170 </div>
172 <div class="statusbar">
173 <span class="seg"><span class="blue">▲</span> smith</span>
174 <span class="sep">·</span>
175 <span class="seg">ctx <span class="bar"><i></i></span> 37%</span>
176 <span class="sep">·</span>
177 <span class="seg">cost <span class="peach">$0.12</span></span>
178 <span class="spacer"></span>
179 <span class="seg"><span class="ok">●</span> ready</span>
180 </div>
181 </div>
182</body>
183</html>

docs/assets/social-preview.png

Added
new file mode 100644

Binary size (old → new): 0 → 120767 bytes.