claude-code-profiles

skill
Guvenlik Denetimi
Basarisiz
Health Gecti
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 18 GitHub stars
Code Basarisiz
  • rm -rf — Recursive force deletion command in claude-profile.sh
Permissions Gecti
  • Permissions — No dangerous permissions requested
Purpose
This tool manages multiple, isolated Claude Code configuration profiles (including settings, credentials, and MCP servers). It allows you to quickly switch between different environments, such as work and personal accounts, without needing to log in and out.

Security Assessment
Overall Risk: Medium. The tool directly handles highly sensitive data, specifically your Claude credentials and configuration files. It operates by installing a shell wrapper that intercepts and executes your standard `claude` commands. While it does not request explicit dangerous permissions or contain hardcoded secrets, there are notable security concerns. First, the installation method relies on piping a remote script directly into your shell (`curl | sh`), which is an inherently risky practice that bypasses manual code review. Second, the automated scan detected a recursive force deletion command (`rm -rf`) within the script. If this command is improperly sanitized or encounters a path injection, it could lead to accidental data loss on your system.

Quality Assessment
The project appears to be actively maintained and uses the permissive MIT license. It has a small but present user base, sitting at 18 GitHub stars, which indicates a basic level of community trust and validation. However, it remains a relatively small and new project, meaning it has not undergone widespread, large-scale security auditing by the open-source community.

Verdict
Use with caution. The core functionality is useful, but you should review the installation script and deletion logic yourself before executing it to ensure the safety of your local file system.
SUMMARY

Manage multiple Claude Code configuration profiles. Switch between work, personal, and other accounts without logging in and out.

README.md

claude-profile

Manage multiple Claude Code configuration profiles. Switch between work and personal accounts, different MCP server setups, or separate settings without logging in and out.

Each profile is a complete, isolated Claude Code configuration directory (settings, credentials, MCP servers, CLAUDE.md, history -- everything). Once configured, claude automatically uses your active profile -- no special launch command needed.

Install

Linux / macOS / WSL:

curl -fsSL https://raw.githubusercontent.com/pegasusheavy/claude-code-profiles/main/install.sh | sh

Windows (PowerShell):

irm https://raw.githubusercontent.com/pegasusheavy/claude-code-profiles/main/install.ps1 | iex

The installer downloads the appropriate scripts and configures your shell. Restart your shell (or open a new terminal) after installing.

Quick Start

# Create profiles
claude-profile create work
claude-profile create personal

# Set a default
claude-profile default work

# Just use claude — it automatically uses your default profile
claude
claude --resume
claude -p "explain this code"

Commands

Command Description
claude-profile Show current profile status
claude-profile use <name> Switch to a profile for this session
claude-profile create <name> Create a new profile
claude-profile list List all profiles
claude-profile default [name] Get or set the default profile
claude-profile delete <name> Delete a profile (with confirmation)
claude-profile which [name] Show the config directory path
claude-profile help Show help

How It Works

Claude Code supports a CLAUDE_CONFIG_DIR environment variable that redirects where it stores configuration and data. claude-profile provides a claude() shell function that wraps the real claude binary:

  1. Before each invocation, the wrapper checks if a default profile exists and auto-sets CLAUDE_CONFIG_DIR.
  2. If CLAUDE_CONFIG_DIR is already set (e.g., via claude-profile use), it is used as-is.
  3. The real claude binary is then called with all your arguments.

This means you never need to think about profiles during normal use -- just run claude as you always have.

Session Override

To temporarily use a different profile in the current shell session:

# Temporarily use a different profile
claude-profile use personal
claude                          # uses "personal" for this shell session

The override lasts until you close the shell or run claude-profile use again.

Profile Storage

Profiles are stored in platform-appropriate locations:

Platform Location
Linux $XDG_DATA_HOME/claude-profiles/ (default: ~/.local/share/claude-profiles/)
macOS $XDG_DATA_HOME/claude-profiles/ (default: ~/.local/share/claude-profiles/)
Windows %LOCALAPPDATA%\claude-profiles\

Each profile directory is a complete Claude Code config directory. After creating a profile and launching Claude with it, Claude will populate it with settings.json, .credentials.json, and everything else it needs.

Profile Names

Profile names can contain letters, digits, hyphens, and underscores. Examples: work, personal, client-acme, side_project.

Platform Support

Script Platform Shell
claude-profile.sh Linux, macOS, WSL bash, zsh (sourced)
claude-profile-init.ps1 Windows, Linux, macOS PowerShell 5.1+ / pwsh 6+ (dot-sourced)
claude-profile.cmd Windows cmd.exe (use with call prefix)

Manual Install

If you prefer not to use the install scripts:

Linux / macOS:

# Download
mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}/claude-profile"
curl -fsSL https://raw.githubusercontent.com/pegasusheavy/claude-code-profiles/main/claude-profile.sh \
  -o "${XDG_DATA_HOME:-$HOME/.local/share}/claude-profile/claude-profile.sh"

# Add to shell profile (.bashrc or .zshrc)
echo '. "${XDG_DATA_HOME:-$HOME/.local/share}/claude-profile/claude-profile.sh"' >> ~/.bashrc

Windows (PowerShell):

$dir = "$env:LOCALAPPDATA\claude-profile"
New-Item -ItemType Directory -Force -Path $dir | Out-Null
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/pegasusheavy/claude-code-profiles/main/claude-profile-init.ps1" -OutFile "$dir\claude-profile-init.ps1"
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/pegasusheavy/claude-code-profiles/main/claude-profile.cmd" -OutFile "$dir\claude-profile.cmd"
# Add to PowerShell profile
Add-Content -Path $PROFILE -Value ". '$dir\claude-profile-init.ps1'"
# Add to PATH for cmd.exe
$path = [Environment]::GetEnvironmentVariable('Path', 'User')
if ($path -notlike "*$dir*") { [Environment]::SetEnvironmentVariable('Path', "$path;$dir", 'User') }

License

MIT

Yorumlar (0)

Sonuc bulunamadi