<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Tools I Built</title>
<link>https://aleahim.com/</link>
<description>Tools I built, all pure Swift.</description>
<language>en-US</language>
<atom:link href="https://aleahim.com/collections/tools/feed.xml" rel="self" type="application/rss+xml"/>
<item>
<title>OneGraph and XRay Viewer: Two Mac Betas for Seeing Inside Your App</title>
<link>https://aleahim.com/blog/onegraph-and-xray-viewer-beta/</link>
<guid isPermaLink="true">https://aleahim.com/blog/onegraph-and-xray-viewer-beta/</guid>
<pubDate>Thu, 12 Nov 2026 00:00:00 +0000</pubDate>
<dc:creator>Mihaela Mihaljević</dc:creator>
<description>Paste a SwiftUI view into OneGraph and see which parts of its graph ran again and why. Open XRay Viewer on any running AppKit, UIKit or SwiftUI app and see its real layers. Both are free betas for the Mac, and here is what works and what does not yet</description>
<content:encoded><![CDATA[<h1>OneGraph and XRay Viewer: Two Mac Betas for Seeing Inside Your App</h1>
<p>Today I am giving a talk at Do iOS in Amsterdam called “SwiftUI Is One Graph”. The talk argues that a SwiftUI screen is a single graph of values and the parts that read them. <a href="https://aleahim.com/blog/swiftui-is-one-graph/">The post behind it</a> measured that against the real framework. Arguments are cheap, though, so I built two apps that let you look at it yourself. One is about SwiftUI, and the other works on any AppKit or UIKit app too. Both are available to download now.</p>
<p>They are betas. Both are signed and notarized by Apple, both update themselves, and both have a list of things they do not do yet, which is further down.</p>
<h2>OneGraph: paste a view, change a value, see what ran again</h2>
<p>OneGraph opens on a face that smiles. Four switches turn it happy, sad, angry or cool. Press one and the window shows what changed, in four places at once:</p>
<ul><li><p><strong>The source.</strong> The lines that read the value you changed are lit.</p></li><li><p><strong>The picture.</strong> SwiftUI’s own picture of the view, and the layers it is made of, pulled apart in depth so you can turn them.</p></li><li><p><strong>The graph.</strong> The values and the parts that read them. Press a value and the lines from it light up.</p></li><li><p><strong>The explanation.</strong> In words, which parts were recomputed and why, and which were reused unchanged.</p></li></ul>
<p><img src="https://aleahim.com/images/apps/onegraph/happy.png" alt="OneGraph with a face open and the happy switch pressed: the source on the left with the lines that read happy lit, SwiftUI’s picture of the face and the planes it is made of below it, the graph with the lines from happy lit on the right, and under it the explanation saying which parts were recomputed because they read happy."></p>
<p>The face is only the first sample. Paste a view of your own and the same four panes work on it. Here is a clock of 134 lines, pasted in, after I pressed second.</p>
<p><img src="https://aleahim.com/images/apps/onegraph/clock.png" alt="OneGraph with a clock pasted in and second pressed: the source on the left with the second hand’s rotation lit, SwiftUI’s picture of the clock and the planes it is made of in the middle, the graph on the right with one part lit, and under it the explanation saying that second was set to 45 and that the rotation of the second hand was recomputed because it reads second."></p>
<p>The point is the sentence in the explanation pane: “You set second to 45”, followed by the parts that read it. When a view re-renders more than you expected, this is where you find out which value it was.</p>
<p>You do not have to write a view first. New Sample lists samples to start from, and a box limits the list to the ones that draw: 176 of 303 when I took this picture. Here is orbits, three orbits around a star, with its source and its picture.</p>
<p><img src="https://aleahim.com/images/apps/onegraph/samples.png" alt="OneGraph’s New Sample window with the sample orbits chosen: the list of samples on the left with a check on each one that draws, the source of orbits in the middle, and SwiftUI’s picture of it on the right, three orbits around a glowing star with a planet on each. Under it the window says that 176 of 303 samples draw."></p>
<h3>How the picture is made</h3>
<p>OneGraph does not compile what you paste. It reads the source with SwiftSyntax and interprets it twice: once into its own graph, which is what the Graph and Explain panes show, and once into real SwiftUI views, which a hidden window draws. The picture you see is SwiftUI’s, not a drawing of mine, and the layers come from that real picture.</p>
<p>I did not want to claim that the two agree, so I measured it. For the face, each switch changes at least 39 percent of the picture, and my interpreter’s picture stays within 0.18 of 255 on average from SwiftUI’s. That check is part of the test run, and it fails if the two drift apart.</p>
<h2>XRay Viewer: the layers of a running app</h2>
<p>Every screen on Apple’s platforms is drawn as Core Animation layers, whether the app is written in AppKit, UIKit or SwiftUI. XRay Viewer attaches to a Mac app, or an app in the iOS Simulator, and shows you which layers: every layer with its class, size and picture, in a list and in a 3D X-Ray you can turn, zoom and fan out. It does not need the source, and it does not care which framework made the view.</p>
<p><img src="https://aleahim.com/images/apps/xray/viewer.png" alt="XRay Viewer reading a small Mac app while it runs: the list of its layers on the left, the layers pulled apart in depth in the middle, and the properties of the chosen layer on the right."></p>
<p>It reads an app in the iOS Simulator the same way. Here it reads Apple’s Settings app: 210 layers and 79 pictures. The layer chosen is an image layer of 28 by 28 points, and the inspector lists its frame, bounds and position, and says it is a SwiftUI image layer.</p>
<p><img src="https://aleahim.com/images/apps/xray/simulator.png" alt="XRay Viewer reading Apple’s Settings app in the iOS Simulator: the list of its layers on the left with an image layer chosen, the layers pulled apart in depth in the middle with the list of settings spread across them, and the inspector on the right showing the chosen layer’s frame, bounds and position."></p>
<p>Pick a layer and the inspector shows every property with its live value, marks the ones the app has changed, and lists the animations running on it. You may change a public property in the running app and put it back with Reset. Private properties are read-only unless you turn on writing, and it asks first, because writing one can crash the app you are inspecting.</p>
<h2>How the two fit together</h2>
<p>OneGraph starts from SwiftUI source and ends at the layers. XRay Viewer starts from the layers of any app that is already running, SwiftUI or not. If you want to know why a layer exists, read it in XRay Viewer. If you want to know why a value caused it to change, paste the SwiftUI view into OneGraph.</p>
<figure class="td-mermaid" data-td-mermaid>
<pre class="mermaid td-mermaid-source">flowchart LR
  s[&quot;Your SwiftUI source&quot;] --&gt; g[&quot;Graph of values&lt;br/&gt;and parts&quot;]
  g --&gt; p[&quot;SwiftUI&#39;s picture&quot;]
  p --&gt; l[&quot;Core Animation layers&quot;]
  l -.-&gt;|&quot;OneGraph shows&lt;br/&gt;this whole path&quot;| s
  r[&quot;A running app&quot;] --&gt; l2[&quot;Its real layers&quot;]
  l2 -.-&gt;|&quot;XRay Viewer&lt;br/&gt;starts here&quot;| r
</pre>
</figure>
<h2>What they do not do yet</h2>
<p>Here is the part I would rather you hear from me.</p>
<p><strong>OneGraph</strong></p>
<ul><li><p><strong>It reads a little under half of SwiftUI.</strong> I measure it on a corpus of 366 real SwiftUI files. On the last full run, 157 of them were read in full, 43 percent, and a later count has 166. The rest stop at a construct the reader does not handle yet, and OneGraph says which one instead of drawing a guess. This counts files, not SwiftUI’s API, so read it as a rough guide.</p></li><li><p><code>onAppear</code> does not run. The graph shows a variable at the value the source gives it, which can differ from SwiftUI’s picture after <code>onAppear</code> ran. OneGraph says so when a view sets a variable there.</p></li><li><p>A class declared in another file is not seen, because one pasted file cannot show it.</p></li><li><p>A computed property with several statements is reported as something OneGraph cannot draw yet, and it draws nothing for it instead of guessing.</p></li><li><p>It is a Mac app. An iPad version is planned, and an iPhone version will be tried after it.</p></li></ul>
<p><strong>XRay Viewer</strong></p>
<ul><li><p>It reads a Mac app or an app in the iOS Simulator, not a device, and one app at a time.</p></li><li><p>It cannot read an app with the App Sandbox.</p></li><li><p>SwiftUI does not attach an animation to the layer, so the Animations list is empty for a SwiftUI animation. XRay Viewer shows the trace of the values instead, and does not yet say which curve SwiftUI used. Animations written in UIKit, AppKit or Core Animation are listed.</p></li></ul>
<p>One check is also still open. I have run the first launch only on my own Mac, not on one that never saw the app, so I have not seen the exact words macOS shows the first time you open the download. If it says the app was downloaded from the internet, press Open.</p>
<h2>Download</h2>
<p>Both need macOS 14 or later. Open the disk image, drag the app to Applications, and update from inside the app with Check for Updates.</p>
<ul><li><p><a href="https://onegraph-downloads.fly.dev/OneGraph-0.5.3.dmg">OneGraph 0.5.3 for the Mac</a>, page: <a href="https://aleahim.com/apps/onegraph/">OneGraph</a></p></li><li><p><a href="https://xray-downloads.fly.dev/XRayViewer-0.5.2.dmg">XRay Viewer 0.5.2 for the Mac</a>, page: <a href="https://aleahim.com/apps/xray/">XRay Viewer</a></p></li></ul>
<p>If something breaks, or a view you paste draws wrong, write to me. A wrong picture is the most useful report I can get.</p>]]></content:encoded>
</item>
<item>
<title>Swift Runs Everywhere. I Checked.</title>
<link>https://aleahim.com/blog/swift-runs-everywhere/</link>
<guid isPermaLink="true">https://aleahim.com/blog/swift-runs-everywhere/</guid>
<pubDate>Wed, 10 Jun 2026 00:00:00 +0000</pubDate>
<dc:creator>Mihaela Mihaljević</dc:creator>
<description>Four of my Swift projects run right now on macOS, Linux, Windows, and inside the browser. A static site generator, a Markdown to PDF engine, a YAML parser, and a 2D vector graphics engine, all pure Swift, all with CI proving every platform on every push.</description>
<content:encoded><![CDATA[<h1>Swift Runs Everywhere. I Checked.</h1>
<p>“Swift runs everywhere” is usually a slide. A roadmap bullet, a conference
promise, a footnote about a port someone started. I wanted to know what it looks
like when it is not a slide, so I held my own projects to it: every platform
claim must be a CI gate that runs on every push, and at least one build per
project must be something you can click right now.</p>
<p>Four projects pass that bar today. A static site generator, a Markdown to PDF
engine, a YAML parser, and a 2D vector graphics engine. All pure Swift. Between
them they cover macOS, Linux, Windows, and the browser.</p>
<h2>Exhibit one: the page you are reading</h2>
<p>This site is built by <a href="https://codeberg.org/TileDownHQ/tile-down">TileDown</a>, a
static site generator written in Swift. The math on my posts is typeset to SVG
at build time, the charts and diagrams are fenced text blocks rendered by the
engine, and every article ships its own PDF from the same Markdown source. I
wrote about the why in
<a href="https://aleahim.com/blog/why-i-built-tiledown/">Why I built TileDown</a>.</p>
<p>The part that belongs in this post is the CI table. On every push, TileDown
builds and tests on macOS and on Linux in a Swift 6.1 container, the core
targets build on Windows, and the math playground product cross-compiles to
wasm32-unknown-wasip1 with the official Swift WebAssembly SDK. Four platforms,
four green gates, one codebase. The generator that produced this page would
produce it on a Linux box just as happily.</p>
<h2>Exhibit two: a PDF engine in your browser tab</h2>
<p><a href="https://pdf.aleahim.com">pdf.aleahim.com</a> is
<a href="https://codeberg.org/MarkdownPDFHQ/MarkdownPDF">MarkdownPDF</a> compiled to
WebAssembly. Type Markdown on the left, get a real PDF on the right, with no
server involved. The engine parses the Markdown, lays out the document, and
writes the PDF bytes directly in Swift, no LaTeX, no headless browser, no C
library underneath. The wasm ships gzipped at about eighteen megabytes,
downloads once, and is cached after that.</p>
<p>The same engine runs the full witness test suite on macOS and Linux, where the
output PDFs are checked by independent tools including veraPDF for PDF/UA and
PDF/A conformance. Windows and WebAssembly are build gates that compile the
engine on every push. I covered the engine itself in
<a href="https://aleahim.com/blog/markdown-to-pdf-in-the-browser/">Markdown to PDF in your browser, in pure Swift</a>.</p>
<h2>Exhibit three: a YAML parser with receipts</h2>
<p><a href="https://git.aleahim.com/NodetteHQ/PureYAML">PureYAML</a> is a dependency-free YAML
package: no external SwiftPM dependencies, no bundled C sources, and no
Foundation requirement in the library target. Its single CI workflow gates
macOS, Linux, Windows, and WASI on every push.</p>
<p>Correctness is measured, not asserted. A comparison harness runs PureYAML and
Yams side by side over a corpus of 111 real-world documents, OpenAPI specs,
Kubernetes manifests, GitHub Actions workflows. In the latest checked-in run
both parsers accept the same 110 documents and reject the same intentionally
damaged one, with zero disagreements between them.</p>
<p>And because a CI badge is less fun than a demo, there is a
<a href="https://mihaela.codeberg.page/PureYAMLStreaming/">live streaming benchmark</a> that
fetches multi-megabyte YAML files and parses them as streams, in Swift, inside
your browser tab, reporting fetch time, parse time, and throughput as it goes.</p>
<h2>Exhibit four: a graphics engine that brings its own canvas</h2>
<p><a href="https://slayermotion.com/#engine">PureDraw</a> is a dependency-free 2D
vector graphics engine, a “Virtual PostScript Machine” with an API compatible
with CoreGraphics and the HTML5 Canvas, written without either of them. Zero
external dependencies, zero bundled C sources, no Foundation requirement in
the core. The capability showcase at the top of its README, a bezier-path
character, gradients, blend modes, shadows, a 3D cube with a projective grid
texture, is a PDF rendered entirely by the engine itself, from the test suite.</p>
<p>This is the project where portability earns its keep most visibly: graphics is
the domain everyone assumes belongs to the platform. PureDraw builds and runs
its full test suite on macOS, on Linux in a Swift container, and on Windows,
in both debug and release, and the library cross-compiles to WebAssembly on
every push. The drawings that come out are the same bytes everywhere, because
nothing underneath them belongs to any one platform.</p>
<p><img src="https://aleahim.com/images/blog/swift-runs-everywhere/showcase3d.gif" alt="A gradient card with a white star, ringed by orbiting dots, animating in a loop"></p>
<p>And you do not have to take the CI’s word for any of it. That badge is not a
video. It is a few lines of PureComposition, a small language with a grammar of
its own, compiled and rendered frame by frame. <a href="https://slayermotion.com/#products">Glow Draw</a>
runs the same engines as WebAssembly right in your browser tab. PureDraw is
CoreGraphics rebuilt from nothing, PureLayer is CoreAnimation rebuilt the same
way, and PureComposition is the language that drives them: an EBNF grammar, a
parser, a compiler that lowers it to a PureDraw virtual-machine program, and a
command-line engine that runs the whole pipeline with no Mac in sight. The
drawing API, the layer compositor, and the language on top, all reconstructed in
portable Swift. If rebuilding Apple’s graphics stack from first principles is the
kind of problem you would want to talk about, get in touch.</p>
<p>If Swift is your language and you have been told it stops at the Mac, the CI
logs say otherwise.</p>]]></content:encoded>
</item>
<item>
<title>Markdown to PDF in your browser, in pure Swift</title>
<link>https://aleahim.com/blog/markdown-to-pdf-in-the-browser/</link>
<guid isPermaLink="true">https://aleahim.com/blog/markdown-to-pdf-in-the-browser/</guid>
<pubDate>Sun, 07 Jun 2026 00:00:00 +0000</pubDate>
<dc:creator>Mihaela Mihaljević</dc:creator>
<description>A pure-Swift Markdown to PDF engine compiled to WebAssembly, with a live in-browser playground</description>
<content:encoded><![CDATA[<h1>Markdown to PDF in your browser, in pure Swift</h1>
<p>There is a playground at <a href="https://pdf.aleahim.com">pdf.aleahim.com</a>. Type Markdown
on the left, get a real PDF on the right. No server is involved. The PDF is
produced by a pure-Swift engine compiled to WebAssembly and run inside your
browser.</p>
<p><img src="https://aleahim.com/images/blog/markdown-to-pdf-in-the-browser/markdown-to-pdf-playground-light.png" alt="The playground: Markdown source on the left, the rendered PDF on the right"></p>
<h2>What it is</h2>
<p>MarkdownPDF turns Markdown into a PDF with no LaTeX, no headless browser, and no C
Markdown or PDF library underneath. It parses the Markdown, lays the document out,
and writes the PDF bytes directly in Swift. It runs on macOS and Linux, the core
also builds for Windows and WebAssembly, and that last one is what makes the
in-browser demo possible.</p>
<p>The reason I wanted this: every Markdown to PDF path I tried pulled in something
heavy. A browser to print from, a full LaTeX distribution, or a C library bound
into the build. I wanted one Swift package that takes Markdown and emits the PDF,
so it drops into a server or an app with nothing to provision on the machine.</p>
<h2>What it renders</h2>
<p>In one codebase:</p>
<ul><li><p>A TeX-style math subset. Fractions, radicals, superscripts, and big-operator
limits lay out as real two-dimensional math. The quadratic formula and a
several-rows-tall continued fraction are in the default sample.</p></li><li><p>Native vector charts: bar, line, pie, and scatter, drawn with PDF path
operators rather than rasterized images.</p></li><li><p>A Mermaid flowchart subset, drawn as native PDF shapes.</p></li><li><p>Embedded TrueType subsetting, DEFLATE compression, tagged PDF, and PDF/UA and
PDF/A profiles checked with veraPDF on a fixture corpus.</p></li></ul>
<p>Headings, lists, tables, code blocks with syntax highlighting, links, and images
are all there too.</p>
<h2>How it runs in the browser</h2>
<p>The browser demo is small. There is a tiny executable that reads Markdown from
standard input, renders it, and writes the PDF bytes to standard output. That
executable is compiled to wasm32-unknown-wasip1. In the page, a WASI shim runs
the wasm, feeds the text area in as stdin, and captures stdout as the PDF, which
is shown in an iframe with a download fallback.</p>
<p>Two things were worth getting right. The wasm has to be instantiated
asynchronously, because synchronous instantiation is disallowed on the main
thread for modules over eight megabytes. And the engine is large, so the
playground ships a gzipped wasm, about eighteen megabytes on the wire, and
inflates it in the browser. First load downloads it once, then it is cached.</p>
<h2>The pieces, and where they live</h2>
<p>The work is split into focused packages, each open source under MIT:</p>
<ul><li><p>The engine: <a href="https://codeberg.org/MarkdownPDFHQ/MarkdownPDF">MarkdownPDF</a>. The parser,
layout, and PDF byte serialization.</p></li><li><p>The math: <a href="https://codeberg.org/MarkdownPDFHQ/MathTypeset">MathTypeset</a>. A
dependency-free Swift math typesetting package. It is its own package because a
static site generator I work on shares it, so the same TeX source typesets the
same way whether the target is a web page or a PDF.</p></li><li><p>The command line: <a href="https://codeberg.org/MarkdownPDFHQ/MarkdownPDFCli">MarkdownPDFCli</a>.
<code>markdownpdf input.md output.pdf</code> and a resume variant.</p></li><li><p>The playground: <a href="https://pdf.aleahim.com">pdf.aleahim.com</a>, with source at
<a href="https://codeberg.org/MarkdownPDFHQ/markdownpdf-playground">markdownpdf-playground</a>.
The wasm build, the WASI harness, and the page itself.</p></li></ul>
<p>There are no third-party runtime dependencies. The only package the engine pulls
in is my own MathTypeset, which itself has none.</p>
<h2>Honest limits</h2>
<p>It is early and I say so. Math renders with an embedded Latin Modern Math font,
so plus-minus, sigma, radicals, and Greek come out as real glyphs, not ASCII. One
wrinkle worth noting: the engine embeds TrueType (glyf) fonts only for now, and
Latin Modern Math ships as OpenType CFF, so the playground bundles a TrueType
conversion of it (the MATH table is preserved). The full witness test suite runs
on macOS and Linux; Windows and WebAssembly are build gates that compile the
engine but do not yet run the suite. Text beyond Western European needs a
supplied font, and shaping for Arabic and Hebrew is the open frontier where help
is welcome.</p>
<h2>Try it</h2>
<p>The demo is at <a href="https://pdf.aleahim.com">pdf.aleahim.com</a>, the engine is at
<a href="https://codeberg.org/MarkdownPDFHQ/MarkdownPDF">codeberg.org/MarkdownPDFHQ/MarkdownPDF</a>. If
you render Markdown to PDF anywhere that you would rather not install a browser or
a LaTeX stack, this might fit.</p>]]></content:encoded>
</item>
<item>
<title>Why I built TileDown</title>
<link>https://aleahim.com/blog/why-i-built-tiledown/</link>
<guid isPermaLink="true">https://aleahim.com/blog/why-i-built-tiledown/</guid>
<pubDate>Sat, 06 Jun 2026 00:00:00 +0000</pubDate>
<dc:creator>Mihaela Mihaljević</dc:creator>
<description>I already had a static site generator I liked, right up until I wanted diagrams, charts, a per-article PDF, real math, and a path to dynamic content. So I built one around a typed tile model, and this post is built by it.</description>
<content:encoded><![CDATA[<h1>Why I built TileDown</h1>
<p>I already had a static site generator. It was small, fast, and pleasant, and for a
while that was enough. Then I started wanting things it was never going to give me,
and every workaround made the setup more fragile instead of less.</p>
<p>So I wrote down what I actually wanted from a blog. It turned into a short,
stubborn list.</p>
<h2>I wanted diagrams in the prose</h2>
<p>Not screenshots of diagrams. Not a separate tool that exports a PNG I have to keep
in sync by hand. A fenced block, in the article, that renders:</p>
<figure class="td-mermaid" data-td-mermaid>
<pre class="mermaid td-mermaid-source">graph TD
  Idea[I want to explain a flow] --&gt; Tool{Does my generator do diagrams?}
  Tool --&gt;|No| Screenshot[Export a PNG forever]
  Tool --&gt;|Yes| Inline[Write it in the post]
  Screenshot --&gt; Stale[It drifts out of date]
  Inline --&gt; Done[It stays with the text]
</pre>
</figure>
<h2>I wanted charts that are just text</h2>
<p>Same idea, numbers instead of boxes. I describe the data in a few lines and the
build hands me a static SVG. No chart library, no script tag, no runtime:</p>
<figure class="td-chart td-chart-bar">
<figcaption class="td-chart-caption">What my old setup made hard</figcaption>
<div class="td-chart-frame">
<svg
  class="td-chart-svg"
  viewBox="0 0 720 360"
  role="img"
  aria-label="What my old setup made hard"
>
<desc>bar chart with 5 labels and 1 series</desc>
<line
  class="td-chart-grid"
  x1="80"
  y1="302"
  x2="696"
  y2="302"
></line>
<text
  class="td-chart-value"
  x="70"
  y="306"
  text-anchor="end"
>0</text>
<line
  class="td-chart-grid"
  x1="80"
  y1="246.4"
  x2="696"
  y2="246.4"
></line>
<text
  class="td-chart-value"
  x="70"
  y="250.4"
  text-anchor="end"
>2</text>
<line
  class="td-chart-grid"
  x1="80"
  y1="190.8"
  x2="696"
  y2="190.8"
></line>
<text
  class="td-chart-value"
  x="70"
  y="194.8"
  text-anchor="end"
>4</text>
<line
  class="td-chart-grid"
  x1="80"
  y1="135.2"
  x2="696"
  y2="135.2"
></line>
<text
  class="td-chart-value"
  x="70"
  y="139.2"
  text-anchor="end"
>6</text>
<line
  class="td-chart-grid"
  x1="80"
  y1="79.6"
  x2="696"
  y2="79.6"
></line>
<text
  class="td-chart-value"
  x="70"
  y="83.6"
  text-anchor="end"
>8</text>
<line
  class="td-chart-grid"
  x1="80"
  y1="24"
  x2="696"
  y2="24"
></line>
<text
  class="td-chart-value"
  x="70"
  y="28"
  text-anchor="end"
>10</text>
<line
  class="td-chart-axis"
  x1="80"
  y1="302"
  x2="696"
  y2="302"
></line>
<line
  class="td-chart-axis"
  x1="80"
  y1="24"
  x2="80"
  y2="302"
></line>
<rect
  class="td-chart-bar td-chart-series-0"
  x="124.6"
  y="79.6"
  width="32"
  height="222.4"
  rx="4"
></rect>
<rect
  class="td-chart-bar td-chart-series-0"
  x="247.8"
  y="107.4"
  width="32"
  height="194.6"
  rx="4"
></rect>
<rect
  class="td-chart-bar td-chart-series-0"
  x="371"
  y="51.8"
  width="32"
  height="250.2"
  rx="4"
></rect>
<rect
  class="td-chart-bar td-chart-series-0"
  x="494.2"
  y="51.8"
  width="32"
  height="250.2"
  rx="4"
></rect>
<rect
  class="td-chart-bar td-chart-series-0"
  x="617.4"
  y="24"
  width="32"
  height="278"
  rx="4"
></rect>
<text
  class="td-chart-label"
  x="141.6"
  y="324"
  text-anchor="middle"
>Diagrams</text>
<text
  class="td-chart-label"
  x="264.8"
  y="324"
  text-anchor="middle"
>Charts</text>
<text
  class="td-chart-label"
  x="388"
  y="324"
  text-anchor="middle"
>PDF</text>
<text
  class="td-chart-label"
  x="511.2"
  y="324"
  text-anchor="middle"
>Math</text>
<text
  class="td-chart-label"
  x="634.4"
  y="324"
  text-anchor="middle"
>Dynamic</text>
<text
  class="td-chart-label"
  x="16"
  y="163"
  text-anchor="middle"
  transform="rotate(-90 16 163)"
>pain (made up units)</text>
<rect
  class="td-chart-series-0"
  x="80"
  y="336"
  width="12"
  height="12"
  rx="3"
  fill="currentColor"
></rect>
<text
  class="td-chart-legend-text"
  x="98"
  y="346"
  text-anchor="start"
>Before</text>
<g class="td-chart-mark td-chart-series-0" tabindex="0"><title>Diagrams: 8</title>
<rect class="td-chart-hit" x="124.6" y="79.6" width="32" height="222.4"></rect>
<g class="td-chart-pop">
<rect class="td-chart-pop-box" x="86.5" y="41.6" width="108.2" height="30" rx="6"></rect>
<text class="td-chart-pop-text" x="95.5" y="61.6">Diagrams: 8</text>
</g>
</g>
<g class="td-chart-mark td-chart-series-0" tabindex="0"><title>Charts: 7</title>
<rect class="td-chart-hit" x="247.8" y="107.4" width="32" height="194.6"></rect>
<g class="td-chart-pop">
<rect class="td-chart-pop-box" x="217.9" y="69.4" width="91.8" height="30" rx="6"></rect>
<text class="td-chart-pop-text" x="226.9" y="89.4">Charts: 7</text>
</g>
</g>
<g class="td-chart-mark td-chart-series-0" tabindex="0"><title>PDF: 9</title>
<rect class="td-chart-hit" x="371" y="51.8" width="32" height="250.2"></rect>
<g class="td-chart-pop">
<rect class="td-chart-pop-box" x="353.4" y="13.8" width="67.2" height="30" rx="6"></rect>
<text class="td-chart-pop-text" x="362.4" y="33.8">PDF: 9</text>
</g>
</g>
<g class="td-chart-mark td-chart-series-0" tabindex="0"><title>Math: 9</title>
<rect class="td-chart-hit" x="494.2" y="51.8" width="32" height="250.2"></rect>
<g class="td-chart-pop">
<rect class="td-chart-pop-box" x="472.5" y="13.8" width="75.4" height="30" rx="6"></rect>
<text class="td-chart-pop-text" x="481.5" y="33.8">Math: 9</text>
</g>
</g>
<g class="td-chart-mark td-chart-series-0" tabindex="0"><title>Dynamic: 10</title>
<rect class="td-chart-hit" x="617.4" y="24" width="32" height="278"></rect>
<g class="td-chart-pop">
<rect class="td-chart-pop-box" x="579.3" y="310" width="108.2" height="30" rx="6"></rect>
<text class="td-chart-pop-text" x="588.3" y="330">Dynamic: 10</text>
</g>
</g>
</svg>
</div>
</figure>
<p>The numbers are invented. The rendering is real, and it uses the same notation the
PDF side understands, which matters for the next part.</p>
<h2>I wanted the PDF of the article, for free</h2>
<p>If you are reading this on the site, there is a Download PDF button near the top of
the page. I did not build it by hand for this post. The same engine that lays out
this page lays out a print version, from the same Markdown, so every article ships
a PDF without me thinking about it.</p>
<h2>I wanted real math</h2>
<p>Typeset at build time into static SVG, themed to the page. No MathJax, no web font,
no LaTeX install:</p>
<div class="td-math td-math-display"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 66.45 33.8" fill="currentColor" aria-hidden="true" style="width:6.65em;height:3.38em;vertical-align:-1.22em"><path d="M11 8.54C11 7.68 10.09 7.05 9.01 7.05C7.29 7.05 6.59 8.8 6.28 10.17C6.07 11.16 5.42 16.25 5.25 18.44L4.91 22.93C4.68 25.9 4.03 26.71 3 26.71C2.76 26.71 2.22 26.65 1.84 26.33C2.37 26.26 2.51 25.84 2.51 25.59C2.51 25.06 2.11 24.83 1.77 24.83C1.41 24.83 1.01 25.06 1.01 25.61C1.01 26.47 1.91 27.1 3 27.1C4.71 27.1 5.58 25.53 5.98 23.91C6.21 22.97 6.86 17.72 7.01 15.71L7.35 11.22C7.6 7.89 8.22 7.44 9.03 7.44C9.21 7.44 9.77 7.48 10.17 7.82C9.64 7.89 9.5 8.31 9.5 8.56C9.5 9.09 9.89 9.32 10.24 9.32C10.6 9.32 11 9.09 11 8.54Z"/><path d="M9.1 3.53C9.1 2.75 8.61 1.95 7.78 1.95C6.77 1.95 6.15 2.98 6.06 3.14C5.59 2.57 5.58 2.56 5.43 2.43C5.21 2.24 4.79 1.95 4.24 1.95C3.43 1.95 2.9 2.71 2.9 3.53C2.9 4.31 3.39 5.12 4.22 5.12C5.23 5.12 5.85 4.08 5.94 3.93C6.41 4.49 6.42 4.5 6.57 4.63C6.79 4.82 7.21 5.12 7.76 5.12C8.57 5.12 9.1 4.35 9.1 3.53ZM8.95 3.53C8.95 4.23 8.46 4.78 7.87 4.78C7.55 4.78 7.26 4.62 6.95 4.28C6.75 4.06 6.44 3.62 6.24 3.38C6.51 2.9 7.04 2.17 7.83 2.17C8.57 2.17 8.95 2.9 8.95 3.53ZM5.76 3.68C5.49 4.16 4.96 4.89 4.17 4.89C3.43 4.89 3.05 4.16 3.05 3.53C3.05 2.83 3.54 2.28 4.13 2.28C4.45 2.28 4.74 2.44 5.05 2.79C5.25 3 5.56 3.44 5.76 3.68Z"/><path d="M3.27 30.95L3.27 30.55L1.41 30.55L1.41 30.95Z"/><path d="M10.27 30.75C10.27 29.97 9.78 29.17 8.95 29.17C7.94 29.17 7.32 30.2 7.22 30.36C6.76 29.79 6.75 29.78 6.59 29.65C6.37 29.46 5.96 29.17 5.4 29.17C4.59 29.17 4.06 29.93 4.06 30.76C4.06 31.53 4.55 32.34 5.38 32.34C6.39 32.34 7.01 31.3 7.11 31.15C7.57 31.72 7.58 31.72 7.74 31.86C7.96 32.05 8.37 32.34 8.93 32.34C9.74 32.34 10.27 31.58 10.27 30.75ZM10.12 30.75C10.12 31.45 9.63 32 9.04 32C8.72 32 8.43 31.84 8.11 31.5C7.92 31.28 7.6 30.84 7.41 30.6C7.67 30.13 8.2 29.39 9 29.39C9.74 29.39 10.12 30.12 10.12 30.75ZM6.92 30.9C6.66 31.38 6.13 32.12 5.33 32.12C4.59 32.12 4.21 31.39 4.21 30.76C4.21 30.06 4.7 29.5 5.29 29.5C5.61 29.5 5.9 29.67 6.22 30.01C6.41 30.23 6.73 30.67 6.92 30.9Z"/><path d="M17.82 20.39C17.82 20.29 17.74 20.27 17.69 20.27C17.6 20.27 17.58 20.33 17.56 20.41C17.21 21.44 16.31 21.44 16.21 21.44C15.71 21.44 15.31 21.14 15.08 20.77C14.78 20.29 14.78 19.63 14.78 19.27L17.57 19.27C17.79 19.27 17.82 19.27 17.82 19.06C17.82 18.07 17.28 17.1 16.03 17.1C14.87 17.1 13.95 18.13 13.95 19.38C13.95 20.72 15 21.69 16.15 21.69C17.37 21.69 17.82 20.58 17.82 20.39ZM17.16 19.06L14.79 19.06C14.85 17.57 15.69 17.32 16.03 17.32C17.06 17.32 17.16 18.67 17.16 19.06Z"/><path d="M20.61 16.64L20.61 16.24L18.75 16.24L18.75 16.64Z"/><path d="M24.62 17.95L24.62 17.73C24.24 17.73 24.11 17.72 23.95 17.52L23.01 16.31C23.22 16.04 23.49 15.7 23.66 15.51C23.87 15.26 24.16 15.16 24.49 15.15L24.49 14.93C24.31 14.95 24.1 14.95 23.92 14.95C23.71 14.95 23.34 14.94 23.24 14.93L23.24 15.15C23.39 15.16 23.45 15.26 23.45 15.37C23.45 15.48 23.38 15.57 23.34 15.61L22.91 16.16L22.36 15.45C22.3 15.38 22.3 15.37 22.3 15.33C22.3 15.22 22.4 15.16 22.54 15.15L22.54 14.93L21.79 14.95C21.64 14.95 21.31 14.95 21.12 14.93L21.12 15.15C21.61 15.15 21.62 15.16 21.95 15.58L22.64 16.48C22.31 16.9 22.31 16.91 21.98 17.31C21.65 17.72 21.24 17.73 21.09 17.73L21.09 17.95C21.27 17.94 21.49 17.93 21.67 17.93L22.33 17.95L22.33 17.73C22.18 17.71 22.13 17.62 22.13 17.52C22.13 17.36 22.33 17.13 22.76 16.63L23.29 17.33C23.35 17.4 23.44 17.52 23.44 17.56C23.44 17.62 23.38 17.73 23.19 17.73L23.19 17.95L23.94 17.93C24.13 17.93 24.41 17.94 24.62 17.95Z"/><path d="M27.29 14.56L27.17 14.56C27.15 14.7 27.11 14.92 27.06 14.99C27.03 15.03 26.7 15.03 26.6 15.03L25.71 15.03L26.23 14.53C27 13.85 27.29 13.59 27.29 13.1C27.29 12.54 26.85 12.15 26.25 12.15C25.7 12.15 25.34 12.6 25.34 13.03C25.34 13.31 25.58 13.31 25.6 13.31C25.68 13.31 25.85 13.25 25.85 13.05C25.85 12.92 25.76 12.79 25.59 12.79C25.55 12.79 25.54 12.79 25.53 12.8C25.64 12.48 25.91 12.3 26.19 12.3C26.64 12.3 26.85 12.69 26.85 13.1C26.85 13.49 26.6 13.88 26.33 14.18L25.39 15.23C25.34 15.28 25.34 15.29 25.34 15.41L27.16 15.41Z"/><path d="M34.48 21.58L34.48 21.27C33.78 21.27 33.7 21.2 33.7 20.71L33.7 14.64L32.26 14.75L32.26 15.06C32.96 15.06 33.04 15.13 33.04 15.62L33.04 17.78C32.75 17.42 32.32 17.16 31.78 17.16C30.6 17.16 29.55 18.14 29.55 19.43C29.55 20.7 30.53 21.69 31.67 21.69C32.31 21.69 32.76 21.35 33.01 21.03L33.01 21.69ZM33.01 20.4C33.01 20.58 33.01 20.6 32.9 20.77C32.6 21.25 32.15 21.47 31.72 21.47C31.27 21.47 30.91 21.21 30.67 20.83C30.41 20.42 30.38 19.85 30.38 19.44C30.38 19.07 30.4 18.47 30.69 18.02C30.9 17.71 31.28 17.38 31.82 17.38C32.17 17.38 32.59 17.53 32.9 17.98C33.01 18.15 33.01 18.17 33.01 18.35Z"/><path d="M39.93 21.58L39.93 21.27C39.39 21.27 39.21 21.25 38.98 20.96L37.64 19.23C37.94 18.85 38.32 18.36 38.56 18.1C38.87 17.74 39.28 17.59 39.75 17.58L39.75 17.27C39.49 17.29 39.19 17.3 38.93 17.3C38.63 17.3 38.1 17.28 37.97 17.27L37.97 17.58C38.18 17.6 38.26 17.73 38.26 17.89C38.26 18.05 38.16 18.18 38.11 18.24L37.49 19.02L36.71 18.01C36.62 17.91 36.62 17.89 36.62 17.83C36.62 17.68 36.77 17.59 36.97 17.58L36.97 17.27L35.89 17.3C35.68 17.3 35.21 17.29 34.94 17.27L34.94 17.58C35.64 17.58 35.65 17.59 36.12 18.19L37.11 19.48C36.64 20.08 36.64 20.1 36.17 20.67C35.69 21.25 35.1 21.27 34.89 21.27L34.89 21.58C35.15 21.56 35.46 21.55 35.72 21.55L36.67 21.58L36.67 21.27C36.45 21.24 36.38 21.11 36.38 20.96C36.38 20.74 36.67 20.41 37.28 19.69L38.04 20.69C38.12 20.8 38.25 20.96 38.25 21.02C38.25 21.11 38.16 21.26 37.89 21.27L37.89 21.58L38.97 21.55C39.24 21.55 39.63 21.56 39.93 21.58Z"/><path d="M50.05 18.11C50.05 18 49.96 17.91 49.85 17.91L43.59 17.91C43.48 17.91 43.39 18 43.39 18.11C43.39 18.22 43.48 18.31 43.59 18.31L49.85 18.31C49.96 18.31 50.05 18.22 50.05 18.11ZM50.05 20.05C50.05 19.94 49.96 19.85 49.85 19.85L43.59 19.85C43.48 19.85 43.39 19.94 43.39 20.05C43.39 20.16 43.48 20.25 43.59 20.25L49.85 20.25C49.96 20.25 50.05 20.16 50.05 20.05Z"/><line x1="53.38" y1="17.84" x2="55.58" y2="23.67" stroke="currentColor" stroke-width="0.4" stroke-linejoin="miter" stroke-linecap="butt"/><line x1="55.58" y1="23.67" x2="58.88" y2="13.26" stroke="currentColor" stroke-width="0.4" stroke-linejoin="miter" stroke-linecap="butt"/><rect x="58.88" y="12.86" width="5.57" height="0.4"/><path d="M65.78 17.71C65.72 17.49 65.52 17.49 65.34 17.49L62.16 17.49C61.95 17.49 61.59 17.49 61.28 17.93C61.05 18.3 60.9 18.74 60.92 18.79C60.92 18.79 60.94 18.88 61.06 18.88C61.13 18.88 61.14 18.84 61.18 18.77C61.46 18.04 62.02 18.04 62.21 18.04L62.75 18.04C62.73 19.19 62.5 20.34 62.32 21.2C62.28 21.34 62.28 21.36 62.3 21.43C62.35 21.61 62.52 21.68 62.64 21.68C62.93 21.68 62.94 21.42 62.97 21.07L62.98 20.14L62.99 18.04L64.07 18.04C64.11 19.44 64.12 19.85 64.28 20.49C64.31 20.63 64.38 20.89 64.53 21.21C64.73 21.63 64.86 21.68 65 21.68C65.19 21.68 65.34 21.51 65.29 21.32C65.28 21.27 65.27 21.25 65.19 21.11C64.74 20.43 64.59 19.81 64.52 19.55C64.39 19.04 64.33 18.53 64.31 18.04L65.4 18.04C65.52 18.04 65.86 18.04 65.78 17.71Z"/></svg><math class="td-math-a11y" xmlns="http://www.w3.org/1998/Math/MathML"><mrow><msubsup><mrow><mo>∫</mo></mrow><mrow><mrow><mtext>-</mtext><mo>∞</mo></mrow></mrow><mrow><mo>∞</mo></mrow></msubsup><mtext> </mtext><msup><mrow><mi>e</mi></mrow><mrow><mrow><mtext>-</mtext><msup><mrow><mi>x</mi></mrow><mrow><mn>2</mn></mrow></msup></mrow></mrow></msup><mspace width="0.17em"/><mi>d</mi><mi>x</mi><mtext> </mtext><mtext>=</mtext><mtext> </mtext><msqrt><mo>π</mo></msqrt></mrow></math></div>
<h2>And I wanted a way out of “static forever”</h2>
<p>This is the part that made it a project instead of a config file. Static sites are
wonderful until the day you want one live thing on the page: a counter, an embed, a
form that talks to a backend. Most generators answer that with “drop in some
JavaScript and good luck.”</p>
<p>I wanted that one live thing to be a first-class, typed unit of content. So
TileDown has tiles. A tile renders to HTML, scoped CSS, and only the JavaScript it
needs, and nothing else on the page pays for it. Here is one:</p>
<div class="td-counter" data-td-counter>
<button class="td-counter-button" type="button">A small live thing on a static page</button>
<span class="td-counter-value" data-td-counter-value>0</span>
</div>
<p>Today tiles cover the client-side cases: counters, embeds, callouts. The next step
is tiles that talk to a backend, a form that hits a real service, and that work is
still coming. But the model is the point. Dynamic behavior is a tile, not a hole I
cut in the static output.</p>
<h2>That is the whole reason</h2>
<p>Diagrams, charts, a free PDF, real math, and a typed path to dynamic content. None
of those is exotic on its own. I just could not get all of them from one tool
without the setup fighting me, so I built the tool. This post is written in plain
Markdown and rendered by it.</p>
<pre><code class="language-sh">brew install tiledown<span class="tok-operator">/</span>tap<span class="tok-operator">/</span>tiledown</code></pre>]]></content:encoded>
</item>
<item>
<title>iRelay: Text Your Mac, Run an AI Agent</title>
<link>https://aleahim.com/blog/irelay/</link>
<guid isPermaLink="true">https://aleahim.com/blog/irelay/</guid>
<pubDate>Fri, 13 Mar 2026 00:00:00 +0000</pubDate>
<dc:creator>Mihaela Mihaljević</dc:creator>
<description>A Swift daemon that turns iMessage into a remote terminal for Claude Code</description>
<content:encoded><![CDATA[<h1>iRelay: Text Your Mac, Run an AI Agent</h1>
<p>I created a GitHub repo from my phone while walking around the house. No terminal, no SSH, no laptop open. Just iMessage.</p>
<p><strong>iRelay</strong> is a Swift daemon that listens for iMessages on your Mac, spawns Claude Code in your project directory, and sends the result back as a text. You message your Mac like you’d message a person, except it writes code.</p>
<p><strong>Codeberg:</strong> <a href="https://codeberg.org/Mihaela/iRelay">codeberg.org/Mihaela/iRelay</a></p>
<h2>Demo</h2>
<figure class="td-embed" style="--td-embed-aspect-ratio: 315 / 560;">
<div class="td-embed-frame">
<iframe
  class="td-embed-iframe"
  src="https://www.youtube-nocookie.com/embed/ehOY7BnPOf0"
  title="Demo video"
  loading="lazy"
  allowfullscreen
  referrerpolicy="strict-origin-when-cross-origin"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
></iframe>
</div>
</figure>
<h2>How It Works</h2>
<p>The flow is simple:</p>
<pre><code>iPhone (iMessage) → Mac (iRelay daemon) → Claude Code → response → iMessage</code></pre>
<p>You send something like <code>irelayy fix the failing test</code> from your phone. Your Mac picks it up, runs Claude Code against your project, and texts you back with what it did.</p>
<p>That’s it. No web UI, no port forwarding, no VPN. Just iMessage as a transport layer.</p>
<h2>Why the Double Y</h2>
<p>I already run <a href="https://openclaw.ai/">OpenClaw</a> on the same Mac for iMessage automation. Two daemons listening to the same iMessage account would fight over every incoming message.</p>
<p>The fix: a prefix. iRelay claims any message starting with <code>irelayy</code> (double y). OpenClaw ignores those. Everything else goes to OpenClaw. Simple namespace partitioning over a shared channel.</p>
<h2>What I Actually Did With It</h2>
<p>First real test: I asked it to investigate my repos and suggest a business idea. It came back with MCPMe. Then I told it to create the repo, write the README, and push it. All from iMessage. The Mac did the work while I made coffee.</p>
<p>That’s the use case — you’re away from your desk but you want something done <em>now</em>. A quick fix, a repo setup, a refactor. Text it, walk away, get the result back on your phone.</p>
<h2>Architecture</h2>
<p>iRelay is designed around channels and providers:</p>
<ul><li><p><strong>Channels</strong> handle message transport — iMessage is the one that works today. The architecture supports Telegram, Slack, Discord, Signal, Matrix, IRC, and WebChat, but those are scaffolded, not wired up yet.</p></li><li><p><strong>Providers</strong> handle LLM execution — Claude Code is the primary one. OpenAI, Ollama, and Gemini slots exist for future use.</p></li></ul>
<p>Conversation history is preserved across messages, so context carries over. You can also save and restore sessions.</p>
<h2>What’s Next</h2>
<p>iRelay pairs well with <a href="https://codeberg.org/CupertinoHQ/cupertino">Cupertino</a> — when Claude Code has offline access to Apple’s documentation, the responses you get back over iMessage are significantly better. No hallucinated APIs, no deprecated patterns. I’ve been quietly working on a major Cupertino update that nearly doubles framework coverage, which will make this combination even stronger. More on that soon.</p>
<hr>
<p><em>Built in a day. Used from the couch.</em></p>]]></content:encoded>
</item>
<item>
<title>Cupertino: Offline Apple Documentation for AI Agents</title>
<link>https://aleahim.com/blog/cupertino/</link>
<guid isPermaLink="true">https://aleahim.com/blog/cupertino/</guid>
<pubDate>Fri, 28 Nov 2025 00:00:00 +0000</pubDate>
<dc:creator>Mihaela Mihaljević</dc:creator>
<description>An MCP server that gives Claude Desktop offline access to 22,000+ Apple documentation pages</description>
<content:encoded><![CDATA[<h1>Cupertino: Offline Apple Documentation for AI Agents</h1>
<p><strong>TL;DR:</strong> I built an MCP server that gives Claude Desktop offline access to 22,000+ Apple documentation pages across 261 frameworks. No more hallucinated APIs.</p>
<h2>The Problem</h2>
<p>If you’ve used Claude or ChatGPT for Swift/iOS development, you’ve seen this:</p>
<blockquote><p>“Use the <code>NavigationView</code> with <code>.navigationBarTitle()</code> modifier…”</p></blockquote>
<p>Except <code>NavigationView</code> is deprecated. It’s <code>NavigationStack</code> now. And the modifier is <code>.navigationTitle()</code>.</p>
<p>AI models hallucinate APIs. They mix up iOS 14 patterns with iOS 17. They invent methods that don’t exist. And when you’re deep in a coding session, these small errors cost you hours.</p>
<h2>The Solution: Cupertino</h2>
<p>Cupertino is an MCP (Model Context Protocol) server that:</p>
<ol><li><p><strong>Crawls</strong> Apple Developer documentation, Swift Evolution proposals, and Swift.org</p></li><li><p><strong>Indexes</strong> everything into a local SQLite FTS5 database with BM25 ranking</p></li><li><p><strong>Serves</strong> documentation to Claude Desktop via MCP</p></li></ol>
<p>When Claude needs to answer a SwiftUI question, it searches your local documentation instead of relying on training data.</p>
<h2>What You Get</h2>
<p><strong>22,044 documents across 223 frameworks:</strong></p>
<p><img src="https://aleahim.com/images/blog/cupertino/frameworks.png" alt="Available Frameworks">
<em>The documentation index contains 22,044 documents across 223 frameworks, including all major Apple platforms.</em></p>
<table><thead><tr><th>Framework</th><th style="text-align:right">Documents</th></tr></thead><tbody><tr><td>SwiftUI</td><td style="text-align:right">5,853</td></tr><tr><td>Swift</td><td style="text-align:right">2,814</td></tr><tr><td>UIKit</td><td style="text-align:right">1,906</td></tr><tr><td>AppKit</td><td style="text-align:right">1,316</td></tr><tr><td>Foundation</td><td style="text-align:right">1,219</td></tr><tr><td>Swift.org</td><td style="text-align:right">501</td></tr><tr><td>Swift Evolution</td><td style="text-align:right">429</td></tr><tr><td>RealityKit</td><td style="text-align:right">423</td></tr><tr><td>…</td><td style="text-align:right">…</td></tr></tbody></table>
<p><strong>Two MCP tools:</strong></p>
<ul><li><p><code>search_docs</code> - Full-text search with BM25 ranking</p></li><li><p><code>list_frameworks</code> - Discover available documentation</p></li></ul>
<p><strong>Example search result:</strong></p>
<pre><code># Search Results for "SwiftUI View"

## 1. View | Apple Developer Documentation
- **Framework:** swiftui
- **URI:** apple-docs://swiftui/documentation_swiftui_view
- **Score:** 1.82
- **Words:** 2,682

Protocol# View
A type that represents part of your app's user interface...</code></pre>
<p><img src="https://aleahim.com/images/blog/cupertino/mcp-tools.png" alt="Claude Desktop using Cupertino MCP tools">
<em>Claude Desktop using Cupertino’s MCP tools to search documentation and list available frameworks</em></p>
<h2>Installation</h2>
<h3>1. Build from source</h3>
<pre><code class="language-bash">git clone https<span class="tok-operator">:</span><span class="tok-operator">/</span><span class="tok-operator">/</span>codeberg<span class="tok-operator">.</span>org<span class="tok-operator">/</span>CupertinoHQ<span class="tok-operator">/</span>cupertino<span class="tok-operator">.</span>git
cd cupertino
make build
su<span class="tok-keyword">do</span> make install</code></pre>
<h3>2. Fetch documentation</h3>
<pre><code class="language-bash"><span class="tok-comment"># Quick start: Swift Evolution only (~5 minutes)</span>
cupertino fetch <span class="tok-operator">-</span><span class="tok-operator">-</span>type evolution
cupertino save

<span class="tok-comment"># Full documentation (~20-24 hours, one-time)</span>
cupertino fetch <span class="tok-operator">-</span><span class="tok-operator">-</span>type docs <span class="tok-operator">-</span><span class="tok-operator">-</span>max<span class="tok-operator">-</span>pages <span class="tok-number">15000</span>
cupertino fetch <span class="tok-operator">-</span><span class="tok-operator">-</span>type evolution
cupertino save</code></pre>
<p><strong>Expected output after indexing:</strong></p>
<pre><code>✅ Search index built successfully!
   Total documents: 22044
   Frameworks: 261
   Database: /Users/mm/.cupertino/search.db
   Size: 163.6 MB

💡 Tip: Start the MCP server with 'cupertino serve' to enable search</code></pre>
<p>Why 20+ hours? The crawler respects Apple’s servers with a 0.5s delay between requests. 21,000 pages × 0.5s = many hours. But it’s a one-time operation.</p>
<h3>3. Configure Claude Desktop</h3>
<p>Edit <code>~/Library/Application Support/Claude/claude_desktop_config.json</code>:</p>
<pre><code class="language-json"><span class="tok-operator">{</span>
  <span class="tok-property">"mcpServers"</span><span class="tok-operator">:</span> <span class="tok-operator">{</span>
    <span class="tok-property">"cupertino"</span><span class="tok-operator">:</span> <span class="tok-operator">{</span>
      <span class="tok-property">"command"</span><span class="tok-operator">:</span> <span class="tok-string">"/usr/local/bin/cupertino"</span>
    <span class="tok-operator">}</span>
  <span class="tok-operator">}</span>
<span class="tok-operator">}</span></code></pre>
<p>Restart Claude Desktop. Done.</p>
<h3>4. Verify it works</h3>
<pre><code class="language-bash">cupertino doctor</code></pre>
<pre><code>✅ MCP Server
   ✓ Server can initialize
   ✓ Transport: stdio
   ✓ Protocol version: 2024-11-05

📚 Documentation Directories
   ✓ Apple docs: ~/.cupertino/docs (21,114 files)
   ✓ Swift Evolution: ~/.cupertino/swift-evolution (429 proposals)

🔍 Search Index
   ✓ Database: ~/.cupertino/search.db
   ✓ Size: 156.0 MB
   ✓ Frameworks: 261

✅ All checks passed - MCP server ready</code></pre>
<h2>How It Works</h2>
<pre><code>1. Fetch:  cupertino fetch --type docs
   → WKWebView renders JavaScript-heavy pages
   → HTML converted to Markdown
   → Saved to ~/.cupertino/docs/

2. Save:   cupertino save
   → Markdown files indexed into SQLite FTS5
   → BM25 ranking for relevance scoring
   → ~160MB database for full index

3. Serve:  cupertino serve
   → MCP server starts on stdio
   → Claude Desktop connects via JSON-RPC
   → Search queries hit local database</code></pre>
<h2>Architecture</h2>
<p>Built with Swift 6.2 and strict concurrency:</p>
<pre><code>Packages/
├── MCP/                 # Model Context Protocol implementation
├── Search/              # SQLite FTS5 search engine
├── Core/                # Crawlers (WKWebView, GitHub API)
├── CLI/                 # Command-line interface
└── Resources/           # Bundled catalogs (9,699 packages, 606 samples)</code></pre>
<p>Key decisions:</p>
<ul><li><p><strong>Swift 6.2</strong> with 100% strict concurrency checking</p></li><li><p><strong>Actor isolation</strong> for thread-safe state management</p></li><li><p><strong>SQLite FTS5</strong> with BM25 for fast, relevant search</p></li><li><p><strong>WKWebView</strong> to render Apple’s JavaScript-heavy documentation</p></li></ul>
<h2>Room for Improvement</h2>
<p>Honest feedback from testing: the search works, but it’s not perfect.</p>
<p><strong>Current limitation:</strong> BM25 treats all documents equally. A search for “SwiftUI” returns <code>mouseEntered(with:)</code> alongside <code>View</code> protocol because both contain “SwiftUI” with similar frequency.</p>
<p><strong>Planned improvements:</strong></p>
<ol><li><p><strong>Boost by word count</strong> - Comprehensive docs (2000+ words) rank higher than stub pages (61 words)</p></li><li><p><strong>Boost by path depth</strong> - <code>/swiftui/view</code> ranks higher than <code>/swiftui/nshostingview/mouseentered</code></p></li><li><p><strong>Document type weighting</strong> - Overview pages rank higher than individual method docs</p></li><li><p><strong>Curated importance flags</strong> - Mark foundational docs for priority ranking</p></li></ol>
<p>The search is still useful for targeted queries like “SwiftUI NavigationStack” or “SE-0001”. Broad queries need work.</p>
<h2>Why I Built This</h2>
<p>I was tired of:</p>
<ul><li><p>Claude inventing deprecated APIs</p></li><li><p>Switching to Safari to verify every code suggestion</p></li><li><p>Losing flow state to documentation lookups</p></li></ul>
<p>Now Claude searches my local 160MB documentation database. Same query, same results, every time. Offline. Fast.</p>
<h2>Links</h2>
<ul><li><p><strong>Codeberg:</strong> <a href="https://codeberg.org/CupertinoHQ/cupertino">codeberg.org/CupertinoHQ/cupertino</a></p></li><li><p><strong>Requirements:</strong> macOS 15+, Swift 6.2+, Xcode 16+</p></li><li><p><strong>License:</strong> MIT</p></li></ul>
<hr>
<p><em>Built with Swift, frustration, and too many hours debugging WKWebView concurrency issues.</em></p>]]></content:encoded>
</item>
<item>
<title>CVBuilder: A Swift Package for Professional CV Management</title>
<link>https://aleahim.com/blog/c-v-builder/</link>
<guid isPermaLink="true">https://aleahim.com/blog/c-v-builder/</guid>
<pubDate>Sun, 13 Apr 2025 00:00:00 +0000</pubDate>
<dc:creator>Mihaela Mihaljević</dc:creator>
<description>A Swift package for building and rendering CVs in multiple formats</description>
<content:encoded><![CDATA[<p>CVBuilder is a powerful Swift package that I developed to solve a common problem: managing and rendering professional CVs in multiple formats. Whether you need to generate a Markdown CV for GitHub, an HTML version for your website, or a plain text version for job applications, CVBuilder has you covered.</p>
<h2>Why CVBuilder?</h2>
<p>In today’s digital world, professionals often need to maintain their CVs in multiple formats and keep them in sync. Traditional word processors make this process tedious and error-prone. CVBuilder solves this by:</p>
<ul><li><p>Providing a strongly-typed data model for CVs</p></li><li><p>Supporting multiple output formats (Markdown, HTML, plain text)</p></li><li><p>Making it easy to maintain a single source of truth</p></li><li><p>Enabling programmatic CV generation and updates</p></li></ul>
<h2>Core Features</h2>
<h3>1. Strongly Typed Data Model</h3>
<p>CVBuilder provides a comprehensive data model that covers all aspects of a professional CV:</p>
<pre><code class="language-swift"><span class="tok-type">CV</span>
├── <span class="tok-type">ContactInfo</span>
├── <span class="tok-type">Education</span>
├── <span class="tok-type">WorkExperience</span>
│   ├── <span class="tok-type">Company</span>
│   ├── <span class="tok-type">Role</span>
│   └── <span class="tok-type">ProjectExperience</span>
│       ├── <span class="tok-type">Project</span>
│       └── <span class="tok-type">Tech</span>
└── <span class="tok-type">Period</span></code></pre>
<p>Each component is strongly typed, ensuring data integrity and making it impossible to create invalid CVs.</p>
<h3>2. Multiple Renderers</h3>
<p>CVBuilder supports three different renderers out of the box:</p>
<ol><li><p><strong>MarkdownCVRenderer</strong>: Generates clean, well-formatted Markdown</p></li><li><p><strong>StringCVRenderer</strong>: Produces plain text output</p></li><li><p><strong>IgniteRenderer</strong>: Creates beautiful HTML using the Ignite static site generator</p></li></ol>
<h3>3. Modular Architecture</h3>
<p>The package is split into two main components:</p>
<ul><li><p><code>CVBuilder</code>: Core types and basic rendering</p></li><li><p><code>CVBuilderIgnite</code>: Optional HTML rendering support</p></li></ul>
<p>This separation ensures that projects that don’t need HTML rendering don’t have to pull in unnecessary dependencies.</p>
<h2>Getting Started</h2>
<h3>Installation</h3>
<p>Add CVBuilder to your project using Swift Package Manager:</p>
<pre><code class="language-swift"><span class="tok-operator">.</span><span class="tok-keyword">package</span>(url<span class="tok-operator">:</span> <span class="tok-string">"https://codeberg.org/Mihaela/cvbuilder.git"</span>, branch<span class="tok-operator">:</span> <span class="tok-string">"main"</span>)</code></pre>
<p>Then add the desired product:</p>
<pre><code class="language-swift"><span class="tok-operator">.</span><span class="tok-function">product</span>(name<span class="tok-operator">:</span> <span class="tok-string">"CVBuilder"</span>, <span class="tok-keyword">package</span><span class="tok-operator">:</span> <span class="tok-string">"cvbuilder"</span>),
<span class="tok-operator">.</span><span class="tok-function">product</span>(name<span class="tok-operator">:</span> <span class="tok-string">"CVBuilderIgnite"</span>, <span class="tok-keyword">package</span><span class="tok-operator">:</span> <span class="tok-string">"cvbuilder"</span>) <span class="tok-comment">// if using Ignite</span></code></pre>
<h3>Creating a CV</h3>
<p>Here’s a simple example of creating a CV:</p>
<pre><code class="language-swift"><span class="tok-keyword">import</span> <span class="tok-type">CVBuilder</span>

<span class="tok-comment">// Create contact info</span>
<span class="tok-keyword">let</span> contact<span class="tok-type">Info</span> <span class="tok-operator">=</span> <span class="tok-type">ContactInfo</span>(
    email<span class="tok-operator">:</span> <span class="tok-string">"jane.doe@example.com"</span>,
    phone<span class="tok-operator">:</span> <span class="tok-string">"+1 (555) 123-4567"</span>,
    linked<span class="tok-keyword">In</span><span class="tok-operator">:</span> <span class="tok-type">URL</span>(string<span class="tok-operator">:</span> <span class="tok-string">"https://linkedin.com/in/janedoe"</span>),
    github<span class="tok-operator">:</span> <span class="tok-type">URL</span>(string<span class="tok-operator">:</span> <span class="tok-string">"https://github.com/janedoe"</span>),
    website<span class="tok-operator">:</span> <span class="tok-type">URL</span>(string<span class="tok-operator">:</span> <span class="tok-string">"https://janedoe.dev"</span>),
    location<span class="tok-operator">:</span> <span class="tok-string">"San Francisco, CA"</span>
)

<span class="tok-comment">// Create education</span>
<span class="tok-keyword">let</span> education <span class="tok-operator">=</span> <span class="tok-type">Education</span>(
    institution<span class="tok-operator">:</span> <span class="tok-string">"Stanford University"</span>,
    degree<span class="tok-operator">:</span> <span class="tok-string">"B.S."</span>,
    field<span class="tok-operator">:</span> <span class="tok-string">"Computer Science"</span>,
    period<span class="tok-operator">:</span> <span class="tok-type">Period</span>(
        start<span class="tok-operator">:</span> <span class="tok-operator">.</span><span class="tok-keyword">init</span>(month<span class="tok-operator">:</span> <span class="tok-number">9</span>, year<span class="tok-operator">:</span> <span class="tok-number">2010</span>),
        end<span class="tok-operator">:</span> <span class="tok-operator">.</span><span class="tok-keyword">init</span>(month<span class="tok-operator">:</span> <span class="tok-number">6</span>, year<span class="tok-operator">:</span> <span class="tok-number">2014</span>)
    )
)

<span class="tok-comment">// Create the CV</span>
<span class="tok-keyword">let</span> cv <span class="tok-operator">=</span> <span class="tok-type">CV</span><span class="tok-operator">.</span><span class="tok-function">create</span>(
    name<span class="tok-operator">:</span> <span class="tok-string">"Jane Doe"</span>,
    title<span class="tok-operator">:</span> <span class="tok-string">"Senior Mobile Developer"</span>,
    summary<span class="tok-operator">:</span> <span class="tok-string">"Passionate mobile developer with 5+ years experience..."</span>,
    contact<span class="tok-type">Info</span><span class="tok-operator">:</span> contact<span class="tok-type">Info</span>,
    education<span class="tok-operator">:</span> [education],
    projects<span class="tok-operator">:</span> [project<span class="tok-number">1</span>, project<span class="tok-number">2</span>]
)</code></pre>
<h3>Generating Output</h3>
<p>Once you have your CV data model, generating different formats is straightforward:</p>
<pre><code class="language-swift"><span class="tok-comment">// Generate Markdown</span>
<span class="tok-keyword">let</span> markdown <span class="tok-operator">=</span> <span class="tok-type">MarkdownCVRenderer</span>(cv<span class="tok-operator">:</span> cv)<span class="tok-operator">.</span><span class="tok-function">render</span>()

<span class="tok-comment">// Generate plain text</span>
<span class="tok-keyword">let</span> plain<span class="tok-type">Text</span> <span class="tok-operator">=</span> <span class="tok-type">StringCVRenderer</span>(cv<span class="tok-operator">:</span> cv)<span class="tok-operator">.</span><span class="tok-function">render</span>()

<span class="tok-comment">// Generate HTML (requires CVBuilderIgnite)</span>
<span class="tok-keyword">let</span> html <span class="tok-operator">=</span> <span class="tok-type">IgniteRenderer</span>(cv<span class="tok-operator">:</span> cv)<span class="tok-operator">.</span><span class="tok-function">render</span>()</code></pre>
<h2>Advanced Features</h2>
<h3>Project Builder Pattern</h3>
<p>CVBuilder includes a builder pattern for creating project experiences:</p>
<pre><code class="language-swift"><span class="tok-keyword">let</span> project <span class="tok-operator">=</span> <span class="tok-keyword">try</span><span class="tok-operator">!</span> <span class="tok-type">Project</span><span class="tok-operator">.</span><span class="tok-type">Builder</span>()
    <span class="tok-operator">.</span><span class="tok-function">withName</span>(<span class="tok-string">"iOS App Redesign"</span>)
    <span class="tok-operator">.</span><span class="tok-function">withCompany</span>(apple<span class="tok-type">Company</span>)
    <span class="tok-operator">.</span><span class="tok-function">withRole</span>(senior<span class="tok-type">IOS</span>)
    <span class="tok-operator">.</span><span class="tok-function">withPeriod</span>(start<span class="tok-operator">:</span> (month<span class="tok-operator">:</span> <span class="tok-number">3</span>, year<span class="tok-operator">:</span> <span class="tok-number">2020</span>), end<span class="tok-operator">:</span> (month<span class="tok-operator">:</span> <span class="tok-number">9</span>, year<span class="tok-operator">:</span> <span class="tok-number">2021</span>))
    <span class="tok-operator">.</span><span class="tok-function">addDescription</span>(<span class="tok-string">"Led a team of 5 developers..."</span>)
    <span class="tok-operator">.</span><span class="tok-function">withTechs</span>([swift, swift<span class="tok-type">UI</span>])
    <span class="tok-operator">.</span><span class="tok-function">build</span>()</code></pre>
<h3>Tech Stack Management</h3>
<p>The package includes a <code>Tech</code> type for managing technical skills:</p>
<pre><code class="language-swift"><span class="tok-keyword">let</span> swift <span class="tok-operator">=</span> <span class="tok-type">Tech</span>(name<span class="tok-operator">:</span> <span class="tok-string">"Swift"</span>, category<span class="tok-operator">:</span> <span class="tok-operator">.</span>language)
<span class="tok-keyword">let</span> swift<span class="tok-type">UI</span> <span class="tok-operator">=</span> <span class="tok-type">Tech</span>(name<span class="tok-operator">:</span> <span class="tok-string">"SwiftUI"</span>, category<span class="tok-operator">:</span> <span class="tok-operator">.</span>framework)
<span class="tok-keyword">let</span> rest<span class="tok-type">API</span> <span class="tok-operator">=</span> <span class="tok-type">Tech</span>(name<span class="tok-operator">:</span> <span class="tok-string">"REST API"</span>, category<span class="tok-operator">:</span> <span class="tok-operator">.</span>concept)</code></pre>
<h2>How I Use It on This Webpage</h2>
<p>My blog is built using <a href="https://github.com/Ignite-Swift/Ignite">Ignite</a>, a static site generator for Swift. I’ve integrated CVBuilder into my website to maintain and display my CV in a clean, professional format.</p>
<h3>Package Dependencies</h3>
<p>I include CVBuilder in my website’s package file:</p>
<pre><code class="language-swift"><span class="tok-keyword">let</span> <span class="tok-keyword">package</span> <span class="tok-operator">=</span> <span class="tok-keyword">Package</span>(
    name<span class="tok-operator">:</span> <span class="tok-string">"IgniteStarter"</span>,
    platforms<span class="tok-operator">:</span> [<span class="tok-operator">.</span><span class="tok-function">macOS</span>(<span class="tok-operator">.</span>v<span class="tok-number">13</span>)],
    dependencies<span class="tok-operator">:</span> [
        <span class="tok-operator">.</span><span class="tok-keyword">package</span>(url<span class="tok-operator">:</span> <span class="tok-string">"https://github.com/twostraws/Ignite.git"</span>, branch<span class="tok-operator">:</span> <span class="tok-string">"main"</span>),
        <span class="tok-operator">.</span><span class="tok-keyword">package</span>(url<span class="tok-operator">:</span> <span class="tok-string">"https://codeberg.org/Mihaela/cvbuilder.git"</span>, branch<span class="tok-operator">:</span> <span class="tok-string">"main"</span>)
    ],
    targets<span class="tok-operator">:</span> [
        <span class="tok-operator">.</span><span class="tok-function">executableTarget</span>(
            name<span class="tok-operator">:</span> <span class="tok-string">"IgniteStarter"</span>,
            dependencies<span class="tok-operator">:</span> [
                <span class="tok-operator">.</span><span class="tok-function">product</span>(name<span class="tok-operator">:</span> <span class="tok-string">"Ignite"</span>, <span class="tok-keyword">package</span><span class="tok-operator">:</span> <span class="tok-string">"Ignite"</span>),
                <span class="tok-operator">.</span><span class="tok-function">product</span>(name<span class="tok-operator">:</span> <span class="tok-string">"CVBuilder"</span>, <span class="tok-keyword">package</span><span class="tok-operator">:</span> <span class="tok-string">"cvbuilder"</span>),
                <span class="tok-operator">.</span><span class="tok-function">product</span>(name<span class="tok-operator">:</span> <span class="tok-string">"CVBuilderIgnite"</span>, <span class="tok-keyword">package</span><span class="tok-operator">:</span> <span class="tok-string">"cvbuilder"</span>)
            ]
        ),
    ]
)</code></pre>
<h3>Personal Information</h3>
<p>I maintain my personal information in a dedicated Swift file (<code>CV+Mihaela.swift</code>):</p>
<pre><code class="language-swift"><span class="tok-keyword">public</span> <span class="tok-keyword">extension</span> <span class="tok-type">CV</span> {
    <span class="tok-keyword">static</span> <span class="tok-keyword">func</span> <span class="tok-function">createForMihaela</span>() <span class="tok-operator">-</span><span class="tok-operator">&gt;</span> <span class="tok-type">CV</span> {
        <span class="tok-keyword">let</span> contact<span class="tok-type">Info</span> <span class="tok-operator">=</span> <span class="tok-type">ContactInfo</span>(
            email<span class="tok-operator">:</span> <span class="tok-string">"me@me.com"</span>,
            phone<span class="tok-operator">:</span> <span class="tok-string">"+12233445566"</span>,
            linked<span class="tok-keyword">In</span><span class="tok-operator">:</span> <span class="tok-type">URL</span>(string<span class="tok-operator">:</span> <span class="tok-string">"https://www.linkedin.com/in/mylinkedin"</span>),
            github<span class="tok-operator">:</span> <span class="tok-type">URL</span>(string<span class="tok-operator">:</span> <span class="tok-string">"https://github.com/mygithub"</span>),
            website<span class="tok-operator">:</span> <span class="tok-type">URL</span>(string<span class="tok-operator">:</span> <span class="tok-string">"https://mywebsite.com"</span>),
            location<span class="tok-operator">:</span> <span class="tok-string">"City, Country"</span>
        )

        <span class="tok-keyword">let</span> education <span class="tok-operator">=</span> <span class="tok-type">Education</span>(<span class="tok-operator">.</span><span class="tok-operator">.</span><span class="tok-operator">.</span>)

        <span class="tok-comment">// ... rest of the implementation</span>
    }
}</code></pre>
<p><img src="https://aleahim.com/images/cvbuilder/cv01.png" alt="Part of Xcode’s navigator showing SocialItems.swift, a Layouts folder, a folder named mycv holding CV+Mihaela.swift, CV+Projects.swift and MyCV.swift, and a Navigation folder."></p>
<h3>Project History</h3>
<p>My professional experience is organized in a separate file (<code>CV+Projects.swift</code>), which contains detailed information about all my projects:</p>
<pre><code class="language-swift"><span class="tok-keyword">public</span> <span class="tok-keyword">extension</span> <span class="tok-type">CV</span> {
    <span class="tok-keyword">static</span> <span class="tok-keyword">func</span> <span class="tok-function">createMihaelasProjects</span>() <span class="tok-operator">-</span><span class="tok-operator">&gt;</span> [<span class="tok-type">Project</span>] {
        <span class="tok-keyword">var</span> result <span class="tok-operator">=</span> [<span class="tok-type">Project</span>]()

        <span class="tok-comment">// Create companies</span>
        <span class="tok-keyword">let</span> undabot <span class="tok-operator">=</span> <span class="tok-type">Company</span>(name<span class="tok-operator">:</span> <span class="tok-string">"Undabot"</span>)
        <span class="tok-keyword">let</span> token <span class="tok-operator">=</span> <span class="tok-type">Company</span>(name<span class="tok-operator">:</span> <span class="tok-string">"Token"</span>)
        <span class="tok-comment">// ... more companies</span>

        <span class="tok-comment">// Create tech skills</span>
        <span class="tok-keyword">let</span> swift <span class="tok-operator">=</span> <span class="tok-type">Tech</span>(name<span class="tok-operator">:</span> <span class="tok-string">"Swift"</span>, category<span class="tok-operator">:</span> <span class="tok-operator">.</span>language)
        <span class="tok-keyword">let</span> ui<span class="tok-type">Kit</span> <span class="tok-operator">=</span> <span class="tok-type">Tech</span>(name<span class="tok-operator">:</span> <span class="tok-string">"UIKit"</span>, category<span class="tok-operator">:</span> <span class="tok-operator">.</span>framework)
        <span class="tok-comment">// ... more tech skills</span>

        <span class="tok-comment">// Create projects using the builder pattern</span>
        <span class="tok-keyword">let</span> project<span class="tok-number">1</span> <span class="tok-operator">=</span> <span class="tok-keyword">try</span><span class="tok-operator">!</span> <span class="tok-type">Project</span><span class="tok-operator">.</span><span class="tok-type">Builder</span>()
            <span class="tok-operator">.</span><span class="tok-function">withName</span>(<span class="tok-string">"SomeProject"</span>)
            <span class="tok-operator">.</span><span class="tok-function">withCompany</span>(<span class="tok-type">Company</span> name)
            <span class="tok-operator">.</span><span class="tok-function">withRole</span>(junior<span class="tok-type">IOS</span>)
            <span class="tok-operator">.</span><span class="tok-function">withPeriod</span>(start<span class="tok-operator">:</span> (month<span class="tok-operator">:</span> <span class="tok-number">9</span>, year<span class="tok-operator">:</span> <span class="tok-number">20</span><span class="tok-type">XX</span>), end<span class="tok-operator">:</span> (month<span class="tok-operator">:</span> <span class="tok-number">12</span>, year<span class="tok-operator">:</span> <span class="tok-number">20</span><span class="tok-type">XX</span>))
            <span class="tok-operator">.</span><span class="tok-function">addDescription</span>(<span class="tok-string">"iOS (iPad) book application about...)
            .withTechs([swift, uiKit])
            .build()

        // ... more projects

        return result
    }
}</span></code></pre>
<p>This modular approach allows me to:</p>
<ol><li><p>Keep my CV data in a strongly-typed format</p></li><li><p>Easily update my experience and skills</p></li><li><p>Generate both HTML and Markdown versions of my CV</p></li><li><p>Maintain consistency across different platforms</p></li></ol>
<p>The CV is automatically generated when the website is built, ensuring that my professional information is always up-to-date and consistently formatted.</p>
<h3>Markdown Generation</h3>
<p>I also generate a Markdown version of my CV that I can use to create a fresh PDF whenever needed. This is done using a simple function:</p>
<pre><code class="language-swift"><span class="tok-keyword">func</span> <span class="tok-function">generateMihaelasCVMarkdownInContentFolder</span>() {
    <span class="tok-keyword">let</span> cv <span class="tok-operator">=</span> <span class="tok-type">CV</span><span class="tok-operator">.</span><span class="tok-function">createForMihaela</span>()
    <span class="tok-keyword">let</span> markdown <span class="tok-operator">=</span> <span class="tok-type">MarkdownCVRenderer</span>()<span class="tok-operator">.</span><span class="tok-function">render</span>(cv<span class="tok-operator">:</span> cv)

    <span class="tok-keyword">let</span> file<span class="tok-type">URL</span> <span class="tok-operator">=</span> <span class="tok-type">URL</span>(file<span class="tok-type">URLWithPath</span><span class="tok-operator">:</span> <span class="tok-string">"Assets/mihaela-cv.md"</span>)

    <span class="tok-keyword">do</span> {
        <span class="tok-keyword">try</span> markdown<span class="tok-operator">.</span><span class="tok-function">write</span>(to<span class="tok-operator">:</span> file<span class="tok-type">URL</span>, atomically<span class="tok-operator">:</span> <span class="tok-literal">true</span>, encoding<span class="tok-operator">:</span> <span class="tok-operator">.</span>utf<span class="tok-number">8</span>)
        <span class="tok-function">print</span>(<span class="tok-string">"✅ Written to \(fileURL.path)"</span>)
    } <span class="tok-keyword">catch</span> {
        <span class="tok-function">print</span>(<span class="tok-string">"❌ Failed to write Mihaela's CV: \(error.localizedDescription)"</span>)
    }
}</code></pre>
<p>This function:</p>
<ol><li><p>Creates my CV using the <code>createForMihaela()</code> function</p></li><li><p>Renders it to Markdown using <code>MarkdownCVRenderer</code></p></li><li><p>Saves the output to <code>Assets/mihaela-cv.md</code></p></li><li><p>Provides feedback about the success or failure of the operation</p></li></ol>
<p>I can then use this Markdown file to generate a fresh PDF whenever I need to update my CV for job applications or other purposes.</p>
<h2>Future Plans</h2>
<p>CVBuilder is actively maintained and has several planned improvements:</p>
<ol><li><p>Command-line interface for CV generation</p></li><li><p>Additional renderers (PDF, LaTeX)</p></li><li><p>Import/export functionality for common formats</p></li><li><p>Template system for customizing output</p></li></ol>
<h2>Conclusion</h2>
<p>CVBuilder provides a robust solution for managing professional CVs in Swift. Its type-safe design, multiple renderers, and modular architecture make it an excellent choice for developers who want to maintain their CVs programmatically.</p>
<p>Whether you’re building a personal website, managing multiple CV versions, or creating a CV management system, CVBuilder can help streamline your workflow and ensure consistency across all your professional documents.</p>
<h2>Resources</h2>
<ul><li><a href="https://codeberg.org/MarkdownPDFHQ/cvbuilder">Codeberg Repository</a></li><li><a href="https://codeberg.org/Mihaela/cvbuilder/src/branch/main/SampleCV.md">Sample CV</a></li><li><a href="https://codeberg.org/MarkdownPDFHQ/cvbuilder#readme">Documentation</a></li></ul>]]></content:encoded>
</item>
</channel>
</rss>
