claude-launcher

module
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2026 License: MIT

README ΒΆ

Claude Launcher

Comprehensive launcher for Claude Code with directory security, multi-account support, and session management.

Features

  • Directory Security: Only allows Claude Code to run in pre-configured directories
  • Multi-Account Support: Switch between multiple Claude accounts with arrow-key selection
  • Session Management: Prompts to continue previous session or start fresh
  • Flexible Configuration: Supports environment variables and JSON configuration file
  • Cross-platform: Works on Linux, macOS, and other POSIX-compatible systems

Installation

Download the latest release for your platform from the releases page

Automated Installation (Linux/macOS)

Install latest version.

curl -fsSL https://raw.githubusercontent.com/23prime/claude-launcher/main/install.sh | bash

Or with wget:

wget -qO- https://raw.githubusercontent.com/23prime/claude-launcher/main/install.sh | bash
Manual Installation

Linux/macOS:

# Download the appropriate binary for your platform
# Linux amd64
curl -LO https://github.com/23prime/claude-launcher/releases/latest/download/claude-launcher-linux-amd64.tar.gz
tar -xzf claude-launcher-linux-amd64.tar.gz

# macOS amd64 (Intel)
curl -LO https://github.com/23prime/claude-launcher/releases/latest/download/claude-launcher-darwin-amd64.tar.gz
tar -xzf claude-launcher-darwin-amd64.tar.gz

# macOS arm64 (Apple Silicon)
curl -LO https://github.com/23prime/claude-launcher/releases/latest/download/claude-launcher-darwin-arm64.tar.gz
tar -xzf claude-launcher-darwin-arm64.tar.gz

# Make executable and move to PATH
chmod +x claude-launcher-*
mv claude-launcher-* ~/.local/bin/claude-launcher

Windows:

Download the .zip file for your architecture from the releases page, extract it, and add the directory to your PATH.

Using go install
go install github.com/23prime/claude-launcher/cmd/claude-launcher@latest
From source
git clone https://github.com/23prime/claude-launcher
cd claude-launcher
mise run go-build
mv bin/claude-launcher ~/.local/bin/

Configuration

Configure allowed directories using one of these methods:

Method 1: Environment Variable (Priority 1)
export CLAUDE_SAFE_DIRS="$HOME/develop:$HOME/projects"
Method 2: Config File (Priority 2)

Create ~/.config/claude-launcher/config.json:

{
  "allowedDirs": [
    "/home/user/develop",
    "/home/user/projects"
  ]
}
Multi-Account Configuration (Optional)

Configure multiple Claude accounts to switch between different configurations (e.g., personal vs work accounts).

Method 1: Environment Variable
export CLAUDE_ACCOUNTS="Personal:~/.claude-personal,Work:~/.claude-work"

Format: Name1:ConfigDir1,Name2:ConfigDir2,...

Method 2: Config File

Add to ~/.config/claude-launcher/config.json:

{
  "allowedDirs": ["/home/user/develop"],
  "accounts": [
    {"name": "Personal", "configDir": "~/.claude-personal"},
    {"name": "Work", "configDir": "~/.claude-work"}
  ]
}

Note: When an account is selected, CLAUDE_CONFIG_DIR is set to the account's config directory before launching Claude Code.

Usage

Basic usage
# Check directory and launch Claude
claude-launcher

# Show help
claude-launcher --help

# Show configured directories
claude-launcher --show-dirs

# Show config file path and contents
claude-launcher --show-config

# Specify account by name (skips interactive selection)
claude-launcher --account Personal

# Pass arguments to Claude
claude-launcher --model opus
Command-line Options
Option Short Description
--help -h Show help message
--show-dirs -l Show configured allowed directories
--show-config -c Show configuration file path and contents
--version -v Show version information
--account -a Account name to use (skips interactive selection)
Example session

Without accounts configured:

$ cd ~/develop/myproject
$ claude-launcher
βœ“ Directory allowed

Continue previous Claude session?
  [Y/n] (default: y): y
β†’ Continuing previous session...

With multiple accounts configured (interactive selection):

$ cd ~/develop/myproject
$ claude-launcher
βœ“ Directory allowed

Select Claude account:
  πŸ‘‰ Personal (~/.claude-personal)
    Work (~/.claude-work)
βœ” Personal (~/.claude-personal)
βœ“ Account: Personal (~/.claude-personal)

Continue previous Claude session?
  [Y/n] (default: y): y
β†’ Continuing previous session...

With --account option (skips interactive selection):

$ claude-launcher --account Personal
βœ“ Directory allowed

βœ“ Account: Personal (~/.claude-personal)

Continue previous Claude session?
  [Y/n] (default: y): y
β†’ Continuing previous session...

When specified account is not found:

$ claude-launcher --account Unknown
βœ“ Directory allowed

⚠ Account 'Unknown' not found in configuration

Select Claude account:
  πŸ‘‰ Personal (~/.claude-personal)
    Work (~/.claude-work)

Development

This project uses mise for development.

Setup
# Install dependencies
mise install

# Run tests
mise run go-test

# Build
mise run go-build

# Run all checks
mise run check
Available Tasks
# List all available tasks
mise tasks

# Go-specific tasks
mise run go-build              # Build the application
mise run go-test               # Run tests
mise run go-test-cover         # Run tests with coverage
mise run go-lint               # Run golangci-lint
mise run go-vuln               # Check for vulnerabilities

Project Structure

claude-launcher/
β”œβ”€β”€ cmd/
β”‚   └── claude-launcher/   # Main application entry point
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ account/           # Multi-account configuration and selection
β”‚   β”œβ”€β”€ config/            # Configuration loading
β”‚   β”œβ”€β”€ security/          # Directory access checking
β”‚   β”œβ”€β”€ session/           # Session continuation prompts
β”‚   β”œβ”€β”€ launcher/          # Claude Code execution
β”‚   └── ui/                # User interface (colors, messages)
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ specification.md   # Detailed specification
β”‚   └── implementation-plan.md  # Implementation plan
└── mise.toml             # mise tool/task definitions

Documentation

License

This project is licensed under the MIT License - see the LICENSE file for details.

Directories ΒΆ

Path Synopsis
cmd
claude-launcher command
internal
ui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL