An npm-based CLI tool manager that supports installing, updating, and uninstalling various programming tools through an interactive menu.
- π§ Manage installation, updates, and uninstallation of multiple CLI tools
- π¦ npm-based package management
- π― Interactive command-line interface
- π User configuration files stored in
~/.clibundle
directory - π Support for batch operations
- π€ AI profiles and model switching with reusable multi-tool mappings
npm install -g clibundle
Before first use, you need to initialize the configuration file:
clibundle init
This will create a .clibundle
directory and a default tools.json
configuration file in your home directory.
Run the command directly to start the interactive menu:
clibundle
# Show help information
clibundle --help
# Show version number
clibundle --version
# Initialize configuration file
clibundle init
# List all available tools with their installation status
clibundle list
# Install a specific tool
clibundle install <tool-name>
# Install all available tools
clibundle install --all
# Update a specific tool
clibundle update <tool-name>
# Update all installed tools
clibundle update --all
# Uninstall a specific tool
clibundle uninstall <tool-name>
# Uninstall all installed tools
clibundle uninstall --all
Initialize AI configuration (creates ~/.clibundle/ai.json
with defaults):
clibundle ai:init
List AI profiles and configured targets:
clibundle ai:list
Switch active AI profile:
clibundle ai:switch <profile-name>
Apply active/selected profile values (api base, model, etc.) to target config files:
# apply active profile to all targets
clibundle ai:apply
# apply a specific profile
clibundle ai:apply --profile anthopic-claude-3-5-sonnet
# apply to a single target by name/toolId
clibundle ai:apply --target openai-node-sdk
The configuration file is located at ~/.clibundle/tools.json
with the following format:
{
"version": "1.0.0",
"description": "CLI Bundle tools configuration file",
"tools": [
{
"id": "claude-code",
"name": "Claude Code",
"command": "claude",
"installType": "npm",
"packageName": "@anthropic-ai/claude-code",
"description": "Anthropic official Claude CLI tool",
"enabled": true
},
{
"id": "iflow-cli",
"name": "iFlow CLI",
"command": "iflow",
"installType": "npm",
"packageName": "@iflow-ai/iflow-cli",
"description": "iFlow AI CLI tool",
"enabled": true
},
{
"id": "openai-codex",
"name": "OpenAI Codex",
"command": "codex",
"installType": "npm",
"packageName": "@openai/codex",
"description": "OpenAI Codex CLI tool for code generation",
"enabled": true
},
{
"id": "google-gemini",
"name": "Google Gemini CLI",
"command": "gemini",
"installType": "npm",
"packageName": "@google/gemini-cli",
"description": "Google Gemini AI CLI tool",
"enabled": true
}
]
}
id
: Unique identifier for the toolname
: Display name of the toolcommand
: Command-line command nameinstallType
: Installation type (currently supports "npm")packageName
: npm package namedescription
: Tool descriptionenabled
: Whether the tool is enabled
Location: ~/.clibundle/ai.json
Just configure providers and the active one:
{
"version": "2.0.0",
"providers": [
{
"name": "OpenAI Official",
"type": "openai",
"apiKey": "${OPENAI_API_KEY}",
"baseUrl": "https://api.openai.com/v1",
"model": "gpt-4o-mini"
},
{
"name": "Anthropic Official",
"type": "anthropic",
"apiKey": "${ANTHROPIC_API_KEY}",
"baseUrl": "https://api.anthropic.com",
"model": "claude-3-5-sonnet-latest"
},
{
"name": "Google Gemini",
"type": "google",
"apiKey": "${GEMINI_API_KEY}",
"model": "gemini-1.5-pro"
},
{
"name": "iFlow Official",
"type": "iflow",
"apiKey": "${IFLOW_API_KEY}",
"baseUrl": "https://api.iflow.cn/v1",
"model": "iflow-default"
}
],
"active": "OpenAI Official"
}
- providers: List of AI providers, each contains:
name
: Provider name (custom)type
: Provider type (openai
/anthropic
/google
/iflow
)apiKey
: API key, supports${ENV_VAR}
syntaxbaseUrl
: API base URLmodel
: Model name
- active: Currently active provider name
The tool automatically configures corresponding CLI tools based on provider.type
:
openai
β Auto-configure~/.codex/auth.json
and~/.codex/config.toml
anthropic
β Auto-configure~/.claude/settings.json
google
β Auto-configure~/.gemini/settings.json
iflow
β Auto-configure~/.iflow/settings.json
- Set environment variable (Windows PowerShell):
$env:OPENAI_API_KEY = "sk-..."
- Switch provider:
clibundle ai:switch "OpenAI Official"
- Apply configuration:
clibundle ai:apply
Automatically writes to these configuration files:
-
OpenAI Codex: Reference CC Switch
~/.codex/auth.json
~/.codex/config.toml
-
Claude Code: Reference CC Switch
~/.claude/settings.json
-
iFlow CLI: Reference iFlow Configuration
~/.iflow/settings.json
-
Google Gemini CLI: Reference Gemini CLI Configuration
~/.gemini/settings.json
To add custom mappings or support other tools, add customTargets
field:
{
"customTargets": [
{
"type": "json",
"path": "~/custom/path/config.json",
"mapping": {
"apiKey": "auth.key",
"baseUrl": "api.endpoint"
}
}
]
}
# Clone repository
git clone <repository-url>
cd clibundle
# Install dependencies
npm install
# Link to global
npm link
# Run
clibundle
clibundle/
βββ bin/
β βββ clibundle.js # CLI entry file
βββ lib/
β βββ config.js # Configuration file handling
β βββ init.js # Initialization management
β βββ package-manager.js # Package manager operations
β βββ ui.js # User interface
β βββ utils.js # Utility functions
βββ config/
β βββ tools.json # Default tools configuration file
βββ package.json # Project configuration
βββ README.md # Project documentation
MIT