klaudes 0.1.1

CLI tool for managing multiple Anthropic API configurations
# klaudes

CLI tool for managing multiple Anthropic API configurations

## Features

- Manage multiple API configuration groups (name, API host, API key)
- Interactive mode for easy management
- Direct CLI commands for scripting and automation
- Secure configuration storage with restricted file permissions
- Environment variable activation for selected configurations

## Usage

### Interactive Mode

When you run `klaudes account` without subcommands or with the `-i` flag, you'll enter an interactive menu:

```bash
# Enter interactive mode
klaudes account

# Or explicitly request interactive mode
klaudes account -i
klaudes account --interactive
```

The interactive menu will show options like:
- Add a new configuration group
- Remove a configuration group (if groups exist)
- Edit a configuration group (if groups exist)
- List all configuration groups
- Exit

### Direct CLI Commands

For scripting and automation, you can use direct commands:

```bash
# List all configuration groups
klaudes account list

# Add a new configuration group (interactive prompts)
klaudes account add

# Remove a configuration group
klaudes account remove <group-name>

# Edit an existing configuration group
klaudes account edit <group-name>
```

### Main Command

Select and activate a configuration group:

```bash
# Interactive selection of available groups
klaudes
```

## Configuration

Configuration is stored in `~/.config/klaudes/config.toml` with secure file permissions (0600).

Each configuration group contains:
- `api_host`: The ANTHROPIC_BASE_URL value
- `api_key`: The ANTHROPIC_AUTH_TOKEN value

## Environment Variables

When you select a configuration group, the following environment variables are set:
- `ANTHROPIC_BASE_URL`
- `ANTHROPIC_AUTH_TOKEN`

## Build and Install

```bash
# Build
cargo build --release

# Install locally
cargo install --path .

# Run from source
cargo run
```

## Examples

```bash
# Interactive account management
klaudes account

# Direct command to list configurations
klaudes account list

# Direct command to add a new configuration
klaudes account add

# Select and activate a configuration
klaudes
```