<?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: ilan lachkar</title>
    <description>The latest articles on DEV Community by ilan lachkar (@ilan_lachkar_5fb20af6233d).</description>
    <link>https://dev.to/ilan_lachkar_5fb20af6233d</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%2F4036541%2F80fbde57-cd2b-4609-95f1-53e23f716656.png</url>
      <title>DEV Community: ilan lachkar</title>
      <link>https://dev.to/ilan_lachkar_5fb20af6233d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ilan_lachkar_5fb20af6233d"/>
    <language>en</language>
    <item>
      <title>I built a CLI that estimates LLM API cost before you send the request</title>
      <dc:creator>ilan lachkar</dc:creator>
      <pubDate>Sun, 19 Jul 2026 12:45:52 +0000</pubDate>
      <link>https://dev.to/ilan_lachkar_5fb20af6233d/i-built-a-cli-that-estimates-llm-api-cost-before-you-send-the-request-533h</link>
      <guid>https://dev.to/ilan_lachkar_5fb20af6233d/i-built-a-cli-that-estimates-llm-api-cost-before-you-send-the-request-533h</guid>
      <description>&lt;p&gt;I kept overrunning my Anthropic/OpenAI budget by guessing token counts&lt;br&gt;
     before sending big prompts. So I built &lt;strong&gt;llm-tokencheck&lt;/strong&gt;, a free CLI&lt;br&gt;
     that estimates tokens + USD cost for a file or text across Anthropic,&lt;br&gt;
     OpenAI and Google models &lt;em&gt;before&lt;/em&gt; you make the API call.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; ```bash
 npm install -g llm-tokencheck
 tokencheck myfile.txt
 ```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; It prints a cost table across models so you can pick the cheapest one
 that fits, or just sanity-check a big request before sending it.

 There's an optional $9 Pro license (`--activate`) that unlocks batch
 processing of a whole folder + CSV export — useful if you're auditing
 costs across a codebase or a dataset.

 - GitHub: https://github.com/ilan-lachkar/llm-tokencheck
 - npm: https://www.npmjs.com/package/llm-tokencheck

 Feedback welcome, especially on pricing accuracy for newer models.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>showdev</category>
      <category>cli</category>
      <category>llm</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
