<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Claude-Code on Ma plage perso</title>
        <link>https://www.hleroy.com/tags/claude-code/</link>
        <description>Recent content in Claude-Code on Ma plage perso</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>fr</language>
        <copyright>This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.</copyright>
        <lastBuildDate>Thu, 09 Jul 2026 21:54:30 +0200</lastBuildDate><atom:link href="https://www.hleroy.com/tags/claude-code/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>Claudex: switch Claude Code to cheaper providers in one command</title>
        <link>https://www.hleroy.com/2026/05/claudex-switch-claude-code-to-cheaper-providers-in-one-command/</link>
        <pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate>
        
        <guid>https://www.hleroy.com/2026/05/claudex-switch-claude-code-to-cheaper-providers-in-one-command/</guid>
        <description>&lt;img src="https://www.hleroy.com/2026/05/claudex-switch-claude-code-to-cheaper-providers-in-one-command/images/cover.png" alt="Featured image of post Claudex: switch Claude Code to cheaper providers in one command" /&gt;&lt;p&gt;The dreaded message now appears several times a day: &lt;em&gt;&amp;ldquo;You&amp;rsquo;ve reached your usage limit.&amp;rdquo;&lt;/em&gt; Opus 4.7 is so token-hungry that it burns through a Pro plan&amp;rsquo;s 5-hour window in about 30 minutes of actual coding. And when the limit hits mid-session, your only built-in option is Extra Usage — Anthropic&amp;rsquo;s pay-as-you-go credits at Opus API prices. Keep coding for a few more hours and you&amp;rsquo;re looking at a bill the size of a nice dinner. Every. Single. Time.&lt;/p&gt;
&lt;p&gt;So I built &lt;a class=&#34;link&#34; href=&#34;https://github.com/hleroy/claudex&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;&lt;strong&gt;Claudex&lt;/strong&gt;&lt;/a&gt; — a single-command provider switcher that makes switching as trivial as launching Claude Code itself.&lt;/p&gt;
&lt;h2 id=&#34;why-switch-providers&#34;&gt;Why switch providers?
&lt;/h2&gt;&lt;p&gt;The answer is simple: Opus 4.7 costs $25 per million output tokens. DeepSeek V4-Pro costs $3.48. That&amp;rsquo;s a &lt;strong&gt;7× gap&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;And DeepSeek backs it up. On SWE-bench Verified — the standard benchmark for real-world bug fixes — V4-Pro scores &lt;strong&gt;80.6%&lt;/strong&gt; to Opus 4.6&amp;rsquo;s 80.8%. On LiveCodeBench, it actually pulls ahead: &lt;strong&gt;93.5%&lt;/strong&gt; to 88.8%.&lt;/p&gt;
&lt;p&gt;Near-identical capability at one-seventh the price changes the mental math completely. Instead of rationing your session because you&amp;rsquo;re watching a meter tick up, you just keep coding.&lt;/p&gt;
&lt;p&gt;Let me be clear: Opus 4.7 is still the best. It plans better, it reasons through ambiguity better, and when you&amp;rsquo;re in uncharted territory it&amp;rsquo;s the one you want at the wheel. I&amp;rsquo;m not switching away from it — I&amp;rsquo;m switching &lt;em&gt;after&lt;/em&gt; it. The pattern that&amp;rsquo;s working incredibly well is: start the session with Opus, let it understand the problem and sketch the plan, then &lt;code&gt;claudex deepseek&lt;/code&gt; to execute. The plan survives the provider switch because Claude Code&amp;rsquo;s session context stays intact.&lt;/p&gt;
&lt;p&gt;This hybrid workflow means you&amp;rsquo;re never sitting there waiting for a limit window to reset just to finish what Opus already figured out. That alone is worth the price of admission.&lt;/p&gt;
&lt;h2 id=&#34;how-it-works&#34;&gt;How it works
&lt;/h2&gt;&lt;p&gt;Claudex writes to Claude Code&amp;rsquo;s own settings file — no wrapper scripts, no proxy, no daemon. It updates &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt;, &lt;code&gt;ANTHROPIC_API_KEY&lt;/code&gt;, and the model mappings for each tier, then launches Claude Code. The switch persists across terminal sessions.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;claudex deepseek    &lt;span class=&#34;c1&#34;&gt;# switch to DeepSeek V4 and launch&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;claudex             &lt;span class=&#34;c1&#34;&gt;# launch with current provider&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;API keys live in a separate file (&lt;code&gt;~/.config/claudex/credentials&lt;/code&gt;, &lt;code&gt;chmod 600&lt;/code&gt;), not mixed into INI config. Providers are configured in &lt;code&gt;~/.config/claudex/providers.ini&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Seven providers come pre-configured: Anthropic, DeepSeek, MiniMax, GLM, Kimi, Mistral, and Ollama. Adding a new one is two edits — a &lt;code&gt;[section]&lt;/code&gt; in &lt;code&gt;providers.ini&lt;/code&gt; and a line in &lt;code&gt;credentials&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;install&#34;&gt;Install
&lt;/h2&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl -fsSL https://raw.githubusercontent.com/hleroy/claudex/refs/heads/main/install.sh &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; bash
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The installer drops a symlink in &lt;code&gt;~/.local/bin/&lt;/code&gt; — just make sure that&amp;rsquo;s in your &lt;code&gt;PATH&lt;/code&gt;. After that, set your keys in &lt;code&gt;~/.config/claudex/credentials&lt;/code&gt; and you&amp;rsquo;re done.&lt;/p&gt;
&lt;h2 id=&#34;the-bottom-line&#34;&gt;The bottom line
&lt;/h2&gt;&lt;p&gt;Claude Code is the best AI coding tool I&amp;rsquo;ve used, and Opus 4.7 is the best model in it. I don&amp;rsquo;t want to leave either of them. But finishing what Opus planned shouldn&amp;rsquo;t require burning Opus tokens at Opus prices. Claudex lets you keep the best of both: Opus for the hard thinking, whichever provider fits your budget for the rest.&lt;/p&gt;
&lt;p&gt;The project is MIT-licensed at &lt;a class=&#34;link&#34; href=&#34;https://github.com/hleroy/claudex&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;github.com/hleroy/claudex&lt;/a&gt;. If you&amp;rsquo;ve been staring at the Extra Usage screen wondering if there&amp;rsquo;s a better way — you were right to wonder.&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
