<?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: Pasindu Premachandra</title>
    <description>The latest articles on DEV Community by Pasindu Premachandra (@pasindu_g).</description>
    <link>https://dev.to/pasindu_g</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%2F4214284%2F27c0e5d7-cff6-47b8-b8bd-7bf28ab3b472.jpg</url>
      <title>DEV Community: Pasindu Premachandra</title>
      <link>https://dev.to/pasindu_g</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pasindu_g"/>
    <language>en</language>
    <item>
      <title>Switch Claude Code accounts without logging out: why I built crewrota</title>
      <dc:creator>Pasindu Premachandra</dc:creator>
      <pubDate>Thu, 29 Oct 2026 04:42:30 +0000</pubDate>
      <link>https://dev.to/pasindu_g/switch-claude-code-accounts-without-logging-out-why-i-built-crewrota-3o36</link>
      <guid>https://dev.to/pasindu_g/switch-claude-code-accounts-without-logging-out-why-i-built-crewrota-3o36</guid>
      <description>&lt;p&gt;&lt;strong&gt;Short answer:&lt;/strong&gt; you don't have to log out. Claude Code keeps its settings and history in one config folder, &lt;code&gt;~/.claude&lt;/code&gt; by default, and the &lt;code&gt;CLAUDE_CONFIG_DIR&lt;/code&gt; variable points it at another one. Give each account its own folder and both stay signed in, side by side. crewrota is a free, open source CLI that sets this up for you and adds your setup, shared history and a usage view on top.&lt;/p&gt;

&lt;p&gt;I'm a software engineer. During the day I use Claude Code for my job, and in the evenings and at weekends I use it for my own projects. Those are two different Claude logins, and for a while that was more annoying than it should have been.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem: one login at a time
&lt;/h2&gt;

&lt;p&gt;By default, Claude Code runs as one login at a time on a machine. Switching from my work login to my own meant this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;/logout&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Sign in again with the other account in the browser.&lt;/li&gt;
&lt;li&gt;Find the folder and the session I was in, and get my head back into the task.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of these steps is hard. But when you switch often, it adds up, and you lose your train of thought every time.&lt;/p&gt;

&lt;p&gt;There was a second problem. Each login keeps its own history, so &lt;code&gt;--resume&lt;/code&gt; on one account could not find a session I had started on the other. The work was split in two places.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to switch Claude Code accounts without logging out
&lt;/h2&gt;

&lt;p&gt;Claude Code reads an environment variable called &lt;code&gt;CLAUDE_CONFIG_DIR&lt;/code&gt;. The &lt;a href="https://code.claude.com/docs/en/env-vars" rel="noopener noreferrer"&gt;Claude Code docs&lt;/a&gt; describe it like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Override the configuration directory (default: &lt;code&gt;~/.claude&lt;/code&gt;). All settings, session history, and plugins are stored under this path."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The same page calls it "useful for running multiple accounts side by side". Give each login its own folder, and each one stays signed in. Two terminals, two accounts, at the same time.&lt;/p&gt;

&lt;p&gt;You can do it by hand:&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="nv"&gt;CLAUDE_CONFIG_DIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;~/.claude-work claude
&lt;span class="nv"&gt;CLAUDE_CONFIG_DIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;~/.claude-personal claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That works, and it is what crewrota is built on. But by hand you lose three things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Your setup.&lt;/strong&gt; Your skills, agents, commands, plugins, settings and &lt;code&gt;CLAUDE.md&lt;/code&gt; live in &lt;code&gt;~/.claude&lt;/code&gt;. A new folder starts empty.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your history.&lt;/strong&gt; Each folder keeps its own sessions, so they are still split.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The overview.&lt;/strong&gt; Nothing tells you which login has usage left before you start.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What crewrota adds
&lt;/h2&gt;

&lt;p&gt;crewrota is a small command-line tool around that variable. Each login is a crew member, with its own folder.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;crew add work&lt;/code&gt; creates a member and opens Claude Code's own login for it.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;crew&lt;/code&gt; opens a menu. Pick a member, its model and effort, and Claude Code starts as that login. Your main &lt;code&gt;~/.claude&lt;/code&gt; login is never touched.&lt;/li&gt;
&lt;li&gt;Your skills, agents, commands, plugins, settings and &lt;code&gt;CLAUDE.md&lt;/code&gt; from &lt;code&gt;~/.claude&lt;/code&gt; reach every member. crewrota only reads them.&lt;/li&gt;
&lt;li&gt;Members on the same ship share history, so &lt;code&gt;--resume&lt;/code&gt; in one member finds a session started in another.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;crew quota&lt;/code&gt; shows every member's 5-hour and weekly usage on one screen, and &lt;code&gt;crew widget&lt;/code&gt; puts the same bars on your desktop.&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%2Fshzwo9gaufskuq7wv6yr.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%2Fshzwo9gaufskuq7wv6yr.png" alt="The crew menu with a demo crew: three members with their 5-hour and week bars, then the ship, model and effort on one line" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To try it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; crewrota
crew add work
crew add personal
crew
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You need Node 22.19 or newer and Claude Code. Windows is the main platform, and macOS is in beta.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your accounts and Anthropic's terms
&lt;/h2&gt;

&lt;p&gt;crewrota is for one person using their own Claude subscriptions. Each member logs in through Claude Code's own login, and crewrota never reads, copies or moves credentials. It runs the real &lt;code&gt;claude&lt;/code&gt; program; nothing goes through a proxy.&lt;/p&gt;

&lt;p&gt;Read Anthropic's &lt;a href="https://www.anthropic.com/legal/consumer-terms" rel="noopener noreferrer"&gt;Consumer Terms&lt;/a&gt; and &lt;a href="https://www.anthropic.com/legal/aup" rel="noopener noreferrer"&gt;Usage Policy&lt;/a&gt; for your plan before you use more than one account.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions about crewrota
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Can I use two Claude Code accounts at the same time?&lt;/strong&gt;&lt;br&gt;
Yes. Give each account its own config folder with &lt;code&gt;CLAUDE_CONFIG_DIR&lt;/code&gt; and start each one in its own terminal. Claude Code's docs call the variable useful for running multiple accounts side by side.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does crewrota change my main Claude Code login?&lt;/strong&gt;&lt;br&gt;
No. It only reads your main &lt;code&gt;~/.claude&lt;/code&gt; folder, to share your setup with each member. Your main login is never touched.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where do the logins live?&lt;/strong&gt;&lt;br&gt;
Each one sits in that member's own folder, put there by Claude Code's own login. crewrota never reads or copies them, and &lt;code&gt;crew backup&lt;/code&gt; leaves them out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is crewrota free?&lt;/strong&gt;&lt;br&gt;
Yes. crewrota is open source under the MIT license, on &lt;a href="https://www.npmjs.com/package/crewrota" rel="noopener noreferrer"&gt;npm&lt;/a&gt; and &lt;a href="https://github.com/pasindu-premachandra/crewrota" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;. Windows is the main platform, and macOS is in beta.&lt;/p&gt;

&lt;p&gt;It's the setup I use every day. If you try it, I'd like to hear what breaks: open an issue on &lt;a href="https://github.com/pasindu-premachandra/crewrota/issues" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>claudecode</category>
      <category>cli</category>
      <category>opensource</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
