<?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: IKIE</title>
    <description>The latest articles on DEV Community by IKIE (@ikie-cli).</description>
    <link>https://dev.to/ikie-cli</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%2F3998429%2Ffc6d8e7f-5210-47d5-acbf-f33e1fcf9c5e.png</url>
      <title>DEV Community: IKIE</title>
      <link>https://dev.to/ikie-cli</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ikie-cli"/>
    <language>en</language>
    <item>
      <title>Why I Built My Own Self-Healing CLI Coding Agent That Costs 10x Less Than Commercial Options</title>
      <dc:creator>IKIE</dc:creator>
      <pubDate>Tue, 23 Jun 2026 09:29:15 +0000</pubDate>
      <link>https://dev.to/ikie-cli/why-i-built-my-own-self-healing-cli-coding-agent-that-costs-10x-less-than-commercial-options-16c6</link>
      <guid>https://dev.to/ikie-cli/why-i-built-my-own-self-healing-cli-coding-agent-that-costs-10x-less-than-commercial-options-16c6</guid>
      <description>&lt;p&gt;Commercial AI coding assistants are impressive. They are also expensive, opaque, and often wasteful.&lt;/p&gt;

&lt;p&gt;Last year I found myself running a long refactor with one of the popular terminal-based tools. Every turn re-uploaded the entire conversation. Every long file re-streamed the full context. By the end of the session the API bill was higher than my hourly rate — and I still had to manually run the tests and clean up the failures.&lt;/p&gt;

&lt;p&gt;That felt backwards. So I built Ikie, a terminal AI coding assistant optimized for three things the incumbents ignore:&lt;/p&gt;

&lt;p&gt;Token efficiency via aggressive prompt caching.&lt;br&gt;
Autonomous verification via a self-healing test loop.&lt;br&gt;
Local, dependency-free retrieval via a custom TF-IDF engine.&lt;br&gt;
In this post I will walk through the architecture, the numbers, and the engineering decisions that make Ikie 10x cheaper without being 10x dumber.&lt;/p&gt;

&lt;p&gt;The Problem: AI Coding Assistants Are Billing Machines&lt;/p&gt;

&lt;p&gt;Context re-upload on every turn.&lt;br&gt;
Subscription + usage double-dipping.&lt;br&gt;
Manual verification after edits.&lt;br&gt;
The Cost Breakthrough: Prompt Caching in Practice&lt;/p&gt;

&lt;p&gt;How Ikie caches and reuses context.&lt;br&gt;
Real-world benchmark: 40 queries, 90K+ tokens, $1.06.&lt;br&gt;
Response time distribution and why it matters.&lt;br&gt;
The Architecture of a Minimal Agent&lt;/p&gt;

&lt;p&gt;TypeScript/Node.js core.&lt;br&gt;
Conversation state, tool loop, and bash execution.&lt;br&gt;
Interactive shell mode for real prompts and menus.&lt;br&gt;
Building a Zero-Dependency TF-IDF Retriever&lt;/p&gt;

&lt;p&gt;Why we skipped embeddings and vector DBs.&lt;br&gt;
File scanning, chunking, and term frequency.&lt;br&gt;
IDF scoring and cosine similarity.&lt;br&gt;
Code-aware tokenization: camelCase, snake_case, PascalCase, kebab-case.&lt;br&gt;
Lazy index rebuilds with file mtimes.&lt;br&gt;
Self-Healing: From Edit to Green Test&lt;/p&gt;

&lt;p&gt;Detecting mutating tool batches.&lt;br&gt;
Running .ikie.json test commands.&lt;br&gt;
Injecting failures as reflection messages.&lt;br&gt;
The 3-attempt retry budget and when to stop.&lt;br&gt;
Configuration and Extensibility&lt;/p&gt;

&lt;p&gt;.ikie.json project-level config.&lt;br&gt;
Custom MCP servers and skills.&lt;br&gt;
Free Hobby plan and cheap paid tiers.&lt;br&gt;
Lessons and Future Work&lt;/p&gt;

&lt;p&gt;What worked better than expected.&lt;br&gt;
What still needs improvement (retrieval signals, reflection budgets, test command safety).&lt;br&gt;
Call to action: try Ikie, open issues, contribute.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ikie-cli.xyz" rel="noopener noreferrer"&gt;https://ikie-cli.xyz&lt;/a&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>cli</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
