npm package: @shi_zhen/code-helper
Description: Code Helper - A unified tool to manage your Claude Code
Author: shirenchuang
Latest version: 0.1.6

# Code Helper

> 🚀 A unified CLI tool to manage your Claude Code - from installation to configuration, marketplace to MCP servers.

[![npm version](https://img.shields.io/npm/v/@shi_zhen/code-helper.svg)](https://www.npmjs.com/package/@shi_zhen/code-helper)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Node.js Version](https://img.shields.io/node/v/code-helper.svg)](https://nodejs.org)

## 📦 Installation

```bash
npm install -g @shi_zhen/code-helper
```

## ✨ Features

- 🔐 **Authorization Management** - Support for Claude API, GLM AI, Kimi AI and custom API keys
- 📦 **Plugin Marketplace** - Browse, install, and update plugins from configured marketplaces
- 🔌 **MCP Server Management** - Manage and configure MCP (Model Context Protocol) servers
- ⚙️ **Configuration Management** - Centralized management of .claude.json and related settings
- 🗑️ **Uninstall Utility** - Complete removal of Claude CLI and all configurations
- 🌐 **Web UI Integration** - Launch Claude Code UI with a single command
- 📝 **Profile Management** - Save and switch between multiple API configurations

## 🚀 Usage

```bash
# Launch the interactive menu
code-helper

# Or use the short alias
ch
```

## 📚 Main Menu Options

1. **Authorization Configuration** - Set up your API keys and authentication
2. **Plugin Marketplace** - Browse and install plugins
3. **MCP Server Management** - Configure MCP servers
4. **Configuration Management** - View and edit settings
5. **Uninstall** - Remove Claude CLI and configurations

## 🔐 Authorization

Supported authentication methods:

- **Claude API** (Recommended) - Official Anthropic API
- **GLM AI** - Zhipu AI platform
- **Kimi AI** - Moonshot AI platform
- **Custom API** - Manual API key input with custom base URL

### Getting Started with Claude API

1. Visit [Anthropic Console](https://console.anthropic.com/settings/keys)
2. Create or copy your API key
3. Run `code-helper` and select "Authorization Configuration"
4. Choose "Claude API" and paste your key

## 📦 Plugin Marketplace

- Browse plugins from configured marketplace sources
- Install and update plugins with a single command
- View installed plugins and their versions
- **Configuration**: Edit `config/markets.json` to add your own marketplaces

Example `markets.json`:
```json
{
  "version": "1.0.0",
  "markets": [
    {
      "name": "my-marketplace",
      "source": "https://github.com/org/marketplace.git",
      "description": "My custom plugin marketplace",
      "category": "custom",
      "recommended": true
    }
  ]
}
```

## 🔌 MCP Server Management

- Browse recommended MCP servers
- One-click installation for common MCP servers
- Manage installed MCP server configurations
- **Configuration**: Edit `config/mcpServers.json` to add custom servers

Example `mcpServers.json`:
```json
{
  "version": "1.0.0",
  "mcpServers": [
    {
      "id": "my-server",
      "name": "My MCP Server",
      "description": "Custom MCP server",
      "transport": "http",
      "url": "https://my-server.com/mcp",
      "category": "custom"
    }
  ]
}
```

## ⚙️ Configuration Management

- View current Claude configuration
- Edit `.claude.json` settings
- Manage multiple API profiles
- Switch between different configurations

## 🌐 Web UI

Launch the Claude Code UI interface:

```bash
npx @siteboon/claude-code-ui
```

Or select "Launch Web UI" from the main menu.

## 🗑️ Uninstall

Complete removal of Claude CLI and all associated files:
- Claude CLI binary
- Configuration files (`~/.claude.json`)
- Cache and data directories
- Plugin marketplaces and installations

## 📁 Project Structure

```
code-helper/
├── src/
│   ├── cli/              # CLI implementation
│   │   ├── config/       # Configuration and constants
│   │   ├── menus/        # Interactive menus
│   │   ├── services/     # Business logic services
│   │   ├── types/        # TypeScript type definitions
│   │   ├── ui/           # UI components and themes
│   │   └── utils/        # Utility functions
│   └── index.ts          # Entry point
├── config/
│   ├── markets.json      # Marketplace configuration
│   └── mcpServers.json   # MCP servers configuration
└── bin/
    └── code-helper.js    # Executable script
```

## 🛠️ Development

```bash
# Install dependencies
npm install

# Development mode with hot reload
npm run dev

# Build for production
npm run build

# Run linter
npm run lint

# Run tests
npm test
```

## 🔧 Building from Source

```bash
# Clone the repository
git clone https://github.com/shirenchuang/code-helper.git
cd code-helper

# Install dependencies
npm install

# Build the project
npm run build

# Link for local testing
npm link
```

## 📝 Configuration Files

### Markets Configuration (`config/markets.json`)

Define your plugin marketplaces. Each marketplace should be a Git repository containing a `.claude-plugin/marketplace.json` file.

### MCP Servers Configuration (`config/mcpServers.json`)

Define available MCP servers. Supports both HTTP and STDIO transport types.

## 🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## 📄 License

MIT © [shirenchuang](https://github.com/shirenchuang)

## 🙏 Acknowledgments

- Built with [Claude](https://www.anthropic.com/claude) by Anthropic
- Inspired by the Claude Code community
- Thanks to all contributors

---

**Note**: This tool is not officially affiliated with Anthropic. It's a community project to help manage Claude Code installations and configurations.