<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Im Woojin</title>
    <description>The latest articles on DEV Community by Im Woojin (@rakkunn).</description>
    <link>https://dev.to/rakkunn</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3860147%2F8f75007d-4931-48ca-881c-915ce86430f2.jpeg</url>
      <title>DEV Community: Im Woojin</title>
      <link>https://dev.to/rakkunn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rakkunn"/>
    <language>en</language>
    <item>
      <title>Vicem v1.3.0: Reversible Repo Maps, AST Side-Effect Tags, and Honest Net-Token Benchmarks (0 Dependencies)</title>
      <dc:creator>Im Woojin</dc:creator>
      <pubDate>Fri, 13 Nov 2026 08:26:24 +0000</pubDate>
      <link>https://dev.to/rakkunn/vicem-v130-reversible-repo-maps-ast-side-effect-tags-and-honest-net-token-benchmarks-0-37hg</link>
      <guid>https://dev.to/rakkunn/vicem-v130-reversible-repo-maps-ast-side-effect-tags-and-honest-net-token-benchmarks-0-37hg</guid>
      <description>&lt;p&gt;Six days ago, I shipped &lt;strong&gt;Vicem v1.2.0&lt;/strong&gt; to solve session handoff amnesia across Claude Code, Codex, and Cursor. Since then, the toughest engineering pushback I got came down to two questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Raw Dump vs. One-Way Compression Trap&lt;/strong&gt;: Existing repo packers either dump 80k tokens of XML/Markdown, or strip function bodies with Tree-sitter WASM (&lt;code&gt;~100 MB&lt;/code&gt;, 80+ npm dependencies) with no way for the agent to restore a body when it actually needs to edit it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Net Token Math &amp;amp; Untrusted Input&lt;/strong&gt;: What is the &lt;em&gt;net&lt;/em&gt; token savings after the agent pays for MCP tool calls to fetch missing bodies—and what happens if a malicious comment or test log inside the repo tries to prompt-inject your next agent?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Today (Nov 13), I shipped &lt;strong&gt;&lt;a href="https://github.com/RAKKUNN/vicem/releases/tag/v1.3.0" rel="noopener noreferrer"&gt;Vicem v1.3.0&lt;/a&gt;&lt;/strong&gt; (&lt;code&gt;npm i -g vicem-cli&lt;/code&gt; or &lt;code&gt;npx vicem-cli&lt;/code&gt;)—still &lt;strong&gt;0 npm dependencies&lt;/strong&gt;, &lt;strong&gt;0 network calls&lt;/strong&gt;, and &lt;strong&gt;0.47 MB&lt;/strong&gt; unpacked—built to answer both with reproducible numbers.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/RAKKUNN" rel="noopener noreferrer"&gt;
        RAKKUNN
      &lt;/a&gt; / &lt;a href="https://github.com/RAKKUNN/vicem" rel="noopener noreferrer"&gt;
        vicem
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Zero-dependency AI agent context baton &amp;amp; diet suite. Hand off sessions between Claude Code, Codex, Gemini, and Cursor with 80% fewer tokens.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;
  
    
    
    &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRAKKUNN%2Fvicem%2FHEAD%2F.%2Flogo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRAKKUNN%2Fvicem%2FHEAD%2F.%2Flogo.png" width="88" height="88" alt="Vicem Logo"&gt;&lt;/a&gt;
  
&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Vicem — Diet the Context, Pass the Baton&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;
  &lt;a href="https://hol.org/guard/extensions/mcp.vicem" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/cd6de5e17ae080bddc32b534754402076a7c92623351c98a77d248cf7870857f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f484f4c5f47756172642532307c253230566963656d5f436f6e746578745f4261746f6e5f4d43502d3245354141433f6c6f676f3d736869656c64266c6f676f436f6c6f723d7768697465" alt="Reviewed by HOL Guard"&gt;&lt;/a&gt;
  &lt;a href="https://glama.ai/mcp/servers/RAKKUNN/vicem" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/4810fc0535cce33bd3452acd7cf0349fd928c01cc18a1da7b4a1ff5b4ed60464/68747470733a2f2f676c616d612e61692f6d63702f736572766572732f52414b4b554e4e2f766963656d2f6261646765732f73636f72652e737667" alt="Vicem MCP server rated A on Glama"&gt;&lt;/a&gt;
  &lt;a href="https://mcp.so/servers/vicem" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/0ff652b32bae8243ff4fb8eae0cfa2b9af4a287e325f365749720f20005384ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d43502e736f2d4c69737465642d3046313732413f6c6f676f3d6d6f64656c636f6e7465787470726f746f636f6c266c6f676f436f6c6f723d7768697465" alt="Listed on MCP.so"&gt;&lt;/a&gt;
  &lt;a href="https://mcpservers.org/servers/rakkunn/vicem" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/f5f8311a3ef4a1fae7b91c057603a92c64e67c1bd89acdf8b4dfdb8cfa4d7889/68747470733a2f2f6d6370736572766572732e6f72672f62616467652e737667" alt="Listed on mcpservers.org"&gt;&lt;/a&gt;
  &lt;a href="https://www.npmjs.com/package/vicem-cli" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/c1d21669483f7cf4563dde6faa8964af3cde8403bc0f7fe156a74b96173db8b7/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f766963656d2d636c693f636f6c6f723d434233383337266c6162656c3d6e706d25323028766963656d2d636c6929" alt="npm vicem-cli"&gt;&lt;/a&gt;
  &lt;a href="https://github.com/RAKKUNN/vicem/releases/tag/v1.3.0" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/b046f01f9762a55d211932f8fa984dfc44a7099406bdcf7dd0237c0734832b04/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72656c656173652d76312e332e302d313042393831" alt="Release v1.3.0"&gt;&lt;/a&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/12d6f7f1036a99f8006a47b35b49714ef85086aa3100fce9d53d0d80ae6092f7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e64656e636965732d302d334238324636"&gt;&lt;img src="https://camo.githubusercontent.com/12d6f7f1036a99f8006a47b35b49714ef85086aa3100fce9d53d0d80ae6092f7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e64656e636965732d302d334238324636" alt="Zero Dependencies"&gt;&lt;/a&gt;
  &lt;a href="https://github.com/RAKKUNN/vicem/./LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/cd7377b4f8bac84229a3aac3f9b5ed60045302555b81483ce7e8e48099db9b1a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d463539453042" alt="MIT License"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Hit Claude Code's 5-hour quota mid-feature? Or watching Cursor / Codex slow to a crawl after 150k tokens of context rot?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Vicem&lt;/strong&gt; compacts your active coding session by &lt;strong&gt;80–92% net effective tokens&lt;/strong&gt; (&lt;a href="https://github.com/RAKKUNN/vicem/./docs/BENCHMARK.md" rel="noopener noreferrer"&gt;Measured Eval&lt;/a&gt; — via deterministic AST code skeletonization with &lt;code&gt;[pure]&lt;/code&gt; / &lt;code&gt;[effects: ...]&lt;/code&gt; tags + SHA-256-checked, secret-redacted MCP rehydration) and hands off a hardened &lt;code&gt;.vicem/BATON.md&lt;/code&gt; across &lt;strong&gt;Claude Code, Cursor, Codex CLI, Gemini CLI, Windsurf, Antigravity IDE, and Web AI&lt;/strong&gt; in 3 seconds — with &lt;strong&gt;&lt;code&gt;0&lt;/code&gt; npm dependencies&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;0&lt;/code&gt; network calls&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;⭐ &lt;strong&gt;Tip:&lt;/strong&gt; Click &lt;strong&gt;Star&lt;/strong&gt; (top-right) to bookmark this repo for the next time your coding agent hits a 5-hour quota limit or context rot.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;
  &lt;a href="https://rakkunn.github.io/vicem/promo.mp4" rel="nofollow noopener noreferrer"&gt;
    &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRAKKUNN%2Fvicem%2FHEAD%2F.%2Fpromo.gif" width="100%" alt="Vicem 15s Relay Promo — Diet the Context, Pass the Baton (Click for 1080p60 with sound)"&gt;
  &lt;/a&gt;
  &lt;br&gt;
  🎬 &lt;strong&gt;15s Relay Overview&lt;/strong&gt; — &lt;a href="https://rakkunn.github.io/vicem/promo.mp4" rel="nofollow noopener noreferrer"&gt;Watch in 1080p60 with sound (MP4)&lt;/a&gt; · &lt;a href="https://rakkunn.github.io/vicem/links.html" rel="nofollow noopener noreferrer"&gt;All Links &amp;amp; Quick Copy&lt;/a&gt;
&lt;/p&gt;




&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;⚡ 10-Second Quick Start (&lt;code&gt;npx&lt;/code&gt; — Zero Install)&lt;/h2&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;1. Run the Local Handoff GUI or&lt;/h3&gt;…&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/RAKKUNN/vicem" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;






&lt;h2&gt;
  
  
  1. Deterministic AST Side-Effect Tags (&lt;code&gt;[pure]&lt;/code&gt; vs &lt;code&gt;[effects: ...]&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;When an agent reads a skeletonized file, seeing only the function signature isn't always enough. If you're debugging a race condition or auditing security boundaries, you need to know &lt;em&gt;which&lt;/em&gt; elided functions touch the filesystem, network, or subprocesses—without rehydrating every single one.&lt;/p&gt;

&lt;p&gt;Vicem v1.3.0 runs a zero-dependency static analyzer over JS/TS and Python ASTs and annotates every skeletonized symbol with deterministic purity tags and &lt;strong&gt;1-hop intra-file propagation&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// What the receiving agent sees in .vicem/BATON.md (disk file untouched):&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;JwtPayload&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;sub&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;exp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'admin'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s1"&gt;'user'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;normalizeBearerHeader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rawHeader&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* ... [pure] */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;verifySessionToken&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rawToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;JwtPayload&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* ... [effects: fs-read, throws, async] */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In our security audit benchmark (&lt;code&gt;S3-Audit&lt;/code&gt;, inspecting 10 functions across TypeScript and Python for &lt;code&gt;fs-write&lt;/code&gt; and &lt;code&gt;proc&lt;/code&gt; effects):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;v1.2.0 (blind inspection)&lt;/strong&gt;: Required &lt;strong&gt;10&lt;/strong&gt; &lt;code&gt;vicem_rehydrate&lt;/code&gt; MCP calls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;v1.3.0 (effect-guided + 1-hop propagation)&lt;/strong&gt;: Required &lt;strong&gt;4&lt;/strong&gt; calls (&lt;strong&gt;-60% fewer MCP tool calls&lt;/strong&gt;), skipping &lt;code&gt;[pure]&lt;/code&gt; and read-only helpers while still flagging callers that transitively invoke side-effecting callees.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Measuring Honest Net Token Savings (Including MCP Rehydration Costs)
&lt;/h2&gt;

&lt;p&gt;Initial compression numbers are easy to game if you ignore what happens &lt;em&gt;after&lt;/em&gt; the handoff.&lt;/p&gt;

&lt;p&gt;Vicem v1.3.0 instruments &lt;code&gt;.vicem/metrics.json&lt;/code&gt; (&lt;code&gt;vicem stats&lt;/code&gt; / &lt;code&gt;vicem://metrics/cache&lt;/code&gt;) with CPU-cache-style telemetry:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Symbol Cache Hit Rate (&lt;code&gt;CHR_symbol&lt;/code&gt;)&lt;/strong&gt;: % of skeletonized functions whose L1 signature + &lt;code&gt;[pure]&lt;/code&gt;/&lt;code&gt;[effects]&lt;/code&gt; tag + 1-hop call graph satisfied the task without fetching the body.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Net Effective Token Reduction (&lt;code&gt;NTR&lt;/code&gt;)&lt;/strong&gt;: End-to-end token savings &lt;strong&gt;after charging both &lt;code&gt;BATON.md&lt;/code&gt; AND every &lt;code&gt;vicem_rehydrate&lt;/code&gt; JSON-RPC response&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Standard Handoff Scenarios (&lt;code&gt;125&lt;/code&gt;-symbol polyglot JS/TS/Python corpus)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Raw Context&lt;/th&gt;
&lt;th&gt;Baton + All Rehydrate RPCs&lt;/th&gt;
&lt;th&gt;Rehydrated Symbols&lt;/th&gt;
&lt;th&gt;Skeleton Cache Hit Rate&lt;/th&gt;
&lt;th&gt;Net Effective Savings (NTR)&lt;/th&gt;
&lt;th&gt;Avg RPC Latency&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;&lt;code&gt;S0-HotFix&lt;/code&gt;&lt;/strong&gt; (Active diff/error auto-expanded)&lt;/td&gt;
&lt;td&gt;66.3k&lt;/td&gt;
&lt;td&gt;5.0k&lt;/td&gt;
&lt;td&gt;0 / 124 (0 RPCs)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-92.4%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;&lt;code&gt;S1-Bugfix&lt;/code&gt;&lt;/strong&gt; (Targeted 2-symbol fix)&lt;/td&gt;
&lt;td&gt;66.2k&lt;/td&gt;
&lt;td&gt;5.3k&lt;/td&gt;
&lt;td&gt;2 / 125 (2 RPCs)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;98.4%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-92.1%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;15.32 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;&lt;code&gt;S2-Refactor&lt;/code&gt;&lt;/strong&gt; (5 roots + 1-hop callees)&lt;/td&gt;
&lt;td&gt;66.2k&lt;/td&gt;
&lt;td&gt;9.9k&lt;/td&gt;
&lt;td&gt;11 / 125 (5 RPCs)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;91.2%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-85.0%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;31.55 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;&lt;code&gt;S3-Audit&lt;/code&gt;&lt;/strong&gt; (Effect-guided security audit)&lt;/td&gt;
&lt;td&gt;66.2k&lt;/td&gt;
&lt;td&gt;5.4k&lt;/td&gt;
&lt;td&gt;4 / 125 (4 RPCs)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;96.8%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-91.9%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;10.9 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  The Honest Break-Even Curve (&lt;code&gt;S4-Stress&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;Skeletonization isn't magic—if an agent rehydrates &lt;em&gt;everything&lt;/em&gt;, MCP round-trips add overhead. Here is the exact break-even curve from &lt;code&gt;npm run bench&lt;/code&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;% of Codebase Rehydrated&lt;/th&gt;
&lt;th&gt;Symbol Cache Hit Rate&lt;/th&gt;
&lt;th&gt;Net Effective Savings (NTR)&lt;/th&gt;
&lt;th&gt;Recommended Strategy&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;10%&lt;/strong&gt; (13 / 125 syms)&lt;/td&gt;
&lt;td&gt;89.6%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-87.0%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Use Skeleton + Rehydrate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;30%&lt;/strong&gt; (38 / 125 syms)&lt;/td&gt;
&lt;td&gt;69.6%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-52.6%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Use Skeleton + Rehydrate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;50%&lt;/strong&gt; (57 / 125 syms)&lt;/td&gt;
&lt;td&gt;54.4%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-22.2%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Use Skeleton + Rehydrate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;80%&lt;/strong&gt; (87 / 125 syms)&lt;/td&gt;
&lt;td&gt;30.4%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+28.4% (Overhead)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Read Raw File Directly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;100%&lt;/strong&gt; (111 / 125 syms)&lt;/td&gt;
&lt;td&gt;11.2%&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;+56.2% (Overhead)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Read Raw File Directly&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Takeaway:&lt;/strong&gt; Break-even sits at &lt;strong&gt;~65%&lt;/strong&gt; of skeletonized symbols. For targeted bugfixes, reviews, and multi-agent handoffs (typically 1–30% edits), net savings stay between &lt;strong&gt;-52% and -92%&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Architectural Benchmark vs. Existing Repo Packers
&lt;/h2&gt;

&lt;p&gt;To see where Vicem stands against common repo-packing architectures, I ran a head-to-head local benchmark on an Apple M2 Pro (&lt;code&gt;darwin-arm64&lt;/code&gt;, Node &lt;code&gt;v25.9.0&lt;/code&gt;, &lt;code&gt;/usr/bin/time -l&lt;/code&gt; median of 5 runs, OpenAI &lt;code&gt;o200k_base&lt;/code&gt; BPE tokenizer) against an &lt;strong&gt;87,460-token&lt;/strong&gt; polyglot JS/TS/Python/JSON repo containing an inline test secret and an untrusted prompt-injection comment:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool / Architecture Category&lt;/th&gt;
&lt;th&gt;Install Footprint (Deps)&lt;/th&gt;
&lt;th&gt;Median Time&lt;/th&gt;
&lt;th&gt;Peak RSS&lt;/th&gt;
&lt;th&gt;Output (&lt;code&gt;o200k_base&lt;/code&gt;)&lt;/th&gt;
&lt;th&gt;Reduction&lt;/th&gt;
&lt;th&gt;Reversible Bodies (&lt;code&gt;rehydrate&lt;/code&gt;)&lt;/th&gt;
&lt;th&gt;Secret / Injection Defense&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Vicem v1.3.0 (&lt;code&gt;diet&lt;/code&gt; — Task Baton + Hot-Expand)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.47 MB (&lt;code&gt;0&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;133 ms&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;55 MB&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1,051 tok&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-98.8%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Yes (active fn inline, 0 RPC)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Redacted / Defanged&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Vicem v1.3.0 (&lt;code&gt;vicem map&lt;/code&gt; — Whole-Repo Map)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.47 MB (&lt;code&gt;0&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;161 ms&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;77 MB&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;8,678 tok&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-90.1%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Yes (221 symbols via MCP)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Redacted / Defanged&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Vicem v1.3.0 (&lt;code&gt;--compact-all&lt;/code&gt; Full Baton)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;0.47 MB (&lt;code&gt;0&lt;/code&gt;)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;219 ms&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;77 MB&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;9,721 tok&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-88.9%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Yes (221 symbols via MCP)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Redacted / Defanged&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tree-sitter WASM Repo Packer (&lt;code&gt;--compress&lt;/code&gt;, Full)&lt;/td&gt;
&lt;td&gt;~102 MB (&lt;code&gt;84&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;333 ms&lt;/td&gt;
&lt;td&gt;208 MB&lt;/td&gt;
&lt;td&gt;18,587 tok&lt;/td&gt;
&lt;td&gt;-78.7%&lt;/td&gt;
&lt;td&gt;No (one-way deletion)&lt;/td&gt;
&lt;td&gt;Secrets only / Injection leaked&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tree-sitter WASM Repo Packer (&lt;code&gt;--compress&lt;/code&gt;, Code-Only)&lt;/td&gt;
&lt;td&gt;~102 MB (&lt;code&gt;84&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;331 ms&lt;/td&gt;
&lt;td&gt;207 MB&lt;/td&gt;
&lt;td&gt;9,844 tok&lt;/td&gt;
&lt;td&gt;-86.1%*&lt;/td&gt;
&lt;td&gt;No (one-way deletion)&lt;/td&gt;
&lt;td&gt;Secrets only / Injection leaked&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Standard XML Repo Packer (Default)&lt;/td&gt;
&lt;td&gt;~102 MB (&lt;code&gt;84&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;274 ms&lt;/td&gt;
&lt;td&gt;164 MB&lt;/td&gt;
&lt;td&gt;79,934 tok&lt;/td&gt;
&lt;td&gt;-8.6%&lt;/td&gt;
&lt;td&gt;Full raw dump&lt;/td&gt;
&lt;td&gt;Leaked / Leaked&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Python Repo Ingestor&lt;/td&gt;
&lt;td&gt;~25 MB&lt;/td&gt;
&lt;td&gt;419 ms&lt;/td&gt;
&lt;td&gt;145 MB&lt;/td&gt;
&lt;td&gt;79,650 tok&lt;/td&gt;
&lt;td&gt;-8.9%&lt;/td&gt;
&lt;td&gt;Full raw dump&lt;/td&gt;
&lt;td&gt;Leaked / Leaked&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Raw File Concatenator&lt;/td&gt;
&lt;td&gt;~0.2 MB&lt;/td&gt;
&lt;td&gt;36 ms&lt;/td&gt;
&lt;td&gt;18 MB&lt;/td&gt;
&lt;td&gt;87,537 tok&lt;/td&gt;
&lt;td&gt;0%&lt;/td&gt;
&lt;td&gt;Full raw dump&lt;/td&gt;
&lt;td&gt;Leaked / Leaked&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;On code-only files (&lt;code&gt;70,682&lt;/code&gt; raw tokens), &lt;code&gt;vicem map&lt;/code&gt; produces **8,583 tok (-87.9%)&lt;/em&gt;* in &lt;strong&gt;160 ms&lt;/strong&gt; while keeping all 221 elided functions restorable on demand via &lt;code&gt;vicem_rehydrate&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can reproduce every number in this post locally with zero network access:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/RAKKUNN/vicem.git &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd&lt;/span&gt; vicem
npm run bench
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  4. Defanging Prompt Injections &amp;amp; Protecting Invariants
&lt;/h2&gt;

&lt;p&gt;Three more additions in v1.3.0 came directly from real-world handoff failures:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;BatonInjectionGuard&lt;/code&gt;&lt;/strong&gt;: Harvested test logs, stack traces, and code comments are untrusted input. Vicem now detects and defangs Unicode Trojan bidirectional overrides, markdown fence-escape payloads, and instruction-hijack strings before writing &lt;code&gt;.vicem/BATON.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;vicem map&lt;/code&gt; &amp;amp; &lt;code&gt;--compact-all&lt;/code&gt;&lt;/strong&gt;: Generates a reversible whole-repo skeleton map (&lt;code&gt;8,678&lt;/code&gt; tokens from &lt;code&gt;87,460&lt;/code&gt;) with every body indexed in &lt;code&gt;.vicem/ledger.json&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;vicem decide&lt;/code&gt; &amp;amp; &lt;code&gt;vicem init --agent-hooks&lt;/code&gt;&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Pin architectural invariants (&lt;code&gt;vicem decide "Keep zero npm dependencies"&lt;/code&gt;) so they never get compacted away across 5+ agent handoffs.&lt;/li&gt;
&lt;li&gt;Install Claude Code lifecycle hooks (&lt;code&gt;vicem init --agent-hooks&lt;/code&gt;) to automate baton checkpoints around compaction and session boundaries.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Try It in 10 Seconds
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Guided Handoff GUI (preview &amp;amp; edit before sending)&lt;/span&gt;
npx -y vicem-cli gui

&lt;span class="c"&gt;# 2. Pack &amp;amp; hand off directly between CLI agents&lt;/span&gt;
npx -y vicem-cli codex
npx -y vicem-cli claude
npx -y vicem-cli cursor

&lt;span class="c"&gt;# 3. Generate a reversible whole-repo map&lt;/span&gt;
npx -y vicem-cli map

&lt;span class="c"&gt;# 4. Register as an MCP server (Claude Code / Codex)&lt;/span&gt;
claude mcp add vicem -- npx -y vicem-cli mcp
codex mcp add vicem -- npx -y vicem-cli mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub (MIT, 775/775 tests passing):&lt;/strong&gt; &lt;a href="https://github.com/RAKKUNN/vicem" rel="noopener noreferrer"&gt;https://github.com/RAKKUNN/vicem&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;npm:&lt;/strong&gt; &lt;code&gt;vicem-cli@1.3.0&lt;/code&gt; / &lt;code&gt;@rakkunn/vicem@1.3.0&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-install browser sandbox:&lt;/strong&gt; &lt;a href="https://rakkunn.github.io/vicem/" rel="noopener noreferrer"&gt;https://rakkunn.github.io/vicem/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you test &lt;code&gt;vicem map&lt;/code&gt; or &lt;code&gt;npm run bench&lt;/code&gt; on your own codebase, drop your token reduction % and &lt;code&gt;CHR&lt;/code&gt; numbers in the comments—I'd love to see how it holds up on larger monorepos!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>devtool</category>
      <category>productivity</category>
    </item>
    <item>
      <title>What git diff Misses When You Switch Coding Agents (And How I Fixed It in Vicem v1.2)</title>
      <dc:creator>Im Woojin</dc:creator>
      <pubDate>Sat, 07 Nov 2026 10:37:54 +0000</pubDate>
      <link>https://dev.to/rakkunn/what-git-diff-misses-when-you-switch-coding-agents-and-how-i-fixed-it-in-vicem-v12-4ge7</link>
      <guid>https://dev.to/rakkunn/what-git-diff-misses-when-you-switch-coding-agents-and-how-i-fixed-it-in-vicem-v12-4ge7</guid>
      <description>&lt;p&gt;Last week, I wrote &lt;strong&gt;&lt;a href="https://dev.to/rakkunn"&gt;How I stopped re-explaining my repo when switching between Claude Code, Codex, and Cursor&lt;/a&gt;&lt;/strong&gt;, where I introduced &lt;strong&gt;&lt;a href="https://github.com/RAKKUNN/vicem" rel="noopener noreferrer"&gt;Vicem&lt;/a&gt;&lt;/strong&gt; — a zero-dependency tool that packs your active session into a single &lt;code&gt;.vicem/BATON.md&lt;/code&gt; checkpoint when you hit Claude Code's 5-hour quota or want a second opinion from Codex.&lt;/p&gt;

&lt;p&gt;In the comments on that post, &lt;strong&gt;Odinaka Robert Nnamani&lt;/strong&gt; (&lt;code&gt;@robertpaschal&lt;/code&gt;) summed up the philosophy better than I did:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Dumping the whole repo history was never the point. One checkpoint that says what is next beats a wall of context."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At the end of that first post, I asked: &lt;strong&gt;"What context do you wish carried over automatically when you bounce between agents?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Over the next week, developers across Dev.to and Reddit (&lt;code&gt;r/ClaudeCode&lt;/code&gt;, &lt;code&gt;r/ChatGPTCoding&lt;/code&gt;, &lt;code&gt;r/mcp&lt;/code&gt;, &lt;code&gt;r/cursor&lt;/code&gt;) stress-tested the baton workflow on real debugging sessions—and exposed &lt;strong&gt;four blind spots&lt;/strong&gt; that a simple &lt;code&gt;git diff&lt;/code&gt; + task summary checkpoint completely misses.&lt;/p&gt;

&lt;p&gt;Here is what broke in practice, and how I engineered &lt;strong&gt;Vicem v1.2.0&lt;/strong&gt; (still &lt;strong&gt;0 npm dependencies&lt;/strong&gt; and &lt;strong&gt;0 network calls&lt;/strong&gt;) to fix all four.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/RAKKUNN" rel="noopener noreferrer"&gt;
        RAKKUNN
      &lt;/a&gt; / &lt;a href="https://github.com/RAKKUNN/vicem" rel="noopener noreferrer"&gt;
        vicem
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Zero-dependency AI agent context baton &amp;amp; diet suite. Hand off sessions between Claude Code, Codex, Gemini, and Cursor with 80% fewer tokens.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;
  
    
    
    &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRAKKUNN%2Fvicem%2FHEAD%2F.%2Flogo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRAKKUNN%2Fvicem%2FHEAD%2F.%2Flogo.png" width="88" height="88" alt="Vicem Logo"&gt;&lt;/a&gt;
  
&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Vicem — Diet the Context, Pass the Baton&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;
  &lt;a href="https://hol.org/guard/extensions/mcp.vicem" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/ecd2790f6408af5135535d6d83dc34ef48aae34714410853fb01f9ec1bf2a306/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f484f4c5f47756172642532307c253230566963656d5f436f6e746578745f4261746f6e5f4d43502d3245354141433f6c6f676f3d736869656c64266c6f676f436f6c6f723d7768697465" alt="Reviewed by HOL Guard"&gt;&lt;/a&gt;
  &lt;a href="https://glama.ai/mcp/servers/RAKKUNN/vicem" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/1570a5014cab1bf838a9a4f7ffee579d98559f2a28190fb04a51c24c8f946e00/68747470733a2f2f676c616d612e61692f6d63702f736572766572732f52414b4b554e4e2f766963656d2f6261646765732f73636f72652e737667" alt="Vicem MCP server rated A on Glama"&gt;&lt;/a&gt;
  &lt;a href="https://mcp.so/servers/vicem" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/91042d33181b620fedc2a93f3b7253f4e042e7a854b978d1c2e32a0f9efcb536/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d43502e736f2d4c69737465642d3046313732413f6c6f676f3d6d6f64656c636f6e7465787470726f746f636f6c266c6f676f436f6c6f723d7768697465" alt="Listed on MCP.so"&gt;&lt;/a&gt;
  &lt;a href="https://mcpservers.org/servers/rakkunn/vicem" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8c255a544176baa4ad9378dcb62a855425504d60dbba52a75fc261c4ad869b6e/68747470733a2f2f6d6370736572766572732e6f72672f62616467652e737667" alt="Listed on mcpservers.org"&gt;&lt;/a&gt;
  &lt;a href="https://www.npmjs.com/package/vicem-cli" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/5901be293c44e37003228f3821a14744414a8c85b302fa1bcd97edf8b6adaab1/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f766963656d2d636c693f636f6c6f723d434233383337266c6162656c3d6e706d25323028766963656d2d636c6929" alt="npm vicem-cli"&gt;&lt;/a&gt;
  &lt;a href="https://github.com/RAKKUNN/vicem/releases/tag/v1.2.0" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/0f43dcb37b4955e7bbdae7ec63cb19548d00e74223fd8d04b01cddb1179e0679/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72656c656173652d76312e322e302d313042393831" alt="Release v1.2.0"&gt;&lt;/a&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/24223c7188271a3079e94e398690e92305251465fa6f322335e55c0dabeb7e5b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e64656e636965732d302d334238324636"&gt;&lt;img src="https://camo.githubusercontent.com/24223c7188271a3079e94e398690e92305251465fa6f322335e55c0dabeb7e5b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e64656e636965732d302d334238324636" alt="Zero Dependencies"&gt;&lt;/a&gt;
  &lt;a href="https://github.com/RAKKUNN/vicem/./LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/b56aac1a190f299c8d830599522477df3718f8124eea52438d59b9f98e388a04/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d463539453042" alt="MIT License"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Hit Claude Code's 5-hour quota mid-feature? Or watching Cursor / Codex slow to a crawl after 150k tokens of context rot?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Vicem&lt;/strong&gt; compacts your active coding session by &lt;strong&gt;80–99%&lt;/strong&gt; (via deterministic AST code skeletonization + lossless MCP on-demand rehydration) and hands off a clean &lt;code&gt;.vicem/BATON.md&lt;/code&gt; across &lt;strong&gt;Claude Code, Cursor, Codex CLI, Gemini CLI, Windsurf, Antigravity IDE, and Web AI&lt;/strong&gt; in 3 seconds — with &lt;strong&gt;&lt;code&gt;0&lt;/code&gt; npm dependencies&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;0&lt;/code&gt; network calls&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;⭐ &lt;strong&gt;Tip:&lt;/strong&gt; Click &lt;strong&gt;Star&lt;/strong&gt; (top-right) to bookmark this repo for the next time your coding agent hits a 5-hour quota limit or context rot.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;
  &lt;a href="https://rakkunn.github.io/vicem/promo.mp4" rel="nofollow noopener noreferrer"&gt;
    &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRAKKUNN%2Fvicem%2FHEAD%2F.%2Fpromo.gif" width="100%" alt="Vicem 15s Relay Promo — Diet the Context, Pass the Baton (Click for 1080p60 with sound)"&gt;
  &lt;/a&gt;
  &lt;br&gt;
  🎬 &lt;strong&gt;15s Relay Overview&lt;/strong&gt; — &lt;a href="https://rakkunn.github.io/vicem/promo.mp4" rel="nofollow noopener noreferrer"&gt;Watch in 1080p60 with sound (MP4)&lt;/a&gt; · &lt;a href="https://rakkunn.github.io/vicem/links.html" rel="nofollow noopener noreferrer"&gt;All Links &amp;amp; Quick Copy&lt;/a&gt;
&lt;/p&gt;




&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;⚡ 10-Second Quick Start (&lt;code&gt;npx&lt;/code&gt; — Zero Install)&lt;/h2&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;1. Run the Local Handoff GUI or Pass a Baton Immediately&lt;/h3&gt;
&lt;/div&gt;

&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; Launch the local Handoff GUI (3-step guided handoff,&lt;/span&gt;&lt;/pre&gt;…
&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/RAKKUNN/vicem" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;






&lt;h2&gt;
  
  
  Blind Spot #1: &lt;code&gt;git diff&lt;/code&gt; Only Shows Surviving Code (So the Next Agent Repeats Your Dead Ends)
&lt;/h2&gt;

&lt;p&gt;The #1 complaint from developers switching agents mid-bugfix was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"I spent 30 minutes in Claude Code proving that a regex patch in &lt;code&gt;middleware.ts&lt;/code&gt; breaks edge-case cookies, so I reverted it. Then I hit my quota, switched to Codex, and Codex immediately wrote the exact same broken regex."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Why does this happen?&lt;br&gt;
Because &lt;strong&gt;&lt;code&gt;git diff&lt;/code&gt; has survivorship bias.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you try an approach, run &lt;code&gt;npm test&lt;/code&gt;, watch it fail (&lt;code&gt;exit code 1&lt;/code&gt;), and &lt;code&gt;git checkout&lt;/code&gt; or undo the edit, your working tree is clean again. When the next agent arrives and inspects &lt;code&gt;git status&lt;/code&gt; and &lt;code&gt;git diff&lt;/code&gt;, &lt;strong&gt;every trace of your 30-minute failed experiment has vanished.&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  The Fix in v1.2.0: Causal Extraction of &lt;code&gt;Failed Attempts &amp;amp; Guardrails&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;While &lt;code&gt;git diff&lt;/code&gt; forgets reverted experiments, your local agent transcript (&lt;code&gt;~/.claude/projects/*.jsonl&lt;/code&gt;, &lt;code&gt;~/.codex/sessions/*.jsonl&lt;/code&gt;, Cursor's SQLite state, Gemini CLI logs) still has the full crime scene.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;Vicem v1.2.0&lt;/strong&gt;, I built a deterministic causal state machine inside &lt;code&gt;DeterministicTaskExtractor&lt;/code&gt; that scans the local transcript for &lt;strong&gt;&lt;code&gt;Edit/Write → Non-Zero Exit Command → Re-edit/Revert&lt;/code&gt;&lt;/strong&gt; chains:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Track &lt;code&gt;PendingEdit(file)&lt;/code&gt;:&lt;/strong&gt; Record when the agent modifies a file via &lt;code&gt;Edit&lt;/code&gt;, &lt;code&gt;Write&lt;/code&gt;, &lt;code&gt;MultiEdit&lt;/code&gt;, or &lt;code&gt;apply_patch&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bind &lt;code&gt;CommandFailure(cmd, exitCode)&lt;/code&gt;:&lt;/strong&gt; If a subsequent test/build command exits non-zero or emits a stack trace, link that failure to the pending file edit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Classify Outcome:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;If the agent subsequently re-edits or reverts that file, record it as &lt;strong&gt;&lt;code&gt;[88% | REVERTED/AVOIDED]&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;If the session ends with the failure still active, record it as &lt;strong&gt;&lt;code&gt;[95% | UNRESOLVED]&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;If the user explicitly stated a negative rule (&lt;em&gt;"never touch &lt;code&gt;legacy-auth.js&lt;/code&gt;"&lt;/em&gt;, &lt;em&gt;"do not add dependencies"&lt;/em&gt;), pin it at &lt;strong&gt;&lt;code&gt;[100% | CONSTRAINT]&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, &lt;code&gt;.vicem/BATON.md&lt;/code&gt; includes a dedicated minefield map right above the code diff:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;### Failed Attempts &amp;amp; Guardrails (Do Not Retry)&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; [100% | CONSTRAINT] Never add external npm dependencies or network calls; keep vicem.mjs &amp;lt;= 240 KiB.
&lt;span class="p"&gt;-&lt;/span&gt; [95% | UNRESOLVED] &lt;span class="sb"&gt;`node --test test/phase8.test.mjs`&lt;/span&gt; -&amp;gt; Artifact size 246,044B exceeded 245,760B limit.
&lt;span class="p"&gt;-&lt;/span&gt; [88% | REVERTED/AVOIDED] Edited &lt;span class="sb"&gt;`src/auth/middleware.ts`&lt;/span&gt; -&amp;gt; &lt;span class="sb"&gt;`npm test`&lt;/span&gt; failed (exit 1: cookie race) -&amp;gt; had to revert &lt;span class="sb"&gt;`src/auth/middleware.ts`&lt;/span&gt;.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The incoming agent knows what &lt;em&gt;not&lt;/em&gt; to try before it writes a single line of code.&lt;/p&gt;


&lt;h2&gt;
  
  
  Blind Spot #2: How Do You Score What Deserves to Stay in the Checkpoint?
&lt;/h2&gt;

&lt;p&gt;If a checkpoint is supposed to beat a wall of context, it needs a strict token budget.&lt;br&gt;
But how do you rank a 1-line architectural constraint from 40 minutes ago against a 200-line test log from 10 seconds ago?&lt;/p&gt;

&lt;p&gt;If you rely on naive LLM &lt;code&gt;/compact&lt;/code&gt; summarization, recent research shows a brutal failure mode called &lt;strong&gt;The Compaction Cliff&lt;/strong&gt; (&lt;a href="https://arxiv.org/abs/2608.22752" rel="noopener noreferrer"&gt;CIKM 2026, arXiv:2608.22752&lt;/a&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After &lt;strong&gt;1 round&lt;/strong&gt; of &lt;code&gt;/compact&lt;/code&gt;, only &lt;strong&gt;53% of explicit safety rules&lt;/strong&gt; survive.&lt;/li&gt;
&lt;li&gt;After &lt;strong&gt;5 rounds&lt;/strong&gt;, &lt;strong&gt;90% of rules are wiped out&lt;/strong&gt; because uniform summarization compresses rules and episodic logs at the same rate.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  The Fix in v1.2.0: A &lt;code&gt;0–100%&lt;/code&gt; Context Salience Percentile Engine
&lt;/h3&gt;

&lt;p&gt;Instead of uniform compression, &lt;strong&gt;Vicem v1.2.0&lt;/strong&gt; introduces &lt;code&gt;ContextSalienceEngine&lt;/code&gt;. Every candidate piece of context is scored on a normalized &lt;code&gt;0.00–1.00&lt;/code&gt; scale and rendered as a &lt;strong&gt;&lt;code&gt;0%–100%&lt;/code&gt; percentile&lt;/strong&gt; based on &lt;strong&gt;Value-per-Token Density&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                  W_category(i)  ×  Validity(i)  ×  exp(-λ · Δt_i)
Density(i)  =  ------------------------------------------------------
                            log2( Tokens(i) + 2 )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// From ContextSalienceEngine in vicem.mjs&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ContextSalienceEngine&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="nf"&gt;toPercentile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;score01&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;clamped&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;score01&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;clamped&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="nf"&gt;computeDensityScore&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;baseWeight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;validity&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;recencyDecay&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;tokenCost&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;32&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;raw&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;baseWeight&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;validity&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;recencyDecay&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;tokenCost&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.05&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;raw&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;2.2&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toFixed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;))));&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hard User Constraints (&lt;code&gt;100%&lt;/code&gt;):&lt;/strong&gt; Bypass temporal decay (&lt;code&gt;exp(-λ·Δt) = 1.0&lt;/code&gt;). A short 15-token constraint has huge value-per-token density and stays pinned at &lt;code&gt;100%&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unresolved Failures (&lt;code&gt;95%&lt;/code&gt;) &amp;amp; Reverted Attempts (&lt;code&gt;88%&lt;/code&gt;):&lt;/strong&gt; Preserved in the baton header.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modified Functions &amp;amp; Stack-Trace Targets (&lt;code&gt;75%–94%&lt;/code&gt;):&lt;/strong&gt; Prioritized in the architectural context.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Untouched Helper Functions (&lt;code&gt;5%–45%&lt;/code&gt;):&lt;/strong&gt; Folded into 1-line AST signatures (&lt;code&gt;{ /* ... */ }&lt;/code&gt;) and indexed in &lt;code&gt;.vicem/ledger.json&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Blind Spot #3: Rehydrating a Single Function Without Its Call Graph (or After Disk Edits)
&lt;/h2&gt;

&lt;p&gt;In v1.1, Vicem introduced AST Code Skeletonization: collapsing unchanged function bodies into &lt;code&gt;/* ... */&lt;/code&gt; while storing the original code in &lt;code&gt;.vicem/ledger.json&lt;/code&gt; for on-demand MCP restoration.&lt;/p&gt;

&lt;p&gt;Two edge cases immediately came up from MCP users:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;em&gt;"If the agent rehydrates &lt;code&gt;parseCFamily()&lt;/code&gt;, it immediately realizes it also needs &lt;code&gt;classifyCBlockHeader()&lt;/code&gt; and &lt;code&gt;findBalancedBraces()&lt;/code&gt;, costing 3 separate MCP tool round-trips."&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"What if I manually edited the file in Cursor 2 minutes after generating the baton? Won't the ledger serve a stale snapshot?"&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  The Fix in v1.2.0: 1-Hop Call-Graph Indexing + Live Disk AST Rehydration
&lt;/h3&gt;

&lt;p&gt;First, &lt;code&gt;CodeSkeletonizer.annotateSymbolGraphAndSalience&lt;/code&gt; now builds a &lt;strong&gt;1-hop intra-file call graph (&lt;code&gt;calls&lt;/code&gt; and &lt;code&gt;called-by&lt;/code&gt;)&lt;/strong&gt; for every skeletonized function and prints it directly in the baton's Rehydration Index:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## 6. Diet Ledger &amp;amp; Rehydration Index&lt;/span&gt;
If you need the full implementation of any skeletonized symbol (&lt;span class="sb"&gt;`/* ... */`&lt;/span&gt; or &lt;span class="sb"&gt;`pass`&lt;/span&gt;), call MCP tool &lt;span class="sb"&gt;`vicem_rehydrate(file_path, symbol_name)`&lt;/span&gt;:
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`vicem.mjs`&lt;/span&gt; :: &lt;span class="sb"&gt;`classifyCBlockHeader`&lt;/span&gt; (lines 1146-1186) [33% | calls: stripNestedParens | called-by: parseCFamily, findUniqueSymbolSpanInFile]
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`vicem.mjs`&lt;/span&gt; :: &lt;span class="sb"&gt;`parseCFamily`&lt;/span&gt; (lines 1204-1277) [31% | calls: findBalancedBraces, classifyCBlockHeader, findSignatureStartIdx | called-by: skeletonize]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Second, the MCP tool &lt;code&gt;vicem_rehydrate&lt;/code&gt; now supports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;include_callees: true&lt;/code&gt;&lt;/strong&gt; (or comma-separated symbol batches) to restore a function &lt;em&gt;and&lt;/em&gt; its 1-hop intra-file callees in a single MCP call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Disk Drift Detection:&lt;/strong&gt; When &lt;code&gt;vicem_rehydrate&lt;/code&gt; runs, it checks if the file on disk has changed since the baton snapshot. If it has, Vicem runs a live AST pass on the current file on disk (for both C-family and Python files) and returns both the snapshot and the updated implementation:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// --- [LIVE DISK IMPLEMENTATION (Updated Since Baton Snapshot)] ---&lt;/span&gt;
&lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="nf"&gt;classifyCBlockHeader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;headerText&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Freshly extracted from current disk state&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Blind Spot #4: MCP Resources &amp;amp; Security Verification
&lt;/h2&gt;

&lt;p&gt;In v1.1, agents had to call a tool to read the baton. In &lt;strong&gt;v1.2.0&lt;/strong&gt;, Vicem's stdio MCP server (&lt;code&gt;npx -y vicem-cli mcp&lt;/code&gt;) also exposes &lt;strong&gt;native MCP Resources&lt;/strong&gt; (&lt;code&gt;resources/list&lt;/code&gt; and &lt;code&gt;resources/read&lt;/code&gt;) with automatic &lt;code&gt;SecretRedactor&lt;/code&gt; scrubbing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;vicem://baton/current&lt;/code&gt; — Live &lt;code&gt;.vicem/BATON.md&lt;/code&gt; handoff state&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;vicem://ledger/index&lt;/code&gt; — Compact symbol index with salience percentiles and 1-hop call edges&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;vicem://salience/report&lt;/code&gt; — Ranked salience breakdown of the current repository state&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And because security-conscious teams rightly ask &lt;em&gt;"What does this MCP server touch?"&lt;/em&gt;, Vicem v1.2.0 has now been independently reviewed and listed across:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🛡️ &lt;strong&gt;&lt;a href="https://hol.org/guard/extensions/mcp.vicem" rel="noopener noreferrer"&gt;HOL Guard Extension Catalog (&lt;code&gt;mcp.vicem&lt;/code&gt;)&lt;/a&gt;&lt;/strong&gt; — Officially reviewed permission surface&lt;/li&gt;
&lt;li&gt;🅰️ &lt;strong&gt;&lt;a href="https://glama.ai/mcp/servers/RAKKUNN/vicem" rel="noopener noreferrer"&gt;Glama MCP Directory&lt;/a&gt;&lt;/strong&gt; — &lt;strong&gt;Grade A&lt;/strong&gt; across Security, License, and Quality&lt;/li&gt;
&lt;li&gt;🌐 &lt;strong&gt;&lt;a href="https://mcp.so/servers/vicem" rel="noopener noreferrer"&gt;MCP.so&lt;/a&gt;&lt;/strong&gt; &amp;amp; &lt;strong&gt;&lt;a href="https://mcpservers.org/servers/rakkunn/vicem" rel="noopener noreferrer"&gt;mcpservers.org&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Real Dogfooding Numbers: Packing &lt;code&gt;v1.2.0&lt;/code&gt; Itself
&lt;/h2&gt;

&lt;p&gt;We dogfood Vicem on its own codebase (&lt;code&gt;AGENTS.md&lt;/code&gt; in the repo root is an actual Vicem baton). Here is the exact receipt from handing off the &lt;code&gt;v1.2.0&lt;/code&gt; branch from Claude Code to Antigravity IDE:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Raw Session State&lt;/th&gt;
&lt;th&gt;
&lt;code&gt;.vicem/BATON.md&lt;/code&gt; (v1.2.0)&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Context Size&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;68,387 tokens&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;3,430 tokens&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;-95.0%&lt;/code&gt; (-64,957 tokens)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hard Constraints Retained&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;4 / 4&lt;/td&gt;
&lt;td&gt;**4 / 4 (`[100%&lt;/td&gt;
&lt;td&gt;CONSTRAINT]`)**&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Indexed Symbols (1-Hop Graph)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;112 functions&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;112 in &lt;code&gt;.vicem/ledger.json&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Lossless on-demand restore&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Baton Build Time&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;68ms&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Pure local Node.js&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;npm Dependencies / Network&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;0&lt;/code&gt; / &lt;code&gt;0&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;100% offline execution&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frwqyvzvirh0jxvxitcwm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frwqyvzvirh0jxvxitcwm.png" alt="Vicem Handoff &amp;amp; Diet Studio GUI" width="799" height="662"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Try v1.2.0 in 10 Seconds
&lt;/h2&gt;

&lt;p&gt;We also shortened the CLI commands in &lt;code&gt;v1.2.0&lt;/code&gt; via the &lt;code&gt;vicem-cli&lt;/code&gt; package (Node.js &amp;gt;= 22.5.0):&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Open the local 3-step Handoff &amp;amp; Diet Studio GUI (127.0.0.1 only)&lt;/span&gt;
npx &lt;span class="nt"&gt;-y&lt;/span&gt; vicem-cli gui

&lt;span class="c"&gt;# 2. Or hand off your active session directly to Codex, Claude Code, or Cursor&lt;/span&gt;
npx &lt;span class="nt"&gt;-y&lt;/span&gt; vicem-cli codex
npx &lt;span class="nt"&gt;-y&lt;/span&gt; vicem-cli claude
npx &lt;span class="nt"&gt;-y&lt;/span&gt; vicem-cli cursor

&lt;span class="c"&gt;# 3. Or register as a local stdio MCP server&lt;/span&gt;
claude mcp add vicem &lt;span class="nt"&gt;--&lt;/span&gt; npx &lt;span class="nt"&gt;-y&lt;/span&gt; vicem-cli mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository (MIT):&lt;/strong&gt; &lt;a href="https://github.com/RAKKUNN/vicem" rel="noopener noreferrer"&gt;https://github.com/RAKKUNN/vicem&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-Install Browser Sandbox:&lt;/strong&gt; &lt;a href="https://rakkunn.github.io/vicem/" rel="noopener noreferrer"&gt;https://rakkunn.github.io/vicem/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/RAKKUNN" rel="noopener noreferrer"&gt;
        RAKKUNN
      &lt;/a&gt; / &lt;a href="https://github.com/RAKKUNN/vicem" rel="noopener noreferrer"&gt;
        vicem
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Zero-dependency AI agent context baton &amp;amp; diet suite. Hand off sessions between Claude Code, Codex, Gemini, and Cursor with 80% fewer tokens.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;
  
    
    
    &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRAKKUNN%2Fvicem%2FHEAD%2F.%2Flogo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRAKKUNN%2Fvicem%2FHEAD%2F.%2Flogo.png" width="88" height="88" alt="Vicem Logo"&gt;&lt;/a&gt;
  
&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Vicem — Diet the Context, Pass the Baton&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;
  &lt;a href="https://hol.org/guard/extensions/mcp.vicem" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/ecd2790f6408af5135535d6d83dc34ef48aae34714410853fb01f9ec1bf2a306/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f484f4c5f47756172642532307c253230566963656d5f436f6e746578745f4261746f6e5f4d43502d3245354141433f6c6f676f3d736869656c64266c6f676f436f6c6f723d7768697465" alt="Reviewed by HOL Guard"&gt;&lt;/a&gt;
  &lt;a href="https://glama.ai/mcp/servers/RAKKUNN/vicem" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/1570a5014cab1bf838a9a4f7ffee579d98559f2a28190fb04a51c24c8f946e00/68747470733a2f2f676c616d612e61692f6d63702f736572766572732f52414b4b554e4e2f766963656d2f6261646765732f73636f72652e737667" alt="Vicem MCP server rated A on Glama"&gt;&lt;/a&gt;
  &lt;a href="https://mcp.so/servers/vicem" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/91042d33181b620fedc2a93f3b7253f4e042e7a854b978d1c2e32a0f9efcb536/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d43502e736f2d4c69737465642d3046313732413f6c6f676f3d6d6f64656c636f6e7465787470726f746f636f6c266c6f676f436f6c6f723d7768697465" alt="Listed on MCP.so"&gt;&lt;/a&gt;
  &lt;a href="https://mcpservers.org/servers/rakkunn/vicem" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8c255a544176baa4ad9378dcb62a855425504d60dbba52a75fc261c4ad869b6e/68747470733a2f2f6d6370736572766572732e6f72672f62616467652e737667" alt="Listed on mcpservers.org"&gt;&lt;/a&gt;
  &lt;a href="https://www.npmjs.com/package/vicem-cli" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/5901be293c44e37003228f3821a14744414a8c85b302fa1bcd97edf8b6adaab1/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f766963656d2d636c693f636f6c6f723d434233383337266c6162656c3d6e706d25323028766963656d2d636c6929" alt="npm vicem-cli"&gt;&lt;/a&gt;
  &lt;a href="https://github.com/RAKKUNN/vicem/releases/tag/v1.2.0" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/0f43dcb37b4955e7bbdae7ec63cb19548d00e74223fd8d04b01cddb1179e0679/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72656c656173652d76312e322e302d313042393831" alt="Release v1.2.0"&gt;&lt;/a&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/24223c7188271a3079e94e398690e92305251465fa6f322335e55c0dabeb7e5b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e64656e636965732d302d334238324636"&gt;&lt;img src="https://camo.githubusercontent.com/24223c7188271a3079e94e398690e92305251465fa6f322335e55c0dabeb7e5b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e64656e636965732d302d334238324636" alt="Zero Dependencies"&gt;&lt;/a&gt;
  &lt;a href="https://github.com/RAKKUNN/vicem/./LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/b56aac1a190f299c8d830599522477df3718f8124eea52438d59b9f98e388a04/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d463539453042" alt="MIT License"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Hit Claude Code's 5-hour quota mid-feature? Or watching Cursor / Codex slow to a crawl after 150k tokens of context rot?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Vicem&lt;/strong&gt; compacts your active coding session by &lt;strong&gt;80–99%&lt;/strong&gt; (via deterministic AST code skeletonization + lossless MCP on-demand rehydration) and hands off a clean &lt;code&gt;.vicem/BATON.md&lt;/code&gt; across &lt;strong&gt;Claude Code, Cursor, Codex CLI, Gemini CLI, Windsurf, Antigravity IDE, and Web AI&lt;/strong&gt; in 3 seconds — with &lt;strong&gt;&lt;code&gt;0&lt;/code&gt; npm dependencies&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;0&lt;/code&gt; network calls&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;⭐ &lt;strong&gt;Tip:&lt;/strong&gt; Click &lt;strong&gt;Star&lt;/strong&gt; (top-right) to bookmark this repo for the next time your coding agent hits a 5-hour quota limit or context rot.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;
  &lt;a href="https://rakkunn.github.io/vicem/promo.mp4" rel="nofollow noopener noreferrer"&gt;
    &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRAKKUNN%2Fvicem%2FHEAD%2F.%2Fpromo.gif" width="100%" alt="Vicem 15s Relay Promo — Diet the Context, Pass the Baton (Click for 1080p60 with sound)"&gt;
  &lt;/a&gt;
  &lt;br&gt;
  🎬 &lt;strong&gt;15s Relay Overview&lt;/strong&gt; — &lt;a href="https://rakkunn.github.io/vicem/promo.mp4" rel="nofollow noopener noreferrer"&gt;Watch in 1080p60 with sound (MP4)&lt;/a&gt; · &lt;a href="https://rakkunn.github.io/vicem/links.html" rel="nofollow noopener noreferrer"&gt;All Links &amp;amp; Quick Copy&lt;/a&gt;
&lt;/p&gt;




&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;⚡ 10-Second Quick Start (&lt;code&gt;npx&lt;/code&gt; — Zero Install)&lt;/h2&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;1. Run the Local Handoff GUI or Pass a Baton Immediately&lt;/h3&gt;
&lt;/div&gt;

&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; Launch the local Handoff GUI (3-step guided handoff,&lt;/span&gt;&lt;/pre&gt;…
&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/RAKKUNN/vicem" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Huge thanks to everyone who commented on the first post and reported edge cases. If you bounce between Claude Code, Codex, Cursor, or Gemini CLI, &lt;strong&gt;drop a ⭐ Star on &lt;a href="https://github.com/RAKKUNN/vicem" rel="noopener noreferrer"&gt;RAKKUNN/vicem&lt;/a&gt;&lt;/strong&gt; so you have it ready the next time an agent hits a 5-hour quota wall—and let me know in the comments what else your ideal handoff checkpoint would capture!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>javascript</category>
      <category>showdev</category>
    </item>
    <item>
      <title>How I stopped re-explaining my repo when switching between Claude Code, Codex, and Cursor</title>
      <dc:creator>Im Woojin</dc:creator>
      <pubDate>Fri, 30 Oct 2026 13:35:08 +0000</pubDate>
      <link>https://dev.to/rakkunn/how-i-stopped-re-explaining-my-repo-when-switching-between-claude-code-codex-and-cursor-5cem</link>
      <guid>https://dev.to/rakkunn/how-i-stopped-re-explaining-my-repo-when-switching-between-claude-code-codex-and-cursor-5cem</guid>
      <description>&lt;p&gt;If you use multiple AI coding agents daily—say, &lt;strong&gt;Claude Code&lt;/strong&gt; for deep multi-file refactors, &lt;strong&gt;OpenAI Codex&lt;/strong&gt; for tough algorithmic bugs, and &lt;strong&gt;Cursor&lt;/strong&gt; or &lt;strong&gt;Gemini CLI&lt;/strong&gt; for interactive edits—you have probably hit the same wall I kept hitting:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You are 45 minutes into a complex refactor in Claude Code, and you hit the &lt;strong&gt;5-hour usage quota&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Or your current agent gets stuck in a loop trying to fix a failing test, and you want a second opinion from Codex.&lt;/li&gt;
&lt;li&gt;You open the next agent in the same repository... and it has &lt;strong&gt;zero idea&lt;/strong&gt; what you were doing, what approaches already failed, or what step comes next.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You end up spending 10 minutes writing a long prompt: &lt;em&gt;"Okay, look at &lt;code&gt;git diff&lt;/code&gt;, I was trying to fix the auth middleware, don't touch file X, run test Y next..."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I got tired of manually playing courier between my own local coding agents. So I built &lt;strong&gt;Vicem&lt;/strong&gt;—a zero-dependency CLI, local web GUI, and MCP server that extracts your active coding context into a deterministic &lt;strong&gt;Context Baton&lt;/strong&gt; (&lt;code&gt;.vicem/BATON.md&lt;/code&gt;) and mounts it cleanly for the next agent.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/RAKKUNN" rel="noopener noreferrer"&gt;
        RAKKUNN
      &lt;/a&gt; / &lt;a href="https://github.com/RAKKUNN/vicem" rel="noopener noreferrer"&gt;
        vicem
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Zero-dependency AI agent context baton &amp;amp; diet suite. Hand off sessions between Claude Code, Codex, Gemini, and Cursor with 80% fewer tokens.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;
  
    
    
    &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRAKKUNN%2Fvicem%2FHEAD%2F.%2Flogo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRAKKUNN%2Fvicem%2FHEAD%2F.%2Flogo.png" width="88" height="88" alt="Vicem Logo"&gt;&lt;/a&gt;
  
&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Vicem — Diet the Context, Pass the Baton&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;
  &lt;a href="https://glama.ai/mcp/servers/RAKKUNN/vicem" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/1570a5014cab1bf838a9a4f7ffee579d98559f2a28190fb04a51c24c8f946e00/68747470733a2f2f676c616d612e61692f6d63702f736572766572732f52414b4b554e4e2f766963656d2f6261646765732f73636f72652e737667" alt="Vicem MCP server rated A on Glama"&gt;&lt;/a&gt;
  &lt;a href="https://mcpservers.org/servers/rakkunn/vicem" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8c255a544176baa4ad9378dcb62a855425504d60dbba52a75fc261c4ad869b6e/68747470733a2f2f6d6370736572766572732e6f72672f62616467652e737667" alt="Listed on mcpservers.org"&gt;&lt;/a&gt;
  &lt;a href="https://www.npmjs.com/package/vicem-cli" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/5901be293c44e37003228f3821a14744414a8c85b302fa1bcd97edf8b6adaab1/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f766963656d2d636c693f636f6c6f723d434233383337266c6162656c3d6e706d25323028766963656d2d636c6929" alt="npm vicem-cli"&gt;&lt;/a&gt;
  &lt;a href="https://github.com/RAKKUNN/vicem/releases/tag/v1.1.5" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/7ae716cb4dfe9125b60f8504328e58f51f07af1384161b70b73e56a2e379c831/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72656c656173652d76312e312e352d313042393831" alt="Release v1.1.5"&gt;&lt;/a&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/24223c7188271a3079e94e398690e92305251465fa6f322335e55c0dabeb7e5b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e64656e636965732d302d334238324636"&gt;&lt;img src="https://camo.githubusercontent.com/24223c7188271a3079e94e398690e92305251465fa6f322335e55c0dabeb7e5b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646570656e64656e636965732d302d334238324636" alt="Zero Dependencies"&gt;&lt;/a&gt;
  &lt;a href="https://github.com/RAKKUNN/vicem/./LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/b56aac1a190f299c8d830599522477df3718f8124eea52438d59b9f98e388a04/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d463539453042" alt="MIT License"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Hit Claude Code's 5-hour quota mid-feature? Or watching Cursor / Codex slow to a crawl after 150k tokens of context rot?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Vicem&lt;/strong&gt; compacts your active coding session by &lt;strong&gt;80–99%&lt;/strong&gt; (via deterministic AST code skeletonization + lossless MCP on-demand rehydration) and hands off a clean &lt;code&gt;.vicem/BATON.md&lt;/code&gt; across &lt;strong&gt;Claude Code, Cursor, Codex CLI, Gemini CLI, Windsurf, Antigravity IDE, and Web AI&lt;/strong&gt; in 3 seconds — with &lt;strong&gt;&lt;code&gt;0&lt;/code&gt; npm dependencies&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;0&lt;/code&gt; network calls&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;⭐ &lt;strong&gt;Tip:&lt;/strong&gt; Click &lt;strong&gt;Star&lt;/strong&gt; (top-right) to bookmark this repo for the next time your coding agent hits a 5-hour quota limit or context rot.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;⚡ 10-Second Quick Start (&lt;code&gt;npx&lt;/code&gt; — Zero Install)&lt;/h2&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;1. Run the Local Handoff GUI or Pass a Baton Immediately&lt;/h3&gt;
&lt;/div&gt;

&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; Launch the local Handoff GUI (3-step guided handoff, preview confirmation &amp;amp; manual recovery)&lt;/span&gt;
npx -y vicem-cli gui
&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; Or pack a compressed baton from your&lt;/span&gt;&lt;/pre&gt;…
&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/RAKKUNN/vicem" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;






&lt;h2&gt;
  
  
  What is a "Context Baton"?
&lt;/h2&gt;

&lt;p&gt;Instead of calling an external LLM API to summarize your session (which costs money, adds latency, and often hallucinates file paths), Vicem harvests deterministic state already sitting on your machine in &lt;strong&gt;~50ms&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Git State&lt;/strong&gt;: Current branch, modified/untracked files, and a token-budgeted diff summary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Agent Session Logs&lt;/strong&gt;: Your recent task goal and progress harvested from local session transcripts (&lt;code&gt;~/.claude&lt;/code&gt;, &lt;code&gt;~/.codex&lt;/code&gt;, &lt;code&gt;~/.cursor&lt;/code&gt;, etc.).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verification &amp;amp; Next Step&lt;/strong&gt;: A concrete &lt;code&gt;Immediate NEXT&lt;/code&gt; instruction so the receiving agent knows what to verify first without repeating finished work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic Secret Redaction&lt;/strong&gt;: Any API keys (&lt;code&gt;sk-...&lt;/code&gt;, &lt;code&gt;ghp_...&lt;/code&gt;, &lt;code&gt;AKIA...&lt;/code&gt;, &lt;code&gt;AIza...&lt;/code&gt;, Slack/Stripe tokens, or high-entropy secrets) are scrubbed locally before a single byte is written to disk or copied to your clipboard.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is what the generated &lt;code&gt;.vicem/BATON.md&lt;/code&gt; looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- VICEM-BATON-START --&amp;gt;&lt;/span&gt;
&lt;span class="gh"&gt;# BATON: Fix failing token refresh race condition in auth middleware&lt;/span&gt;
&lt;span class="gt"&gt;&amp;gt; Source: Claude Code | Target: Codex | Prepared: 2026-10-30 | Reception: unconfirmed&lt;/span&gt;

&lt;span class="gu"&gt;## 1. Goal&lt;/span&gt;
Resolve the concurrent refresh token race condition in &lt;span class="sb"&gt;`src/auth/middleware.ts`&lt;/span&gt; without breaking existing session cookies.

&lt;span class="gu"&gt;## 2. Immediate NEXT&lt;/span&gt;
&lt;span class="p"&gt;1.&lt;/span&gt; Read this handoff and verify the current diff in &lt;span class="sb"&gt;`src/auth/middleware.ts`&lt;/span&gt;.
&lt;span class="p"&gt;2.&lt;/span&gt; Fix the failing test in &lt;span class="sb"&gt;`test/auth-race.test.ts`&lt;/span&gt; and run &lt;span class="sb"&gt;`npm test`&lt;/span&gt;.

&lt;span class="gu"&gt;## 3. Completed and verified&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Isolated the race condition to concurrent calls in &lt;span class="sb"&gt;`refreshSession()`&lt;/span&gt;.
&lt;span class="p"&gt;-&lt;/span&gt; Added reproduction test in &lt;span class="sb"&gt;`test/auth-race.test.ts`&lt;/span&gt;.
&lt;span class="c"&gt;&amp;lt;!-- VICEM-BATON-END --&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Designing for Non-Destructive Safety
&lt;/h2&gt;

&lt;p&gt;The biggest concern developers (myself included) have with tools that touch &lt;code&gt;CLAUDE.md&lt;/code&gt;, &lt;code&gt;AGENTS.md&lt;/code&gt;, or &lt;code&gt;.cursor/rules/&lt;/code&gt; is: &lt;strong&gt;"Will this overwrite my existing project instructions?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To guarantee that never happens, I designed Vicem's &lt;code&gt;RuleMountAdapter&lt;/code&gt; around three strict invariants:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Balanced Marker Mounting&lt;/strong&gt;: Vicem only inserts or updates content inside &lt;code&gt;&amp;lt;!-- VICEM-BATON-START --&amp;gt; ... &amp;lt;!-- VICEM-BATON-END --&amp;gt;&lt;/code&gt; markers. Your custom notes above, below, or even between blocks are preserved byte-for-byte.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Preview Before Delivery&lt;/strong&gt;: Both the CLI (&lt;code&gt;--preview&lt;/code&gt;) and the local web GUI let you inspect and edit the exact &lt;code&gt;.vicem/BATON.md&lt;/code&gt; before anything is mounted or launched.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One-Command &lt;code&gt;--undo&lt;/code&gt;&lt;/strong&gt;: Once the target agent has picked up the task, running &lt;code&gt;npx @rakkunn/vicem@latest --undo&lt;/code&gt; strips the mounted block cleanly and archives the baton in &lt;code&gt;.vicem/history/&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F84w142cbnrhxvlggwchj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F84w142cbnrhxvlggwchj.png" alt="Vicem Light Mode UI" width="799" height="662"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Bonus: Fighting "Context Rot" with AST Skeletons + MCP Rehydration
&lt;/h2&gt;

&lt;p&gt;Sometimes the problem isn't switching agents—it's that your current session is bloated from reading 2,000-line files over and over.&lt;/p&gt;

&lt;p&gt;Vicem includes a deterministic &lt;strong&gt;AST Code Skeletonizer&lt;/strong&gt; (&lt;code&gt;--diet&lt;/code&gt;). It collapses unchanged function bodies into compact placeholders (&lt;code&gt;/* [VICEM_BODY:id] */&lt;/code&gt;) while keeping all imports, types, and function signatures intact—cutting file token weight by &lt;strong&gt;65–75%&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The original function bodies are stored locally in &lt;code&gt;.vicem/ledger.json&lt;/code&gt;. When an agent actually needs to inspect or edit a specific function, it can call Vicem's built-in &lt;strong&gt;MCP server&lt;/strong&gt; (&lt;code&gt;vicem --mcp&lt;/code&gt;) using &lt;code&gt;vicem_expand_symbol&lt;/code&gt; to rehydrate just that symbol on demand.&lt;/p&gt;


&lt;h2&gt;
  
  
  Why Zero Dependencies?
&lt;/h2&gt;

&lt;p&gt;If a developer tool is meant to rescue you when you're in the middle of a broken build or a quota limit, the last thing you want is &lt;code&gt;npx&lt;/code&gt; downloading 180 transitive npm packages or failing on a native C++ binding.&lt;/p&gt;

&lt;p&gt;Vicem is written in pure ES Modules using only Node.js built-ins (&lt;code&gt;node:fs&lt;/code&gt;, &lt;code&gt;node:http&lt;/code&gt;, &lt;code&gt;node:child_process&lt;/code&gt;, &lt;code&gt;node:crypto&lt;/code&gt;).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;dependencies&lt;/code&gt; in &lt;code&gt;package.json&lt;/code&gt;&lt;/strong&gt;: &lt;code&gt;0&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;External network calls / telemetry&lt;/strong&gt;: &lt;code&gt;0&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Startup time&lt;/strong&gt;: Instant&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Try It Out in 10 Seconds
&lt;/h2&gt;

&lt;p&gt;You don't need to install anything globally to test it in a Git repository:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Open the local 3-step Web GUI (binds strictly to 127.0.0.1)&lt;/span&gt;
npx @rakkunn/vicem@latest

&lt;span class="c"&gt;# 2. Or hand off directly from the terminal (e.g., to OpenAI Codex or Claude Code)&lt;/span&gt;
npx @rakkunn/vicem@latest &lt;span class="nt"&gt;--to&lt;/span&gt; codex &lt;span class="nt"&gt;--goal&lt;/span&gt; &lt;span class="s2"&gt;"Fix failing auth middleware tests"&lt;/span&gt;

&lt;span class="c"&gt;# 3. Clean up the mounted rule block once you're done&lt;/span&gt;
npx @rakkunn/vicem@latest &lt;span class="nt"&gt;--undo&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Or if you use the &lt;strong&gt;Agent Skills&lt;/strong&gt; ecosystem across Claude Code, Cursor, and Codex:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add RAKKUNN/vicem &lt;span class="nt"&gt;-g&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Honest Limitations &amp;amp; What I'd Love Feedback On
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Desktop App Auto-Launch across OSes&lt;/strong&gt;: Packing &lt;code&gt;.vicem/BATON.md&lt;/code&gt; and mounting rule files are 100% deterministic and tested in native CI across macOS, Linux, and Windows (Node 22 &amp;amp; 24). Automatically spawning a new terminal tab or focusing a desktop IDE works smoothly on macOS, while on Windows/Linux GUI environments it is best-effort—so Vicem always provides a &lt;strong&gt;Manual Recovery panel&lt;/strong&gt; with one-click copyable commands and prompts whenever auto-launch isn't available.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you bounce between Claude Code, Codex, Cursor, or Web AI chats in your daily workflow, I'd love to hear what context you wish carried over automatically. Feedback, edge cases, and issues are very welcome!&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/RAKKUNN" rel="noopener noreferrer"&gt;
        RAKKUNN
      &lt;/a&gt; / &lt;a href="https://github.com/RAKKUNN/vicem" rel="noopener noreferrer"&gt;
        vicem
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Zero-dependency AI agent context baton &amp;amp; diet suite. Hand off sessions between Claude Code, Codex, Gemini, and Cursor with 80% fewer tokens.
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>ai</category>
      <category>opensource</category>
      <category>javascript</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Jigu — a world map that shows you exactly how much your map projection is lying</title>
      <dc:creator>Im Woojin</dc:creator>
      <pubDate>Wed, 16 Sep 2026 11:41:58 +0000</pubDate>
      <link>https://dev.to/rakkunn/jigu-a-world-map-that-shows-you-exactly-how-much-your-map-projection-is-lying-pc2</link>
      <guid>https://dev.to/rakkunn/jigu-a-world-map-that-shows-you-exactly-how-much-your-map-projection-is-lying-pc2</guid>
      <description>&lt;p&gt;Every world map lies about area. The usual example is Greenland looking roughly the same size as Africa on a Mercator map, when Africa is actually &lt;strong&gt;14 times larger&lt;/strong&gt;. Mercator preserves angles (useful for navigation) at the cost of inflating area as you move away from the equator — and most of us have internalized that inflated version of the world without ever seeing the correction.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://rakkunn.github.io/Jigu/" rel="noopener noreferrer"&gt;&lt;strong&gt;Jigu&lt;/strong&gt;&lt;/a&gt; is a small interactive map built to make that distortion visible, draggable, and measurable, rather than just something you read about in a caption.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;Jigu renders one world map where a glowing &lt;strong&gt;front&lt;/strong&gt; sweeps from both poles toward the equator. Everything the front has already crossed is redrawn in &lt;strong&gt;Equal Earth&lt;/strong&gt; projection; everything ahead of it is still &lt;strong&gt;Mercator&lt;/strong&gt;. Both projections exist on screen at the same time, split by a line that moves — so you can watch the exact moment a country's shape and size change.&lt;/p&gt;

&lt;p&gt;Three ways to interact with it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Drag a country to a different latitude.&lt;/strong&gt; Pull Greenland from 72°N down to the equator on the Mercator side and its displayed area drops from 22,683,547 km² to 2,168,727 km². Let go and it springs back home.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Switch between two visual plates&lt;/strong&gt; — &lt;code&gt;night&lt;/code&gt; (the default chart look) and &lt;code&gt;ink&lt;/code&gt; (same drawing, pulled onto paper: cool stock, dark linework, a burnt amber accent instead of a glow).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drop into a 3D globe.&lt;/strong&gt; On the globe, "area as drawn" always equals "true area" — it's the one view with zero distortion, by definition.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why this isn't just a d3 demo
&lt;/h2&gt;

&lt;p&gt;A few implementation details in &lt;code&gt;src/template.html&lt;/code&gt; are the actual interesting part of this project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The blend weight is a function of latitude, not a single global &lt;code&gt;t&lt;/code&gt;.&lt;/strong&gt; The obvious way to morph between two projections is to interpolate one progress value across the whole map. That puts a shoulder in the silhouette and tears the polar cap off as its own trapezoid. Jigu blends width globally (by true area converted) but height &lt;em&gt;locally&lt;/em&gt;, per latitude, which is what makes the front a genuine traveling boundary instead of a uniform fade.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vertical position is not what gets interpolated — vertical scale is, and then it's integrated.&lt;/strong&gt; Interpolating &lt;code&gt;y&lt;/code&gt; directly introduces a &lt;code&gt;w'(φ)·(eeY − mercY)&lt;/code&gt; term that blows up near the poles: the polar cap stretches ~9x and the map folds through itself if you try to hide it by narrowing the transition band. Instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dy/dφ = (1 − w(φ))·mercY′(φ)  +  w(φ)·eeY′(φ)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both contributions are nonnegative, so the map geometrically cannot fold back on itself. This is evaluated over a 1600-sample table from −90° to +90°.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Distortion is measured per-polygon, not sampled at a point.&lt;/strong&gt; A country isn't a point, and world-atlas represents Antarctica's centroid at the pole itself — where &lt;code&gt;sec²φ&lt;/code&gt; diverges. Point-sampling gives Antarctica a Mercator inflation factor of &lt;code&gt;×2.7e+32&lt;/code&gt; (yes, with exponent notation, because &lt;code&gt;toFixed&lt;/code&gt; gives up past 1e21). Jigu instead measures the actual drawn polygon's planar area against its true spherical area:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;factor = planarArea(projected) / (sphericalArea × scale at the equator)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That gives Antarctica a real measured factor of ×23.7 — still huge, but a number that means something.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rendering is pure linework, on purpose.&lt;/strong&gt; d3's spherical polygon clipping is the dominant cost. Filling all 225 country polygons every frame costs 61ms; rendering coastlines and borders as &lt;code&gt;MultiLineString&lt;/code&gt; costs 6.8ms + 1.4ms combined. So nothing is filled per frame except whichever single country is currently selected — which happens to fit the aesthetic and keeps dragging at 112fps. Country picking itself uses an offscreen color-index buffer that's rebuilt only when the map settles, not every frame.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;d3&lt;/strong&gt; for projections and geometry&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;three.js&lt;/strong&gt; for the globe view (an unlit &lt;code&gt;MeshBasicMaterial&lt;/code&gt; sphere skinned with the same 2D drawing code rendered plate-carrée into a texture — deliberately unshaded so it reads as a chart, not a rendered planet; disables itself cleanly on WebGL failure)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;anime.js&lt;/strong&gt; for interaction animation&lt;/li&gt;
&lt;li&gt;Ships as a single self-contained &lt;code&gt;index.html&lt;/code&gt; (~1.6MB) with geometry, country data, and brand assets inlined; the browser libraries load externally
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm ci            &lt;span class="c"&gt;# Node.js 22.12+&lt;/span&gt;
npm run build     &lt;span class="c"&gt;# regenerates src/countries.generated.json, writes index.html&lt;/span&gt;
npm run dev       &lt;span class="c"&gt;# http://localhost:8931&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;index.html&lt;/code&gt; is committed as the actual deployed artifact — CI checks that rebuilding it produces zero diff.&lt;/p&gt;

&lt;p&gt;Data sources, for transparency: geometry from &lt;a href="https://github.com/topojson/world-atlas" rel="noopener noreferrer"&gt;world-atlas&lt;/a&gt; (Natural Earth, public domain), country attributes from &lt;a href="https://github.com/mledoze/countries" rel="noopener noreferrer"&gt;world-countries&lt;/a&gt; (ODbL), population from the World Bank (CC BY 4.0).&lt;/p&gt;

&lt;h2&gt;
  
  
  License
&lt;/h2&gt;

&lt;p&gt;Code is &lt;strong&gt;MIT&lt;/strong&gt;. The brand marks under &lt;code&gt;assets/logo/main/&lt;/code&gt; identify the project specifically and aren't covered by that grant. Nine languages are shipped in the UI and not all of them have had native-speaker review yet, so translation corrections are a particularly welcome kind of PR — details in &lt;a href="https://github.com/RAKKUNN/Jigu/blob/main/CONTRIBUTING.md" rel="noopener noreferrer"&gt;CONTRIBUTING.md&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;🔗 &lt;strong&gt;Try it&lt;/strong&gt;: &lt;a href="https://rakkunn.github.io/Jigu/" rel="noopener noreferrer"&gt;https://rakkunn.github.io/Jigu/&lt;/a&gt;&lt;br&gt;
🔗 &lt;strong&gt;Source&lt;/strong&gt;: &lt;a href="https://github.com/RAKKUNN/Jigu" rel="noopener noreferrer"&gt;https://github.com/RAKKUNN/Jigu&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go drag Greenland down to the equator. Watch the number.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
    <item>
      <title>macOS has an alarm. It doesn't ring when your Mac is asleep.</title>
      <dc:creator>Im Woojin</dc:creator>
      <pubDate>Sun, 06 Sep 2026 17:01:08 +0000</pubDate>
      <link>https://dev.to/rakkunn/macos-has-an-alarm-it-doesnt-ring-when-your-mac-is-asleep-36i5</link>
      <guid>https://dev.to/rakkunn/macos-has-an-alarm-it-doesnt-ring-when-your-mac-is-asleep-36i5</guid>
      <description>&lt;p&gt;macOS has had an alarm in the Clock app since Ventura. I found out the hard way that it doesn't ring once the Mac goes to sleep.&lt;/p&gt;

&lt;p&gt;The workaround the internet offers is "turn off automatic sleep." That isn't a workaround. So I built &lt;a href="https://github.com/RAKKUNN/matuta" rel="noopener noreferrer"&gt;Matuta&lt;/a&gt; — free, MIT, macOS 14+.&lt;/p&gt;

&lt;p&gt;This post is about the parts that were actually interesting to build, including one API that would have shipped a bug I never would have caught by reading docs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Waking a sleeping Mac
&lt;/h2&gt;

&lt;p&gt;This part is one call.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;import&lt;/span&gt; &lt;span class="kt"&gt;IOKit&lt;/span&gt;
&lt;span class="kd"&gt;import&lt;/span&gt; &lt;span class="kt"&gt;IOKit&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pwr_mgt&lt;/span&gt;   &lt;span class="c1"&gt;// not just `import IOKit`&lt;/span&gt;

&lt;span class="c1"&gt;// Wake two minutes early. If the alarm is sooner than that, wake at the alarm.&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;wakeDate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addingTimeInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;targetDate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;wakeDate&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nv"&gt;wakeDate&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;
&lt;span class="k"&gt;guard&lt;/span&gt; &lt;span class="n"&gt;targetDate&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;IOPMSchedulePowerEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;targetDate&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kt"&gt;CFDate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;appName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"wake"&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kt"&gt;CFString&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two things cost me time here.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import IOKit&lt;/code&gt; alone does not expose &lt;code&gt;IOPMSchedulePowerEvent&lt;/code&gt;. You need the &lt;code&gt;IOKit.pwr_mgt&lt;/code&gt; submodule. The compiler just tells you the symbol doesn't exist, which sends you looking in the wrong place.&lt;/p&gt;

&lt;p&gt;The two-minute lead is not arbitrary. A Mac that wakes at exactly 07:00:00 is not a Mac that makes sound at 07:00:00 — the audio stack needs a moment. Waking early and holding a power assertion until the alarm fires is the difference between "it rang" and "it rang on time."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This API is blocked in the App Store sandbox.&lt;/strong&gt; That decided distribution for me: Developer ID signing plus Apple notarization, installed by dragging the app into Applications.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;xcrun notarytool store-credentials matuta &lt;span class="nt"&gt;--apple-id&lt;/span&gt; &amp;lt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;--team-id&lt;/span&gt; &amp;lt;team&amp;gt;
codesign &lt;span class="nt"&gt;--options&lt;/span&gt; runtime &lt;span class="nt"&gt;--timestamp&lt;/span&gt; ...
xcrun notarytool submit Matuta.zip &lt;span class="nt"&gt;--keychain-profile&lt;/span&gt; matuta &lt;span class="nt"&gt;--wait&lt;/span&gt;
xcrun stapler staple Matuta.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Skip this and the first thing a user sees is a security warning. Bad first impression for an app whose whole pitch is reliability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ringing turned out to be about half the job
&lt;/h2&gt;

&lt;p&gt;Once wake-from-sleep worked I assumed I was done. I wasn't.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A phone has one speaker. A Mac has opinions.&lt;/strong&gt; Your output might be routed to the earbuds you fell asleep wearing. The system might be muted. The volume might be at 4%. The default device might be a monitor that's powered off.&lt;/p&gt;

&lt;p&gt;Every one of those produces an alarm that "played successfully" and a person who overslept.&lt;/p&gt;

&lt;p&gt;Every alarm app I looked at treats ringing as the whole job. So Matuta works in three layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Before you sleep&lt;/strong&gt; — a status row names anything that would stop the alarm from waking you, with a one-click fix for each. When everything's fine it stays quiet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;At alarm time&lt;/strong&gt; — output is forced back to the built-in speakers, the system is unmuted, volume is raised.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Underneath&lt;/strong&gt; — for any source it can't verify (Spotify, a browser tab), a backup tone plays concurrently. Something always makes noise.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The sound itself is one input field. Paste a Spotify or YouTube link, drop an mp3, point it at an internet radio stream, or type a song name — a parser works out which kind of source you handed it. No provider dropdown.&lt;/p&gt;

&lt;h2&gt;
  
  
  The half hour that changed the app
&lt;/h2&gt;

&lt;p&gt;Here's the part I'd want to read.&lt;/p&gt;

&lt;p&gt;To pick Spotify or Apple Music as a sound, the app needs Automation permission. There's an API to check it: &lt;code&gt;AEDeterminePermissionToAutomateTarget&lt;/code&gt;. My plan was to call it, and show "permission needed, here's the settings pane" when it came back denied.&lt;/p&gt;

&lt;p&gt;Before wiring up the UI I wrote a throwaway probe and ran it against every combination I could think of. The result:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If the target app isn't running, it returns &lt;code&gt;-600&lt;/code&gt; (&lt;code&gt;procNotFound&lt;/code&gt;) — regardless of whether permission is actually granted.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Worse, these two states are indistinguishable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spotify is installed, permission granted, but currently quit&lt;/li&gt;
&lt;li&gt;Spotify was never installed at all&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both are &lt;code&gt;-600&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Think about what shipping that would have meant. Anyone who quits Spotify before bed — which is most people — gets a "no permission" warning &lt;strong&gt;every single night&lt;/strong&gt;, on an app they open specifically to check that nothing is wrong.&lt;/p&gt;

&lt;p&gt;And that's the real damage. Teach someone that your warnings are noise and they will scroll past the one that matters. A reliability app that cries wolf nightly is worse than no reliability app, because it actively trains the habit that defeats it.&lt;/p&gt;

&lt;p&gt;So the rule became: &lt;strong&gt;while the target app is not running, don't assert anything about permission.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="c1"&gt;/// `AEDeterminePermissionToAutomateTarget` returns -600 (procNotFound) when the&lt;/span&gt;
&lt;span class="c1"&gt;/// target app isn't running, regardless of the real permission state. An installed&lt;/span&gt;
&lt;span class="c1"&gt;/// but quit music app and a never-installed Spotify both came back -600. So while&lt;/span&gt;
&lt;span class="c1"&gt;/// the target app is closed, we do not claim to know the permission state.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thirty minutes of measuring. No amount of reading would have produced it — the documentation describes what the function returns when it can answer, not what it returns when it can't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Alarm tones are synthesized, not shipped
&lt;/h2&gt;

&lt;p&gt;All nine built-in tones are generated in code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;wave&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;phase1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
         &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;phase2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;note&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;harmonicDecay&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.4&lt;/span&gt;
         &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;phase3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;note&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;harmonicDecay&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The reasoning is narrow and, I think, correct for this specific app: &lt;strong&gt;a file that doesn't exist can't fail to load.&lt;/strong&gt; No missing resource, no broken bundle, no path that changed between OS versions. If the code runs, sound comes out.&lt;/p&gt;

&lt;p&gt;A pleasant side effect is that the app is tiny.&lt;/p&gt;

&lt;h2&gt;
  
  
  The core doesn't produce sentences
&lt;/h2&gt;

&lt;p&gt;The app ships Korean and English with instant switching, no restart. That fell out of one rule:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;MatutaCore&lt;/code&gt; emits keys. The view resolves them against the current language.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MatutaCore  →  "preflight.muted"
     View   →  "System is muted"  /  "시스템이 음소거입니다"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two things came free.&lt;/p&gt;

&lt;p&gt;Switching languages is just a re-render — nothing to reload, nothing to restart.&lt;/p&gt;

&lt;p&gt;And core tests assert on keys, not prose. I can rewrite "System is muted" to "Your Mac is muted" without touching a single test. If you've ever broken twenty tests by improving one string, you know why that matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Structure
&lt;/h2&gt;

&lt;p&gt;The organizing principle: &lt;strong&gt;decisions in the core, I/O in the app.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MatutaCore/            decisions and calculation (all unit tested)
├── NextOccurrence     when an alarm fires next
├── Scheduler          picks the next alarm, accounts for snooze
├── PlaybackChain      source fallback, concurrent backup tone
├── PreflightEvaluator pre-sleep diagnosis
├── OmniboxParser      input → source type
└── TonePattern        tone synthesis

Matuta/                system I/O and drawing
├── AudioGuard         output device, volume, mute
├── SystemWakeScheduler power event scheduling
└── Views/             SwiftUI screens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Anything that decides something is testable without a Mac in a particular state. Anything that touches CoreAudio or IOKit does no reasoning.&lt;/p&gt;

&lt;p&gt;There's no Xcode project file — plain SwiftPM, with a shell script assembling the &lt;code&gt;.app&lt;/code&gt;. The entire build is reproducible from a terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/RAKKUNN/matuta.git
&lt;span class="nb"&gt;cd &lt;/span&gt;matuta
swift &lt;span class="nb"&gt;test&lt;/span&gt;
./Scripts/bundle.sh
open build/Matuta.app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What I haven't verified
&lt;/h2&gt;

&lt;p&gt;I'm going to be specific here, because it's an alarm clock and someone might rely on it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wake-from-sleep for a normal alarm: verified.&lt;/strong&gt; Real hardware, lid shut, overnight. It rang.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wake-from-sleep after you hit snooze: not verified.&lt;/strong&gt; The code path exists and has unit tests, but I have not measured it overnight. That's in the README too. If you're catching a flight, keep a second alarm.&lt;/p&gt;

&lt;p&gt;The Apple Music source also just tells the Music app to play, so you get whatever is queued there. The backup tone fires either way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two decisions I'd defend
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Spacebar dismisses. Snooze is deliberately mouse-only.&lt;/strong&gt; Easy to turn off, harder to fall back asleep. That asymmetry is the entire design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No dismissal missions&lt;/strong&gt; — no math problems, no photo tasks. Plenty of apps do that. I wanted to solve "the alarm doesn't ring," not "I don't want to get up." Different problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Site: &lt;a href="https://rakkunn.github.io/matuta/" rel="noopener noreferrer"&gt;https://rakkunn.github.io/matuta/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Source: &lt;a href="https://github.com/RAKKUNN/matuta" rel="noopener noreferrer"&gt;https://github.com/RAKKUNN/matuta&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;macOS 14+, free, MIT, no account, no analytics.&lt;/p&gt;

&lt;p&gt;Happy to hear that it's broken, or that I've missed an app that already does all this. And if anyone has actually measured snooze wake-from-sleep, I'd genuinely like to know.&lt;/p&gt;

</description>
      <category>swift</category>
      <category>opensource</category>
      <category>showdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Bypassing WebView Limits Part 2: End-to-End Encrypted Cloud Sync and OS Keychain Migration in Tauri v2</title>
      <dc:creator>Im Woojin</dc:creator>
      <pubDate>Sat, 18 Jul 2026 01:02:58 +0000</pubDate>
      <link>https://dev.to/rakkunn/bypassing-webview-limits-part-2-end-to-end-encrypted-cloud-sync-and-os-keychain-migration-in-tauri-1487</link>
      <guid>https://dev.to/rakkunn/bypassing-webview-limits-part-2-end-to-end-encrypted-cloud-sync-and-os-keychain-migration-in-tauri-1487</guid>
      <description>&lt;p&gt;Hey DEV community! 👋&lt;/p&gt;

&lt;p&gt;A while back, I wrote about building &lt;a href="https://github.com/RAKKUNN/Repo-rter" rel="noopener noreferrer"&gt;Repo-rter&lt;/a&gt;—a local-first desktop client designed to bypass GitHub's 14-day traffic log limit by saving insights directly to the user's native filesystem.&lt;/p&gt;

&lt;p&gt;In our v0.4.1 release, we successfully migrated our primary storage layer from the WebView's volatile &lt;code&gt;localStorage&lt;/code&gt; to a native file-system cache. But as the user base grew, we faced three new engineering challenges:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Multi-device Sync&lt;/strong&gt;: How do we sync local-first files across multiple machines without hosting a centralized database that compromises user privacy?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plaintext Secrets&lt;/strong&gt;: Storing highly sensitive credentials—like GitHub Personal Access Tokens (PATs) and cloud sync passwords—in browser &lt;code&gt;localStorage&lt;/code&gt; is a massive security hazard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tauri v2 Stability&lt;/strong&gt;: Graduating the codebase from release candidates to production-stable Tauri v2.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is a technical deep dive into how we solved these in our latest &lt;strong&gt;v0.4.2 - v0.4.4 releases&lt;/strong&gt; using &lt;strong&gt;WebDAV, AES-256-GCM End-to-End Encryption (E2EE), and OS Native Keychains&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔒 1. Zero-Knowledge Multi-Device Sync: WebDAV + AES-GCM-256 E2EE
&lt;/h2&gt;

&lt;p&gt;To keep Repo-rter strictly local-first and self-sovereign, we chose &lt;strong&gt;WebDAV&lt;/strong&gt; as our cloud storage provider. Users can sync their data using self-hosted Nextcloud instances, Synology NAS, or any standard WebDAV cloud provider.&lt;/p&gt;

&lt;p&gt;However, sync payloads contain entire historical repository logs. Pushing these in plaintext over the wire was unacceptable.&lt;/p&gt;

&lt;h3&gt;
  
  
  The E2EE Encryption Pipeline
&lt;/h3&gt;

&lt;p&gt;Before triggering a WebDAV &lt;code&gt;PUT&lt;/code&gt; request, the frontend encrypts the local cache bundle using the Web Crypto API.&lt;/p&gt;

&lt;p&gt;We derive a 256-bit AES key from a user-provided passphrase using &lt;strong&gt;PBKDF2 with 100,000 iterations&lt;/strong&gt; and SHA-256. The actual encryption uses &lt;strong&gt;AES-256-GCM&lt;/strong&gt; to ensure both confidentiality and authenticity (integrity checking).&lt;/p&gt;

&lt;p&gt;Here is a simplified look at the encryption pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/lib/crypto.ts&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;encryptData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;plaintext&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;passphrase&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;passphrase&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;plaintext&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Plaintext backup (fallback/optional)&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;salt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getRandomValues&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Uint8Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;iv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getRandomValues&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Uint8Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

  &lt;span class="c1"&gt;// Derive key via PBKDF2&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;baseKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;subtle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;importKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;raw&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;TextEncoder&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;passphrase&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PBKDF2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;deriveKey&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;aesKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;subtle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deriveKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;PBKDF2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;salt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;iterations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;100000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;SHA-256&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="nx"&gt;baseKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;AES-GCM&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;256&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;encrypt&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Encrypt&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ciphertext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;subtle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encrypt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;AES-GCM&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;iv&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="nx"&gt;aesKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;TextEncoder&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;plaintext&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Pack salt + iv + ciphertext into a single portable string&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;packPayload&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;salt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;iv&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Uint8Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ciphertext&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Minimizing Network Overhead in Rust
&lt;/h3&gt;

&lt;p&gt;Reading and parsing dozens of individual JSON files on the frontend to create a backup payload would block the UI thread. Instead, we wrote a native Rust command to bundle the cache on the filesystem level:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src-tauri/src/lib.rs&lt;/span&gt;
&lt;span class="nd"&gt;#[tauri::command]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;bundle_traffic_cache&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;app_handle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nn"&gt;tauri&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;AppHandle&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;app_handle&lt;/span&gt;&lt;span class="nf"&gt;.path&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.app_data_dir&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.map_err&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;bundle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;serde_json&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;Map&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nn"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;read_dir&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.map_err&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt;&lt;span class="nf"&gt;.map_err&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;filename&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt;&lt;span class="nf"&gt;.file_name&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.to_string_lossy&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="nf"&gt;.starts_with&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"traffic_"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="nf"&gt;.ends_with&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;".json"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;read_to_string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;entry&lt;/span&gt;&lt;span class="nf"&gt;.path&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="nf"&gt;.map_err&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;json_value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nn"&gt;serde_json&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;serde_json&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;from_str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.map_err&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="n"&gt;bundle&lt;/span&gt;&lt;span class="nf"&gt;.insert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;json_value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nn"&gt;serde_json&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;to_string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;bundle&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.map_err&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This native command bundles all repository logs into a single compact JSON payload, which the frontend encrypts and uploads to WebDAV in one request.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔑 2. Hardware-Grade Security: OS Native Keychain Migration
&lt;/h2&gt;

&lt;p&gt;While our traffic logs were encrypted, the keys to the castle (GitHub PAT, WebDAV password, and the E2EE passphrase) were still stored as plaintext strings in the WebView's &lt;code&gt;localStorage&lt;/code&gt;. This left credentials exposed to potential XSS attacks or physical inspection of WebView files.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;v0.4.4&lt;/strong&gt;, we migrated all credentials to the operating system's native secure store:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;macOS&lt;/strong&gt;: Keychain Services&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Windows&lt;/strong&gt;: Credential Manager&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Linux&lt;/strong&gt;: Secret Service API (via D-Bus)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Direct Keychain Integration via Rust
&lt;/h3&gt;

&lt;p&gt;Instead of using community plugins that lack npm packages or official audits, we directly wrapped the core Rust &lt;code&gt;keyring&lt;/code&gt; crate. &lt;/p&gt;

&lt;p&gt;We implemented three thin Tauri commands in Rust:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src-tauri/src/secrets.rs&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;keyring&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;v1&lt;/span&gt;&lt;span class="p"&gt;::{&lt;/span&gt;&lt;span class="n"&gt;Entry&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="n"&gt;SERVICE&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"com.reporter.app"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nd"&gt;#[tauri::command]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;set_secret&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nn"&gt;Entry&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;SERVICE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;.map_err&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
        &lt;span class="nf"&gt;.set_password&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;.map_err&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nd"&gt;#[tauri::command]&lt;/span&gt;
&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;get_secret&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Entry&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;SERVICE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.map_err&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt;&lt;span class="nf"&gt;.get_password&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;Some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
        &lt;span class="nf"&gt;Err&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;NoEntry&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;None&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nf"&gt;Err&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;Err&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;()),&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since the default features of &lt;code&gt;keyring 4.x&lt;/code&gt; use the &lt;code&gt;zbus&lt;/code&gt; crate for D-Bus communication on Linux, it compiles down to &lt;strong&gt;pure Rust&lt;/strong&gt; without linking to any C dependencies (like &lt;code&gt;libsecret&lt;/code&gt; or &lt;code&gt;openssl&lt;/code&gt;). This kept our CI/CD pipeline clean without requiring apt-get modifications!&lt;/p&gt;

&lt;h3&gt;
  
  
  Avoiding Boot-Time Race Conditions
&lt;/h3&gt;

&lt;p&gt;When the application starts, it immediately fires off background sync checks. If the keychain migration runs asynchronously in the background, there is a race condition where the app tries to read a token before the migration script has finished writing it.&lt;/p&gt;

&lt;p&gt;To solve this, we designed a &lt;strong&gt;fail-safe reading fallback&lt;/strong&gt; and a &lt;strong&gt;strict transaction-like migration&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Read Path Fallback&lt;/strong&gt;:
When reading a secret, if it's missing from the Keychain, the gateway checks &lt;code&gt;localStorage&lt;/code&gt; as a fallback. This guarantees the app functions normally even if migration hasn't run or completed yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify-Before-Delete Migration&lt;/strong&gt;:
On startup, the migration script copies plaintext keys to the native store, reads them back to verify they match exactly, and only then deletes the plaintext version:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/lib/secrets.ts&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;migrateSecretsFromLocalStorage&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;undefined&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nf"&gt;isTauri&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;SECRET_KEYS&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;legacyValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;legacyValue&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;// 1. Write to OS Keychain&lt;/span&gt;
      &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;invoke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;set_secret&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;legacyValue&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

      &lt;span class="c1"&gt;// 2. Read back and verify integrity&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;verified&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;invoke&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;get_secret&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;verified&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;legacyValue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// 3. Only delete plaintext if verified!&lt;/span&gt;
        &lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;removeItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Migration failed for &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  UI Input Optimization (&lt;code&gt;onBlur&lt;/code&gt; vs. &lt;code&gt;onChange&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;In Web settings screens, it's common to save configuration fields &lt;code&gt;onChange&lt;/code&gt; (on every keystroke). But with Keychain storage, doing this would trigger an OS keychain API write for &lt;strong&gt;every single character typed&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This causes noticeable lag and creates race conditions where async writes overwrite one another. We shifted saving to &lt;code&gt;onBlur&lt;/code&gt; (when the input field loses focus), keeping state local during typing and writing to the hardware keychain only when the user finishes.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏗️ 3. Tauri v2 Stable &amp;amp; Testing Safety Nets
&lt;/h2&gt;

&lt;p&gt;Between v0.4.1 and v0.4.3, we upgraded our Tauri environment from the release candidates (&lt;code&gt;tauri = "2.0.0-rc.17"&lt;/code&gt;) to the official stable release, aligning it with the &lt;code&gt;@tauri-apps/api&lt;/code&gt; stable packages.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fixing the "Silent Crash" in Background Sync
&lt;/h3&gt;

&lt;p&gt;In earlier releases, our background syncing was silently skipping runs. Because the WebView environment was detached from background workers, the sync loop failed to fetch credentials correctly. &lt;/p&gt;

&lt;p&gt;To prevent regressions in our sync engine and data merge layers, we set up &lt;strong&gt;Vitest + JSDOM&lt;/strong&gt; tests. We mocked the native Tauri bindings, simulating both browser and desktop runtimes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/lib/secrets.test.ts&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;keychain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;tauri&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;vi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hoisted&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;keychain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Map&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="na"&gt;tauri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;enabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}));&lt;/span&gt;

&lt;span class="nx"&gt;vi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;mock&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@tauri-apps/api/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;isTauri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;tauri&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;enabled&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;invoke&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;vi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;value&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cmd&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;set_secret&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;keychain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cmd&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;get_secret&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;keychain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cmd&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;delete_secret&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;keychain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`unexpected command: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}),&lt;/span&gt;
&lt;span class="p"&gt;}));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Having these unit tests run on every commit allowed us to refactor our authentication API (&lt;code&gt;src/lib/auth.ts&lt;/code&gt;) to be fully asynchronous without introducing regressions in the frontend components.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Conclusion &amp;amp; Next Steps
&lt;/h2&gt;

&lt;p&gt;Migrating to secure OS keychain storage and zero-knowledge WebDAV sync has turned Repo-rter into a robust, secure, and production-grade desktop client. Tauri v2's native capabilities allowed us to build these heavy security features with minimal friction.&lt;/p&gt;

&lt;p&gt;You can inspect the entire implementation, download the installers, or self-host your sync backend here:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/RAKKUNN/Repo-rter" rel="noopener noreferrer"&gt;Repo-rter GitHub Repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'd love to hear your thoughts in the comments! How do you handle sync and sensitive keys in your local-first apps? 💻👇&lt;/p&gt;

</description>
      <category>github</category>
      <category>opensource</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Migrating from LocalStorage to Native FS in Tauri: Repo-rter v0.4.1 Technical Deep Dive</title>
      <dc:creator>Im Woojin</dc:creator>
      <pubDate>Wed, 15 Jul 2026 02:34:25 +0000</pubDate>
      <link>https://dev.to/rakkunn/migrating-from-localstorage-to-native-fs-in-tauri-repo-rter-v041-technical-deep-dive-5hja</link>
      <guid>https://dev.to/rakkunn/migrating-from-localstorage-to-native-fs-in-tauri-repo-rter-v041-technical-deep-dive-5hja</guid>
      <description>&lt;p&gt;A few days ago, I introduced &lt;strong&gt;Repo-rter&lt;/strong&gt;—a local-first desktop app built with Next.js and Tauri v2 to bypass GitHub’s annoying 14-day traffic history limit.&lt;/p&gt;

&lt;p&gt;While the launch was successful, we quickly hit some critical architectural bottlenecks in production. In our latest &lt;strong&gt;v0.4.1&lt;/strong&gt; release, we completely refactored the data layer. &lt;/p&gt;

&lt;p&gt;Here is a technical breakdown of how we migrated from WebView &lt;code&gt;localStorage&lt;/code&gt; to a native file-system cache, bypassed API rate limits, and implemented automatic data purging.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛑 The Problem: Why &lt;code&gt;localStorage&lt;/code&gt; is Not a Database
&lt;/h2&gt;

&lt;p&gt;In our initial release, we relied on the browser-level &lt;code&gt;localStorage&lt;/code&gt; inside the WebView to store merged historical traffic logs. This was a bad engineering decision for three reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;OS Cache Purging&lt;/strong&gt;: WebView storage is tied to browser caches. On macOS and Windows, if the system disk runs low, the OS daemon (&lt;code&gt;cache_delete&lt;/code&gt;) can automatically purge WebView folders without warning. Cache-cleaning utilities (like CCleaner or CleanMyMac) also wipe these out.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The 5MB Limit&lt;/strong&gt;: Standard &lt;code&gt;localStorage&lt;/code&gt; has a hard limit of 5MB. If a user tracked 20+ repositories over a year, the JSON string would hit the quota limit, throwing &lt;code&gt;QuotaExceededError&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Volatile Backups&lt;/strong&gt;: We provided JSON exports, but without a native filesystem reader/writer, restoring those backups across different devices was painful.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🛠️ The Solution: Tauri Rust-backed Native File Storage
&lt;/h2&gt;

&lt;p&gt;To solve this, we bypassed the WebView entirely for data persistence and wrote a custom Rust file cache. &lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Rust Backend Commands
&lt;/h3&gt;

&lt;p&gt;We implemented two native Tauri commands in Rust to read and write repository statistics directly to the OS Application Data directory (which is safe from OS cache sweepers):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src-tauri/src/lib.rs&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nd"&gt;#[tauri::command]&lt;/span&gt;
&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;save_traffic_data&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;app_handle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nn"&gt;tauri&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;AppHandle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;repo_key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data_type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="k"&gt;mut&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;app_handle&lt;/span&gt;&lt;span class="nf"&gt;.path&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.app_data_dir&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.map_err&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nn"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;create_dir_all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.map_err&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Escape slashes to make safe filenames (e.g., owner/repo -&amp;gt; owner__repo)&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;safe_repo_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;repo_key&lt;/span&gt;&lt;span class="nf"&gt;.replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"__"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;filename&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nd"&gt;format!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"traffic_{}_{}.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;safe_repo_key&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="nf"&gt;.push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nn"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.map_err&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="nf"&gt;.to_string&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(())&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. The Asynchronous Frontend Caching Layer
&lt;/h3&gt;

&lt;p&gt;We refactored &lt;code&gt;mergeTrafficData&lt;/code&gt; in TypeScript to be asynchronous. When running inside Tauri, it invokes the Rust backend to read/write JSON files. For web browser development environments, it gracefully falls back to &lt;code&gt;localStorage&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/lib/storage.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;isTauri&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;invoke&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@tauri-apps/api/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;mergeTrafficData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;repoKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;views&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;clones&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;incomingData&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TrafficDataPoint&lt;/span&gt;&lt;span class="p"&gt;[])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;storedData&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TrafficDataPoint&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;runningInTauri&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;isTauri&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;runningInTauri&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;storedStr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;invoke&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;load_traffic_data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;repoKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;dataType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
      &lt;span class="nx"&gt;storedData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;storedStr&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;storedStr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;// Fallback&lt;/span&gt;
      &lt;span class="nx"&gt;storedData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`gittraffic_&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;_&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;repoKey&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;[]&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;// O(1) merge logic using a Map...&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;runningInTauri&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;invoke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;save_traffic_data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;repoKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;dataType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;mergedData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;mergedData&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔄 Bypassing GitHub's API Rate Limits: Rotational Syncing
&lt;/h2&gt;

&lt;p&gt;GitHub fine-grained PATs are limited to &lt;strong&gt;5,000 requests per hour&lt;/strong&gt;. In our initial background sync setup, we synced the top 10 repositories. But for power users with 50+ repositories, the remaining 40 repos would eventually fall off the 14-day cliff because syncing everything at once risked hitting rate limits.&lt;/p&gt;

&lt;p&gt;To solve this, we implemented a &lt;strong&gt;sliding-window rotational queue&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/hooks/useBackgroundSync.ts&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;BATCH_SIZE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;lastSyncedIndexStr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;background_sync_last_index&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;startIndex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;lastSyncedIndexStr&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nf"&gt;parseInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;lastSyncedIndexStr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Sort consistently so rotation mappings remain stable&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sortedRepos&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;repos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stargazers_count&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stargazers_count&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;endIndex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;startIndex&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;BATCH_SIZE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;sortedRepos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;batchRepos&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sortedRepos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;startIndex&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;endIndex&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Sync only this batch...&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;repo&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;batchRepos&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getRepoTrafficViews&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;login&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getRepoTrafficClones&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;login&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Save next offset index&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;nextStartIndex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;endIndex&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="nx"&gt;sortedRepos&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;endIndex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;background_sync_last_index&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;nextStartIndex&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This simple shift ensures that &lt;strong&gt;100% of a user's repositories are eventually backed up&lt;/strong&gt;, rotating through the list silently in the background without trigger limits.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧹 Zero-Dependency Data Purging in Rust
&lt;/h2&gt;

&lt;p&gt;We also added a &lt;strong&gt;Custom Data Retention Policy&lt;/strong&gt; (&lt;code&gt;Keep Forever&lt;/code&gt;, &lt;code&gt;30 Days&lt;/code&gt;, &lt;code&gt;90 Days&lt;/code&gt;, etc.). &lt;/p&gt;

&lt;p&gt;To keep the Rust binary lean, we wanted to avoid importing heavy dates/time crates like &lt;code&gt;chrono&lt;/code&gt;. Because ISO-8601 strings (&lt;code&gt;YYYY-MM-DDTHH:MM:SSZ&lt;/code&gt;) sort lexicographically, we wrote a zero-dependency date filter in Rust using simple string comparisons:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src-tauri/src/lib.rs&lt;/span&gt;
&lt;span class="n"&gt;arr&lt;/span&gt;&lt;span class="nf"&gt;.retain&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nf"&gt;Some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="nf"&gt;.get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"timestamp"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.and_then&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="nf"&gt;.as_str&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;// String comparison is fully compatible with ISO-8601 sorting!&lt;/span&gt;
        &lt;span class="n"&gt;timestamp&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;threshold_str&lt;/span&gt;&lt;span class="nf"&gt;.as_str&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;true&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We calculate the ISO threshold string in JavaScript, pass it to Rust, and let Rust do the heavy lifting of reading, filtering, and rewriting the files.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏷️ Dyn-Binding App Versioning
&lt;/h2&gt;

&lt;p&gt;We also got rid of hardcoded version numbers in the UI. By enabling &lt;code&gt;resolveJsonModule: true&lt;/code&gt; in &lt;code&gt;tsconfig.json&lt;/code&gt;, we dynamically import the version directly from our Node configs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;packageInfo&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../../package.json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// In UI rendering&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Version&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;packageInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;version&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/p&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, version numbers in our About dialog, Node environment, and Tauri configs are always perfectly in sync.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Conclusion &amp;amp; v0.4.1 Release
&lt;/h2&gt;

&lt;p&gt;Tauri v2 combined with React Query makes building robust, local-first applications incredibly fun. Moving away from &lt;code&gt;localStorage&lt;/code&gt; to native Rust file I/O has made Repo-rter significantly faster, immune to OS-level cache wipes, and ready for long-term historical logging.&lt;/p&gt;

&lt;p&gt;You can check out the source code, see the Tauri setup, or download the latest release (v0.4.1) here:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://github.com/RAKKUNN/Repo-rter" rel="noopener noreferrer"&gt;Repo-rter GitHub Repository&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'd love to hear your thoughts on this architecture! How do you handle sync and local storage in your desktop apps? Let me know in the comments! 💻👇&lt;/p&gt;

</description>
      <category>github</category>
      <category>opensource</category>
      <category>productivity</category>
    </item>
    <item>
      <title>I got tired of GitHub deleting my traffic stats after 14 days, so I built a local-first alternative 🚀</title>
      <dc:creator>Im Woojin</dc:creator>
      <pubDate>Sat, 11 Jul 2026 18:56:07 +0000</pubDate>
      <link>https://dev.to/rakkunn/i-got-tired-of-github-deleting-my-traffic-stats-after-14-days-so-i-built-a-local-first-alternative-307h</link>
      <guid>https://dev.to/rakkunn/i-got-tired-of-github-deleting-my-traffic-stats-after-14-days-so-i-built-a-local-first-alternative-307h</guid>
      <description>&lt;p&gt;Hey DEV community! 👋&lt;/p&gt;

&lt;p&gt;If you maintain open-source projects on GitHub, you probably love checking your repository's "Insights" tab. Seeing people clone, view, and star your project is an amazing feeling.&lt;/p&gt;

&lt;p&gt;But there are two catches that have always frustrated me:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Tedious Click-Fest: To see how your projects are doing, you have to manually open GitHub in your browser, navigate to each repository individually, click "Insights", and then click "Traffic". If you maintain 5+ repos, this becomes a chore real quick.&lt;/li&gt;
&lt;li&gt;The 14-Day Limit: Even worse, GitHub only keeps your traffic data for exactly 14 days.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you don't check your stats within that window, that data is gone forever. If you want a unified view and historical data, you either have to manually scrape it yourself, write a cron job, or pay a monthly subscription for a third-party SaaS tool.&lt;/p&gt;

&lt;p&gt;I didn't want to do any of those. So, I built my own solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  🌟 Enter: Repo-rter
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://rakkunn.github.io/Repo-rter/" rel="noopener noreferrer"&gt;Repo-rter&lt;/a&gt; is a completely free, 100% open-source desktop application available for Windows, macOS, and Linux.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwmtth4sqisi7aevjqoma.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwmtth4sqisi7aevjqoma.png" alt=" " width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It fetches your GitHub traffic data and caches it locally on your machine, meaning you never lose your historical stats again.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;TIP&lt;br&gt;
Privacy First: Unlike SaaS alternatives, Repo-rter doesn't store your Personal Access Token (PAT) on any server. Everything runs locally on your machine, so your data remains strictly yours.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  ✨ Key Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Infinite History: Automatically merges new traffic data with your local cache. Say goodbye to the 14-day limit!&lt;/li&gt;
&lt;li&gt;Release Downloads Tracker: Wondering how many people downloaded your .exe or .dmg? Repo-rter tracks total and individual asset downloads across all your releases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw3kouvllgslpzc13zhei.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw3kouvllgslpzc13zhei.png" alt=" " width="800" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Neo-Brutalist UI: I wanted the app to be fun to use, so it features a vibrant, gamified Neo-Brutalist design.&lt;/li&gt;
&lt;li&gt;Export to Markdown: Need to show off your stats? Generate and download a beautiful Markdown report of your repo's health and traffic with one click.&lt;/li&gt;
&lt;li&gt;Cross-Platform: Built with Tauri, it's incredibly lightweight and runs natively on Windows, macOS (Apple Silicon &amp;amp; Intel), and Linux.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🛠️ The Tech Stack
&lt;/h2&gt;

&lt;p&gt;I wanted to build something fast, lightweight, and modern. Here is what powers Repo-rter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Framework: Next.js (App Router) + React&lt;/li&gt;
&lt;li&gt;Desktop Runtime: Tauri v2&lt;/li&gt;
&lt;li&gt;Styling: TailwindCSS (with custom Neo-Brutalist utility classes)&lt;/li&gt;
&lt;li&gt;Data Fetching: React Query&lt;/li&gt;
&lt;li&gt;Charts: Recharts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using &lt;strong&gt;Tauri&lt;/strong&gt; instead of Electron was a game-changer. The app bundle size is incredibly small (around ~15MB), and it uses the native OS webview (WebKit on Mac, WebView2 on Windows), making memory consumption practically non-existent compared to heavy Electron apps.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 Try it out!
&lt;/h2&gt;

&lt;p&gt;You can grab the latest version (v0.3.0) for your OS directly from the Releases page.&lt;/p&gt;

&lt;p&gt;Setup takes exactly 30 seconds:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download and open the app.&lt;/li&gt;
&lt;li&gt;Generate a fine-grained GitHub PAT (Read-only access to Metadata &amp;amp; Administration).&lt;/li&gt;
&lt;li&gt;Paste it in, and watch your dashboard light up!&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Let me know what you think! 👇
&lt;/h3&gt;

&lt;p&gt;I built this tool to solve my own itch, but I really hope it helps other open-source maintainers keep track of their hard work.&lt;/p&gt;

&lt;p&gt;I would absolutely love your feedback. What features should I add next? If you find it useful, a Star ⭐️ on GitHub would make my day!&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://rakkunn.github.io/Repo-rter/" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;rakkunn.github.io&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Happy coding! 💻✨&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>github</category>
      <category>opensource</category>
      <category>productivity</category>
    </item>
    <item>
      <title>I made my Markdown Editor "AI-Ready": MarkSmith v0.3.0</title>
      <dc:creator>Im Woojin</dc:creator>
      <pubDate>Thu, 28 May 2026 18:51:39 +0000</pubDate>
      <link>https://dev.to/rakkunn/i-made-my-markdown-editor-ai-ready-marksmith-v030-2pdb</link>
      <guid>https://dev.to/rakkunn/i-made-my-markdown-editor-ai-ready-marksmith-v030-2pdb</guid>
      <description>&lt;p&gt;Hey DEV community! 👋 &lt;/p&gt;

&lt;p&gt;A few days ago, I built a VS Code extension called &lt;strong&gt;Marksmith&lt;/strong&gt; to fix the most annoying parts of writing Markdown (like pasting Excel tables and syncing preview scrolls). &lt;/p&gt;

&lt;p&gt;But recently, I noticed a huge shift in my own workflow: &lt;strong&gt;Half the Markdown I write isn't for humans anymore.&lt;/strong&gt; It’s being fed directly into Claude, ChatGPT, or Gemini as prompts and context.&lt;/p&gt;

&lt;p&gt;When you're constantly stuffing docs into context windows, two things happen:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You worry about hitting context limits (or racking up API costs).&lt;/li&gt;
&lt;li&gt;You waste time dealing with AI "hallucinations" when you ask it to generate docs back for you.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So, for the &lt;strong&gt;v0.3.0 release&lt;/strong&gt;, &lt;br&gt;
I decided to pivot Marksmith into something new: &lt;strong&gt;An Agent AI-Ready Markdown Toolkit.&lt;/strong&gt; 🚀&lt;/p&gt;

&lt;p&gt;Here is what I added to survive the AI era:&lt;/p&gt;




&lt;h3&gt;
  
  
  📊 1. Real-time LLM Token Estimator
&lt;/h3&gt;

&lt;p&gt;Instead of just counting words, Marksmith’s &lt;em&gt;Document X-Ray&lt;/em&gt; sidebar now includes a &lt;strong&gt;Heuristic Token Estimator&lt;/strong&gt; for GPT, Claude, and Gemini. &lt;/p&gt;

&lt;p&gt;Before you copy-paste that massive README into your AI assistant, you can see exactly how "heavy" it is in terms of tokens right inside your editor. No more guessing if you're about to blow past your context limit!&lt;/p&gt;

&lt;h3&gt;
  
  
  ✂️ 2. Copy Optimized for AI (1-Click Minify)
&lt;/h3&gt;

&lt;p&gt;Formatting is great for humans, but LLMs don't need all those extra spaces, perfectly aligned markdown tables, or empty lines. &lt;/p&gt;

&lt;p&gt;I added a &lt;code&gt;CodeLens&lt;/code&gt; button at the top of your files. Click it, and Marksmith instantly &lt;strong&gt;minifies&lt;/strong&gt; your Markdown (compresses tables, strips blanks) and copies it to your clipboard. &lt;br&gt;
&lt;em&gt;Result:&lt;/em&gt; You save significant tokens and API costs without ruining your beautiful local &lt;code&gt;.md&lt;/code&gt; file.&lt;/p&gt;

&lt;h3&gt;
  
  
  🕵️ 3. Hallucination Quick Fix
&lt;/h3&gt;

&lt;p&gt;Ever ask an AI to write documentation, and it leaves behind a bunch of &lt;code&gt;[TODO: Insert link here]&lt;/code&gt; or makes up a fake local image path? &lt;/p&gt;

&lt;p&gt;Marksmith now automatically scans your document and puts a red squiggly line under &lt;strong&gt;AI placeholders and broken local links&lt;/strong&gt;. Click the 💡 icon, and you can instantly strip them out or fix them. It acts as a safety net before you commit AI-generated docs.&lt;/p&gt;

&lt;h3&gt;
  
  
  🛡️ 4. Security Hardening (SSRF / RCE blocked)
&lt;/h3&gt;

&lt;p&gt;Wait, security in a Markdown extension? Yes! &lt;br&gt;
If you are previewing AI-generated Markdown, you are essentially rendering untrusted input. Maliciously crafted Markdown can trigger SSRF (Server-Side Request Forgery) by trying to fetch internal network metadata, or even execute code during PDF exports. &lt;/p&gt;

&lt;p&gt;I completely locked down the extension. It uses strict &lt;code&gt;DOMPurify&lt;/code&gt; sandboxing and actively blocks attempts to ping internal/cloud IPs.&lt;/p&gt;




&lt;h3&gt;
  
  
  🎨 Bonus: A 90s Retro Redesign
&lt;/h3&gt;

&lt;p&gt;Because coding should be fun, I spent the weekend completely rebuilding the landing page using a &lt;strong&gt;Mac OS Classic / Neo-Brutalism&lt;/strong&gt; theme. Let me know what you think of the vibes! 💾&lt;/p&gt;

&lt;h3&gt;
  
  
  🌐 Open VSX / Cursor Support
&lt;/h3&gt;

&lt;p&gt;For all my Cursor, Windsurf, and VSCodium users out there—thank you for the support! The extension has been doing surprisingly well on &lt;strong&gt;Open VSX&lt;/strong&gt;, and it's officially verified there too.&lt;/p&gt;

&lt;p&gt;👇 &lt;strong&gt;Check it out here:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🖥️ &lt;strong&gt;Website &amp;amp; Demo:&lt;/strong&gt; &lt;a href="https://rakkunn.github.io/MarkSmith/" rel="noopener noreferrer"&gt;rakkunn.github.io/MarkSmith&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🐙 &lt;strong&gt;Source Code:&lt;/strong&gt; &lt;a href="https://github.com/rakkunn/MarkSmith" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is 100% free and open-source. If you are building with AI or just write a ton of docs, I hope this saves you as much time as it saves me. &lt;/p&gt;

&lt;p&gt;Would love to hear your feedback in the comments! Happy coding! 💻✨&lt;/p&gt;

</description>
      <category>ai</category>
      <category>markdown</category>
      <category>productivity</category>
      <category>vscode</category>
    </item>
    <item>
      <title>Building Marksmith: lessons from making Markdown bearable in VS Code</title>
      <dc:creator>Im Woojin</dc:creator>
      <pubDate>Sun, 24 May 2026 10:04:35 +0000</pubDate>
      <link>https://dev.to/rakkunn/building-marksmith-lessons-from-making-markdown-bearable-in-vs-code-a1d</link>
      <guid>https://dev.to/rakkunn/building-marksmith-lessons-from-making-markdown-bearable-in-vs-code-a1d</guid>
      <description>&lt;p&gt;I'll start with the moment that pushed me to build this.&lt;/p&gt;

&lt;p&gt;I was editing a 1,200-line README. Spotted a typo in the preview pane. Scrolled the source to find it. Lost my place. Scrolled more. Pasted a table from a Google Sheet and got back a wall of tab characters. Closed VS Code in frustration and went to make coffee.&lt;/p&gt;

&lt;p&gt;That week I started building &lt;strong&gt;Marksmith&lt;/strong&gt;, a VS Code extension that tries to fix the small things that quietly drain you when writing Markdown. This is a retrospective: what I shipped, the parts that were harder than expected, and the security work that ended up being the largest chunk of the project.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem isn't Markdown — it's the workflow around it
&lt;/h2&gt;

&lt;p&gt;The syntax is fine. The friction lives next to it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pasting a table from Excel or Sheets gives you tab-separated garbage&lt;/li&gt;
&lt;li&gt;Pasting a URL means manually typing &lt;code&gt;[text](url)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Editor and preview scroll independently, so a long file turns into needle-in-haystack&lt;/li&gt;
&lt;li&gt;You have no idea how heavy your doc is until you paste it into Claude or GPT and watch the token count blow up&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each one is small. Together they're death by a thousand context switches.&lt;/p&gt;

&lt;h2&gt;
  
  
  Smart Paste: making the clipboard do the work
&lt;/h2&gt;

&lt;p&gt;The first thing I built was clipboard interception. When you paste, Marksmith inspects the clipboard before VS Code's default handler runs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;handlePaste&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;clipboardText&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;editor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TextEditor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Tab-separated, multi-line → Excel/Sheets table&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;isTabularData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;clipboardText&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;convertToMarkdownTable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;clipboardText&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;// URL pasted over a text selection → auto-link&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;isURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;clipboardText&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;editor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;selection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isEmpty&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;selected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;editor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;editor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;selection&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`[&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;selected&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;](&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;clipboardText&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;)`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;clipboardText&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Excel-to-Markdown conversion is the one users mention most. It's not complicated — split by tabs, normalize column widths, generate the &lt;code&gt;|---|&lt;/code&gt; separator. But the impact on writing flow is disproportionate to the implementation effort.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bi-directional sync: scrolling that actually works
&lt;/h2&gt;

&lt;p&gt;This one took a few iterations.&lt;/p&gt;

&lt;p&gt;The first version synced scroll position by percentage. Useless for long files, because Markdown blocks have wildly different rendered heights (a one-line image reference is tiny in source, huge in preview).&lt;/p&gt;

&lt;p&gt;The fix was source-mapping. When rendering Markdown to HTML, attach a &lt;code&gt;data-line&lt;/code&gt; attribute to every top-level element pointing back to the source line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h2&lt;/span&gt; &lt;span class="na"&gt;data-line=&lt;/span&gt;&lt;span class="s"&gt;"42"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Bi-directional sync&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;data-line=&lt;/span&gt;&lt;span class="s"&gt;"44"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;This one took a few iterations.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Scroll handlers on both sides then walk the DOM and align based on those anchors. Clicking any element in the preview jumps the cursor to that source line. Not novel — most modern Markdown editors do something similar — but getting it smooth inside a VS Code webview took some debouncing to avoid feedback loops where each side's scroll event triggered the other infinitely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Document X-Ray: knowing the cost before you paste
&lt;/h2&gt;

&lt;p&gt;If you draft in Markdown and feed it to an LLM, you eventually hit context limits. Marksmith has a sidebar showing word count, readability score, and an estimated LLM token count.&lt;/p&gt;

&lt;p&gt;The token estimate is a heuristic — running a real tokenizer in the extension host would be too heavy on every keystroke. Instead it uses a character-and-whitespace approximation calibrated against &lt;code&gt;tiktoken&lt;/code&gt; output on a documentation corpus. It gets within ~5% on doc-style text, which is enough to catch "this prompt is too big" before you actually paste it somewhere.&lt;/p&gt;

&lt;p&gt;I'd like to move this to a real tokenizer in a worker thread eventually. For now the heuristic is good enough.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part I underestimated: security
&lt;/h2&gt;

&lt;p&gt;I thought I was building an editor extension. I ended up spending more time on security than on features. Three classes of vulnerability mattered:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;XSS in the webview.&lt;/strong&gt; Markdown allows raw HTML, so a &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag in someone's README would execute in the webview context. I run all rendered HTML through DOMPurify with a strict allowlist, while preserving the elements I actually want (Mermaid SVG, syntax-highlighted spans):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sanitized&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;DOMPurify&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sanitize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;html&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;ALLOWED_TAGS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="nx"&gt;defaultTags&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;svg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;path&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;g&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rect&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;ALLOWED_ATTR&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="nx"&gt;defaultAttrs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;data-line&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;viewBox&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;xmlns&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;FORBID_TAGS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;script&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;style&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;iframe&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;RCE through PDF export.&lt;/strong&gt; Marksmith uses Puppeteer to render to PDF. In the first version I hadn't verified the Chromium sandbox was actually engaging on user machines. A crafted Markdown file with malicious HTML could, in theory, escape the renderer. I now explicitly verify sandbox mode at launch and fail closed if it isn't available.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SSRF in URL preview.&lt;/strong&gt; Smart Paste optionally fetches the title of a URL you paste. Without filtering, a user could be tricked into pasting &lt;code&gt;http://169.254.169.254/...&lt;/code&gt; (the AWS metadata endpoint) or &lt;code&gt;http://192.168.1.1/admin&lt;/code&gt;, and the extension would dutifully fetch it. The fix is IP filtering before the request, plus a redirect cap:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;safeFetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;address&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;dns&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lookup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;hostname&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;isPrivateIP&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nf"&gt;isLoopback&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Blocked: private/loopback address&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;redirect&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;manual&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="cm"&gt;/* + cap follows */&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;None of this is novel security work. What surprised me was how much attack surface a "simple" Markdown extension exposes once it starts being helpful — fetching URLs, rendering arbitrary HTML, spawning headless browsers.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd do differently
&lt;/h2&gt;

&lt;p&gt;A few things in hindsight:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Threat-model first, features second.&lt;/strong&gt; I retrofitted protections; should have designed for them from day one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The token counter should have been a worker from the start.&lt;/strong&gt; Moving it off the main thread later was awkward and broke a few assumptions in the sidebar UI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test on Windows earlier.&lt;/strong&gt; Path handling for PDF export gave me grief that I could have caught much sooner.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Source: &lt;a href="https://github.com/rakkunn/MarkSmith" rel="noopener noreferrer"&gt;Github&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Homepage: &lt;a href="https://rakkunn.github.io/MarkSmith/" rel="noopener noreferrer"&gt;Marksmith&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;VSCode Marketplace: 
&lt;a href="https://marketplace.visualstudio.com/items?itemName=rakkunn.marksmith" rel="noopener noreferrer"&gt;Marksmith on VS Code Marketplace&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;OpenVSX Marketplace:
&lt;a href="https://open-vsx.org/extension/rakkunn/marksmith" rel="noopener noreferrer"&gt;Marksmith on OpenVSX&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you've shipped a VS Code extension and have war stories about webview security or Puppeteer sandboxing, I'd genuinely like to hear them — drop a comment.&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>markdown</category>
      <category>llm</category>
      <category>showdev</category>
    </item>
    <item>
      <title>DualClip v1.2.6 — Stability Fix, Homebrew</title>
      <dc:creator>Im Woojin</dc:creator>
      <pubDate>Tue, 14 Apr 2026 07:57:34 +0000</pubDate>
      <link>https://dev.to/rakkunn/dualclip-v126-stability-fix-homebrew-47ef</link>
      <guid>https://dev.to/rakkunn/dualclip-v126-stability-fix-homebrew-47ef</guid>
      <description>&lt;p&gt;It's been a busy couple of days for DualClip. What started as a frustrating crash investigation turned into a series of meaningful improvements — from fixing a deep resource-bundling bug to shipping Homebrew support. Here's a rundown of everything that changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Crash That Wouldn't Quit
&lt;/h2&gt;

&lt;p&gt;Shortly after v1.2.0, DualClip started crashing on launch for some users. The crash report pointed to Bundle.module inside the KeyboardShortcuts dependency — a fatalError triggered because the app couldn't locate its resource bundle at runtime.&lt;/p&gt;

&lt;p&gt;The root cause turned out to be a subtle mismatch in how Swift Package Manager bundles resources for standalone .app builds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SPM generates a file called resource_bundle_accessor.swift that looks for resources at Bundle.main.bundleURL — which resolves to the .app/ root directory.&lt;/li&gt;
&lt;li&gt;But macOS codesigning requires all resources to live inside Contents/Resources/, not the app root. Placing bundles at the root causes an "unsealed contents" signing error.&lt;/li&gt;
&lt;li&gt;So the resources were in Contents/Resources/, but the code was looking at .app/ — and finding nothing.
The fix was surgical: after the initial build, we patch the generated accessor to use Bundle.main.resourceURL! (which points to Contents/Resources/), then recompile just the affected module and re-link the executable. SPM regenerates the accessor on every full build, so we had to carefully avoid triggering a rebuild after patching. The final binary is verified with strings to confirm the patch is baked in.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This fix ships in v1.2.6 and the crash is fully resolved.&lt;/p&gt;

&lt;h2&gt;
  
  
  Homebrew Support
&lt;/h2&gt;

&lt;p&gt;DualClip is now installable via Homebrew:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;brew install RAKKUNN/tap/dualclip&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We set up a dedicated Homebrew Tap with a Cask formula that points to the latest signed and notarized release. The CI pipeline automatically updates the formula (version + SHA256) whenever a new release is tagged — zero manual steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Makes DualClip Different
&lt;/h2&gt;

&lt;p&gt;After analyzing 57 macOS clipboard managers, one thing stood out: every single one is a clipboard history manager. DualClip is the only one that uses dedicated slots.&lt;/p&gt;

&lt;p&gt;The difference matters:&lt;/p&gt;

&lt;p&gt;History managers record everything you copy and let you scroll back through it. Great for recall, but adds complexity — databases, search UI, sync, storage limits.&lt;br&gt;
DualClip gives you 3 fixed slots with instant keyboard access. You decide where to copy, not when to find it later. No history, no scrolling, no search.&lt;br&gt;
It's also one of the few clipboard tools that stores absolutely nothing to disk. Everything lives in RAM and vanishes on quit. No network access, no telemetry, no cloud sync. &lt;/p&gt;
&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;brew install RAKKUNN/tap/dualclip&lt;/code&gt;&lt;br&gt;
Or grab the latest release from GitHub.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/RAKKUNN" rel="noopener noreferrer"&gt;
        RAKKUNN
      &lt;/a&gt; / &lt;a href="https://github.com/RAKKUNN/DualClip" rel="noopener noreferrer"&gt;
        DualClip
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A lightweight macOS app for multi-slot clipboard management
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;
  &lt;a rel="noopener noreferrer" href="https://github.com/RAKKUNN/DualClip/icon.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRAKKUNN%2FDualClip%2FHEAD%2Ficon.png" alt="DualClip Icon" width="128" height="128"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;DualClip&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;
  &lt;b&gt;English&lt;/b&gt; · &lt;a href="https://github.com/RAKKUNN/DualClip/README-ko.md" rel="noopener noreferrer"&gt;한국어&lt;/a&gt; · &lt;a href="https://github.com/RAKKUNN/DualClip/README-ja.md" rel="noopener noreferrer"&gt;日本語&lt;/a&gt; · &lt;a href="https://github.com/RAKKUNN/DualClip/README-zh.md" rel="noopener noreferrer"&gt;中文&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
  A lightweight macOS menu bar app that provides &lt;b&gt;multi-slot clipboard management&lt;/b&gt;.&lt;br&gt;
  Unlike history-based clipboard managers, DualClip gives you instant access to dedicated clipboard slots via customizable keyboard shortcuts
&lt;/p&gt;

&lt;p&gt;
  &lt;a href="https://rakkunn.github.io/DualClip/" rel="nofollow noopener noreferrer"&gt;&lt;b&gt;🌐 Website&lt;/b&gt;&lt;/a&gt;
  &amp;nbsp;·&amp;nbsp;
  &lt;a href="https://github.com/RAKKUNN/DualClip/releases/latest" rel="noopener noreferrer"&gt;&lt;b&gt;⬇ Download&lt;/b&gt;&lt;/a&gt;
  &amp;nbsp;·&amp;nbsp;
  &lt;a href="https://github.com/RAKKUNN/DualClip#installation" rel="noopener noreferrer"&gt;&lt;b&gt;🍺 Homebrew&lt;/b&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/RAKKUNN/DualClip/actions/workflows/ci.yml/badge.svg"&gt;&lt;img src="https://github.com/RAKKUNN/DualClip/actions/workflows/ci.yml/badge.svg" alt="CI"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/6bffd51139ffc392eddcd88884109841bddeb7332c97055a073d66df7fadf064/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d61634f532d31332532422d626c7565"&gt;&lt;img src="https://camo.githubusercontent.com/6bffd51139ffc392eddcd88884109841bddeb7332c97055a073d66df7fadf064/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d61634f532d31332532422d626c7565" alt="macOS 13+"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/2b1ee465df76b12ec13951241072e303f4518d7562c9ae3abcf609d074419bd6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4170706c6525323053696c69636f6e2d72657175697265642d626c61636b3f6c6f676f3d6170706c65"&gt;&lt;img src="https://camo.githubusercontent.com/2b1ee465df76b12ec13951241072e303f4518d7562c9ae3abcf609d074419bd6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4170706c6525323053696c69636f6e2d72657175697265642d626c61636b3f6c6f676f3d6170706c65" alt="Apple Silicon"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/8c972106af96ab0d4f2778157576ab9728bc8b0735969ac8963a503781b0e62b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53776966742d352e392532422d6f72616e6765"&gt;&lt;img src="https://camo.githubusercontent.com/8c972106af96ab0d4f2778157576ab9728bc8b0735969ac8963a503781b0e62b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53776966742d352e392532422d6f72616e6765" alt="Swift 5.9+"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/5caa455d8debc46fb23abbadb45a733a937f3910a73fc875c2f7820468e1bb54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e"&gt;&lt;img src="https://camo.githubusercontent.com/5caa455d8debc46fb23abbadb45a733a937f3910a73fc875c2f7820468e1bb54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e" alt="License: MIT"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Features&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;3 Clipboard Slots&lt;/strong&gt;: Slot A (system default), Slot B, and Slot C&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customizable Shortcuts&lt;/strong&gt;: No hardcoded key conflicts — configure your own shortcuts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Atomic Paste&lt;/strong&gt;: Seamlessly pastes from any slot without corrupting your system clipboard&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Menu Bar Popover&lt;/strong&gt;: Quick-glance view of all slot contents with previews&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy First&lt;/strong&gt;: All data lives in RAM only — nothing is persisted to disk&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Network Access&lt;/strong&gt;: No telemetry, no analytics, no internet communication&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Demo&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;
  &lt;a rel="noopener noreferrer" href="https://github.com/RAKKUNN/DualClip/test_dualclip.gif"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRAKKUNN%2FDualClip%2FHEAD%2Ftest_dualclip.gif" alt="DualClip Demo" width="600"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
  &lt;a rel="noopener noreferrer" href="https://github.com/RAKKUNN/DualClip/test_dualclip_image.gif"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FRAKKUNN%2FDualClip%2FHEAD%2Ftest_dualclip_image.gif" alt="DualClip Image Support Demo" width="600"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Default Shortcuts&lt;/h2&gt;

&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;&lt;div class="table-wrapper-paragraph"&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;table&gt;

&lt;thead&gt;

&lt;tr&gt;

&lt;th&gt;Action&lt;/th&gt;

&lt;th&gt;Shortcut&lt;/th&gt;

&lt;/tr&gt;

&lt;/thead&gt;

&lt;tbody&gt;

&lt;tr&gt;

&lt;td&gt;Copy to Slot B&lt;/td&gt;

&lt;td&gt;⌥⌘C&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;td&gt;Paste from Slot B&lt;/td&gt;

&lt;td&gt;⌥⌘V&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;td&gt;Copy to Slot C&lt;/td&gt;

&lt;td&gt;⌃⌘C&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;td&gt;Paste from Slot C&lt;/td&gt;

&lt;td&gt;⌃⌘V&lt;/td&gt;

&lt;/tr&gt;

&lt;/tbody&gt;

&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;

&lt;p&gt;All shortcuts are…&lt;/p&gt;&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/RAKKUNN/DualClip" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;&lt;br&gt;
Signed and notarized by Apple — no Gatekeeper warnings.

&lt;p&gt;DualClip is open source under the MIT license. Issues, feedback, and contributions are welcome.&lt;/p&gt;

&lt;p&gt;Thank you, have a nice day!&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>swift</category>
      <category>showdev</category>
    </item>
    <item>
      <title>DualClip - Update_2026.04.12.</title>
      <dc:creator>Im Woojin</dc:creator>
      <pubDate>Sun, 12 Apr 2026 07:48:23 +0000</pubDate>
      <link>https://dev.to/rakkunn/dualclip-update20260412-4pb7</link>
      <guid>https://dev.to/rakkunn/dualclip-update20260412-4pb7</guid>
      <description>&lt;p&gt;Last week, I shared the first round of updates for DualClip, my open-source macOS clipboard manager. Since then, I’ve crossed off three major items from the roadmap—including the one I’m most excited about: you can finally download DualClip without needing to build it from source.&lt;/p&gt;

&lt;p&gt;Here is the breakdown of what’s new in v1.1.0.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔒 Secure Input Field Detection
&lt;/h2&gt;

&lt;p&gt;This was at the top of my "What’s Next" list for a reason: Privacy.&lt;/p&gt;

&lt;p&gt;When macOS has a password field focused, the system activates a mode called Secure Event Input. DualClip now checks for this state before every copy and paste operation. If you're typing a password into Safari, 1Password, or a terminal sudo prompt, DualClip silently steps back.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kt"&gt;Swift&lt;/span&gt;
&lt;span class="kd"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;isSecureInputActive&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;Bool&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kt"&gt;IsSecureEventInputEnabled&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The guard is dead simple—one line in handleCopy and one in handlePaste:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kt"&gt;Swift&lt;/span&gt;
&lt;span class="k"&gt;guard&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="kt"&gt;AccessibilityService&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shared&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isSecureInputActive&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It’s the kind of feature that, when it works correctly, you never notice. And that’s exactly the point.&lt;/p&gt;

&lt;h2&gt;
  
  
  📦 Prebuilt Binaries (No Xcode Required!)
&lt;/h2&gt;

&lt;p&gt;The biggest friction point in my original post was: "There's no prebuilt binary yet." Starting with v1.1.0, every release is signed with a Developer ID certificate and notarized by Apple. This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;No more Gatekeeper warnings.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No "Open Anyway" dance in System Settings.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Just download, drag to Applications, and go.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🏗 The CI/CD Saga: 3 Bugs and a Notarization Pipeline
&lt;/h2&gt;

&lt;p&gt;Getting the automated release pipeline working was... an adventure. I’m using GitHub Actions to handle the heavy lifting. The workflow triggers on version tags (v*.&lt;em&gt;.&lt;/em&gt;) and follows this sequence:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Build: swift build -c release on a macOS 14 ARM runner.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Import: Decode the .p12 certificate from GitHub Secrets.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bundle: Assemble the .app structure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sign: codesign with hardened runtime and a timestamp.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Notarize: Submit to Apple, poll for completion, and staple the ticket.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Sounds clean on paper. In practice, it took four attempts and taught me three very humbling lessons:&lt;/p&gt;

&lt;p&gt;Bug 1: The One-Character Typo&lt;br&gt;
I spent 10 minutes staring at a 401 Unauthorized error from Apple’s API. It turned out to be a typo in my app-specific password secret: fjhk vs tihk. CI/CD reminds you that your eyes see what they want to see, not what’s actually there.&lt;/p&gt;

&lt;p&gt;Bug 2: The Service Outage&lt;br&gt;
Three consecutive submissions got stuck at "In Progress" for hours. I thought my script was hung. It turns out Apple's notarization service was actually having a global outage. Even the best pipeline can’t fix a broken cloud.&lt;/p&gt;

&lt;p&gt;Bug 3: The awk Failure&lt;br&gt;
My polling script used awk '{print $2}' to extract the status from notarytool info. However, the status string for a pending job is In Progress (two words). awk captured only "In," which matched nothing in my logic.&lt;br&gt;
The Fix: Switched to sed 's/.*status: //' to grab the full string.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔄 Updated Roadmap
&lt;/h2&gt;

&lt;p&gt;Feature Status&lt;br&gt;
Secure input field detection    ✅ Shipped&lt;br&gt;
RAM zeroing on termination  ✅ Shipped&lt;br&gt;
Image/rich text support ✅ Shipped&lt;br&gt;
GitHub Actions CI/CD + Notarization ✅ Shipped&lt;br&gt;
Homebrew Cask distribution  🔜 Next&lt;br&gt;
Sparkle auto-update 📅 Planned&lt;/p&gt;




&lt;h2&gt;
  
  
  Try it out
&lt;/h2&gt;

&lt;p&gt;If you’ve been waiting for a downloadable build, it’s ready for you:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Go to the Latest Releases.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Download DualClip-1.1.0-arm64.zip.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unzip, move to Applications, and launch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Grant Accessibility permission when prompted.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🔗 GitHub: &lt;a href="https://github.com/RAKKUNN/DualClip" rel="noopener noreferrer"&gt;https://github.com/RAKKUNN/DualClip&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you find a bug or have a feature request, feel free to open an issue or a PR!&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>swift</category>
    </item>
  </channel>
</rss>
