<?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>Forem: Sungat Arynov</title>
    <description>The latest articles on Forem by Sungat Arynov (@sungat_arynov_cda583888da).</description>
    <link>https://forem.com/sungat_arynov_cda583888da</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3364091%2F1a380d7c-e113-47a0-80ea-5b65cb2e9dd7.png</url>
      <title>Forem: Sungat Arynov</title>
      <link>https://forem.com/sungat_arynov_cda583888da</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sungat_arynov_cda583888da"/>
    <language>en</language>
    <item>
      <title>I Built an Open-Source CLI AI Coding Assistant in Go (and it costs $3/month)</title>
      <dc:creator>Sungat Arynov</dc:creator>
      <pubDate>Sun, 01 Feb 2026 09:19:56 +0000</pubDate>
      <link>https://forem.com/sungat_arynov_cda583888da/i-built-an-open-source-cli-ai-coding-assistant-in-go-and-it-costs-3month-4pma</link>
      <guid>https://forem.com/sungat_arynov_cda583888da/i-built-an-open-source-cli-ai-coding-assistant-in-go-and-it-costs-3month-4pma</guid>
      <description>&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.amazonaws.com%2Fuploads%2Farticles%2Fek0kjer6jegv4qvrseph.gif" 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.amazonaws.com%2Fuploads%2Farticles%2Fek0kjer6jegv4qvrseph.gif" alt="Gokin Cli demonstration" width="670" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Claude Code Too Expensive? Meet Gokin — An Open Source Alternative in Go
&lt;/h2&gt;

&lt;p&gt;I love &lt;a href="https://github.com/anthropics/claude-code" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt;. It’s powerful, fast, and genuinely helpful. But at &lt;strong&gt;~$100/month&lt;/strong&gt;, those usage limits run out faster than I’d like.&lt;/p&gt;

&lt;p&gt;I looked into Chinese AI alternatives like GLM-4, but I wasn’t comfortable giving their official CLIs full access to my entire codebase.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So I built my own.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Gokin?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Gokin&lt;/strong&gt; is a CLI AI coding assistant written in Go. It connects directly to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Google Gemini&lt;/strong&gt; (Free tier available via AI Studio).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GLM-4&lt;/strong&gt; (Cost-effective, typically ~$3/month for heavy usage via API).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  My Hybrid Workflow
&lt;/h3&gt;

&lt;p&gt;Instead of burning expensive Claude tokens on boilerplate, I split my tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gokin (GLM-4 / Gemini):&lt;/strong&gt; Drafting code from scratch, bulk file operations, and repetitive tasks (80% of the work).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code (Opus):&lt;/strong&gt; Polishing, complex architectural changes, and deep code reviews (the critical 20%).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Features That Actually Matter
&lt;/h2&gt;

&lt;h3&gt;
  
  
  40+ AI Tools
&lt;/h3&gt;

&lt;p&gt;Gokin isn't just a text generator; it interacts with your environment:&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;# File operations&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; Create a REST API handler &lt;span class="k"&gt;for &lt;/span&gt;user authentication

&lt;span class="c"&gt;# Search&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; Find all functions that handle database connections

&lt;span class="c"&gt;# Git integration&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"feat: add user validation"&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /pr &lt;span class="nt"&gt;--title&lt;/span&gt; &lt;span class="s2"&gt;"Add validation feature"&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Semantic Code Search
&lt;/h3&gt;

&lt;p&gt;Instead of wrestling with &lt;code&gt;grep&lt;/code&gt; or regex, search by intent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;"Where is error logging implemented?"&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"Find code related to JWT validation."&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"Show all payment processing functions."&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Gokin uses embeddings to understand your codebase conceptually, making navigation much faster.&lt;/p&gt;

&lt;h3&gt;
  
  
  Multi-Agent System
&lt;/h3&gt;

&lt;p&gt;Different agents handle different specialized tasks:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Agent&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ExploreAgent&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Navigates and understands codebase structure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;BashAgent&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Handles command execution and terminal tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;PlanAgent&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Manages complex, multi-step task planning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;GeneralAgent&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Handles standard chat and general queries&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Security First
&lt;/h3&gt;

&lt;p&gt;Privacy was my primary motivator. Gokin ensures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Secret Redaction:&lt;/strong&gt; API keys, tokens, and passwords are automatically stripped before reaching the AI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Command Sandboxing:&lt;/strong&gt; Potentially dangerous operations are blocked or require manual approval.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Processing:&lt;/strong&gt; Your raw code stays on your machine; only relevant context is sent to the API.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Cost Comparison
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Monthly Cost&lt;/th&gt;
&lt;th&gt;Best For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Gokin + GLM-4&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~$3&lt;/td&gt;
&lt;td&gt;Heavy usage and initial development&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Gokin + Gemini&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Free&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Fast iterations and daily tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Claude Code&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~$100&lt;/td&gt;
&lt;td&gt;Complex reasoning and final polish&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🚀 Installation
&lt;/h2&gt;

&lt;p&gt;Choose the method that best fits your workflow:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Direct Go Install (Recommended)
&lt;/h3&gt;

&lt;p&gt;If you have Go 1.23+ installed, this is the fastest way. The binary will be installed to your &lt;code&gt;$GOPATH/bin&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;install &lt;/span&gt;github.com/ginkida/gokin/cmd/gokin@latest

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Build from Source
&lt;/h3&gt;

&lt;p&gt;Use this method if you want to inspect the code or contribute to development.&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;# Clone the repository&lt;/span&gt;
git clone https://github.com/ginkida/gokin.git
&lt;span class="nb"&gt;cd &lt;/span&gt;gokin

&lt;span class="c"&gt;# Build the binary&lt;/span&gt;
go build &lt;span class="nt"&gt;-o&lt;/span&gt; gokin ./cmd/gokin

&lt;span class="c"&gt;# (Optional) Move to your system PATH for global access&lt;/span&gt;
&lt;span class="nb"&gt;sudo mv &lt;/span&gt;gokin /usr/local/bin/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Shell Configuration
&lt;/h3&gt;

&lt;p&gt;To ensure you can run &lt;code&gt;gokin&lt;/code&gt; from any directory, make sure your Go bin path is in your environment variables. Add this to your &lt;code&gt;~/.zshrc&lt;/code&gt; or &lt;code&gt;~/.bashrc&lt;/code&gt;:&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="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$PATH&lt;/span&gt;:&lt;span class="si"&gt;$(&lt;/span&gt;go &lt;span class="nb"&gt;env &lt;/span&gt;GOPATH&lt;span class="si"&gt;)&lt;/span&gt;/bin

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🛠 System Requirements
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Requirement&lt;/th&gt;
&lt;th&gt;Minimum Version / Link&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Go&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1.23+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;OS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;macOS, Linux, or Windows (via WSL2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;API Key&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://aistudio.google.com/apikey" rel="noopener noreferrer"&gt;Google Gemini (Free Tier)&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  🔍 Quick Verification
&lt;/h3&gt;

&lt;p&gt;After installing, check if everything is set up correctly by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gokin /doctor

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This built-in command will verify your environment, API keys, and system permissions.&lt;/p&gt;




&lt;h2&gt;
  
  
  What’s Next?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Support for more AI providers (OpenAI, local models via Ollama).&lt;/li&gt;
&lt;li&gt;Advanced planning algorithms (Refining existing MCTS and A* implementations).&lt;/li&gt;
&lt;li&gt;A dedicated plugin system.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Check it out on GitHub:&lt;/strong&gt; &lt;a href="https://github.com/ginkida/gokin" rel="noopener noreferrer"&gt;github.com/ginkida/gokin&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Star the repo if you find it useful! PRs are always welcome.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Have you built your own AI tools? What does your AI-assisted workflow look like? Let me know in the comments!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>cli</category>
      <category>gemini</category>
      <category>claude</category>
    </item>
  </channel>
</rss>
