cckit 0.1.0

Code Kit Written by rust for Claude model Switch, Support 智普LLM, MiniMax, Kimi 提供的 Claude model
# cckit

Code Kit Written in Rust for Claude Model Switching - Support 智普LLM, MiniMax, Kimi 提供的 Claude model

A CLI tool for managing and switching between different Claude model providers and their configurations.

## Features

- **Multiple Provider Support**: Configure and switch between 智普LLM, MiniMax, Kimi, and official Claude
- **Easy Configuration**: Simple command-line interface for managing API keys and settings
- **Claude Integration**: Automatically updates Claude Code configuration files
- **Export/Import**: Backup and restore your provider configurations
- **Connection Testing**: Verify provider connectivity before switching

## Installation

```bash
# Clone the repository
git clone https://github.com/your-username/cckit.git
cd cckit

# Build the CLI
cargo build --release

# The binary will be available at target/release/cckit
```

## Usage

### Basic Commands

```bash
# Show help
cckit --help

# List all configured providers
cckit list

# Show current active provider
cckit current

# Configure a provider
cckit configure <provider> --api-key <key> [--model <model>] [--base-url <url>]

# Switch to a provider
cckit switch <provider>

# Show provider configuration
cckit show <provider>

# Test provider connection
cckit test <provider>
```

### Supported Providers

#### 智普LLM (Zhipu)
```bash
# Configure 智普LLM
cckit configure zhipu --api-key "your-api-key" --model "GLM-4.6"

# Switch to 智普LLM
cckit switch zhipu
```

#### MiniMax
```bash
# Configure MiniMax
cckit configure minimax --api-key "your-api-key" --model "MiniMax-M2"

# Switch to MiniMax
cckit switch minimax
```

#### Kimi (Moonshot)
```bash
# Configure Kimi
cckit configure kimi --api-key "your-api-key" --model "kimi-for-coding"

# Switch to Kimi
cckit switch kimi
```

#### Claude (Official)
```bash
# Configure Claude (official)
cckit configure claude --api-key "sk-ant-api03-your-key" --model "claude-3-5-sonnet-20241022"

# Switch to Claude
cckit switch claude
```

### Advanced Commands

```bash
# Export configuration to file
cckit export --output backup.json

# Import configuration from file
cckit import backup.json

# Reset to default Claude configuration
cckit reset
```

## Configuration

The CLI stores configurations in `~/.cckit/config.json` and updates Claude's settings in `~/.claude/settings.json`.

### Provider Details

| Provider | Default Model | Default Base URL | Auth Method | Capabilities |
|----------|---------------|------------------|-------------|--------------|
| 智普LLM | GLM-4.6 | https://open.bigmodel.cn/api/anthropic | ANTHROPIC_AUTH_TOKEN | Chat, Code Generation, Chinese Support |
| MiniMax | MiniMax-M2 | https://api.minimaxi.com/anthropic | ANTHROPIC_AUTH_TOKEN | Chat, Code Generation, Multi-language |
| Kimi | kimi-for-coding | https://api.kimi.com/coding/ | ANTHROPIC_API_KEY | Chat, Long Context, Code Generation |
| Claude | claude-3-5-sonnet-20241022 | Official | ANTHROPIC_API_KEY | Chat, Code Generation, Analysis, Multimodal |

## How It Works

1. **Configuration Management**: Stores provider settings in `~/.cckit/config.json`
2. **Claude Integration**: Updates Claude's `settings.json` with environment variables
3. **Switching**: Changes the active provider and updates Claude's configuration
4. **Testing**: Sends test messages to verify provider connectivity

## Requirements

- Rust 1.70 or higher
- Claude Code installed
- Valid API keys for the providers you want to use

## Development

```bash
# Install dependencies
cargo build

# Run tests
cargo test

# Check formatting
cargo fmt --check

# Run clippy
cargo clippy

# Build release version
cargo build --release
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests if applicable
5. Submit a pull request

## Support

If you encounter any issues or have questions, please open an issue on the GitHub repository.