0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

複数のClaudeアカウントを同時並行で使う方法

0
Posted at

背景・問題

複数のClaudeアカウントを持っているが、同時に並行で使う方法が基本機能として提供されていない。
ターミナルを複数開いてclaudeを使っているときに、1つのターミナルでアカウントを切り替えると、すべてのターミナルでそのアカウントに切り替わってしまう・・・。

前提

  • ターミナルでclaudeコマンドを使っている前提です
  • シェルはfish。bashなどでも可能だと思いますが、私が使っているのはfishなのでfishの方法のみ載せています

解決方法

CLAUDE_CONFIG_DIR環境変数で、サブアカウントのコンフィグディレクトリーを別にして利用する。
2アカウントだけでなく3つ以上も可能だと思います(私は2つまでしか試していませんが論理的には増やせるはず)。

# サブアカウント用の設定ファイルディレクトリーを作成
$ mkdir -p ~/.claude-sub

# このディレクトリーを使うエイリアスを登録
$ vi ~/.config/fish/config.fish
# alias claude-sub='env CLAUDE_CONFIG_DIR=~/.claude-sub claude' を追加

# 一回シェルを起動し直して、使いたいディレクトリーで以下を実行
$ claude-sub
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?