@xieyongfeng/rack-cli
Version:
An integrated mainstream LLM CLI tool manager with unified configuration, supporting quick installation, configuration, and launching of LLM CLI tools.
94 lines (68 loc) β’ 2.79 kB
Markdown
# Rack-CLI
[δΈζη](README_zh.md)
> An integrated mainstream LLM CLI tool manager with unified configuration, supporting quick installation, configuration, and launching of LLM CLI tools.
## π¦ Supported CLI Tools
| CLI Tool | Command | NPM Package | Description |
|----------|---------|-------------|-------------|
| Claude Code | `rack claude` | -ai/claude-code, /claude-code-router | claude-code, Powerful claude-code-router request router proxy |
| iFlow CLI | `rack iflow` | -ai/iflow-cli | Command-line tool for iFlow AI |
| Qwen Code | `rack qwen` | -code/qwen-code | Qwen code assistant |
| Easy LLM CLI | `rack elc` | easy-llm-cli | Simple LLM command-line tool |
## β¨ Features
- **Unified Entry**: Manage and launch multiple LLM CLI tools through a single `rack` command
- **Auto Installation**: Automatically detect and install missing CLI tools without manual installation
- **Unified Configuration**: Provide consistent configuration interface supporting various LLM service providers
- **Multi-tool Support**: Support mainstream tools like Claude Code Router, iFlow CLI, Qwen Code, Easy LLM CLI, etc.
- **Environment Management**: Automatically set appropriate environment variables for different CLI tools
## π Getting Started
### 1. Installation
```shell
npm install -g /rack-cli
```
### 2. Configuration
Create a configuration file `~/.rack-cli/config.json`:
> **Using API keys from OpenAI or other compatible providers:**
```json
{
"api_url": "https://openrouter.ai/api/v1",
"api_key": "sk-xxx",
"model": "claude-sonnet-4"
}
```
Configuration parameters:
- `api_url`: Base URL of the LLM API service
- `api_key`: API key
- `model`: Model name to use
### 3. Usage
List all available CLI tools:
```shell
rack list
```
Launch specific CLI tools:
```shell
rack claude # Launch Claude Code Router
rack iflow # Launch iFlow CLI
rack qwen # Launch Qwen Code
rack elc # Launch Easy LLM CLI
```
## Project Structure
```
src/
βββ cli.ts # Main CLI entry
βββ constants.ts # Constants definition
βββ llm-cli/ # LLM CLI tool implementations
β βββ BaseLLMCli.ts # Base class
β βββ index.ts # Tool registration
β βββ claude-code/ # Claude Code Router
β βββ iflow-cli/ # iFlow CLI
β βββ qwen-code/ # Qwen Code
β βββ easy-llm-cli/ # Easy LLM CLI
βββ utils/
βββ config.ts # Configuration management
```
## π License
MIT License
## π€ Contributing
Issues and Pull Requests are welcome!
## π Support
If you encounter any issues or have suggestions, please submit an Issue on GitHub.