Skip to content

mfzzf/ClaudeDeploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

34 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ClaudeDeploy ๐Ÿš€

npm version License: MIT Node.js Version

Universal Claude Code installer - works on your computer and remote servers

ไธญๆ–‡ๆ–‡ๆกฃ | English

โœจ Features

  • ๐ŸŽจ Web UI with Real-time Logging - Beautiful interface with live command output streaming
  • ๐Ÿ–ฅ๏ธ Local Installation - Install Claude Code directly on Windows/macOS/Linux
  • ๐Ÿ” Remote Installation - SSH to any server with zero-config authentication
  • ๐Ÿ“ฆ Auto Dependencies - Node.js/npm installation if missing
  • ๐Ÿš€ One-Command Setup - Install Claude Code and Claude Code Router globally
  • โš™๏ธ Config Migration - Optional config copying for remote servers
  • โœ… Installation Verification - Verify both tools are properly installed
  • ๐ŸŽฏ Universal Support - Works on any platform with Node.js
  • ๐ŸŒ Auto-Browser Launch - UI automatically opens in your default browser
  • ๐Ÿ“Š WebSocket Real-time Updates - See every command and its output as it happens

๐Ÿš€ Quick Start

Installation

# Install globally via npm
npm install -g claudedeploy

# Or install locally
git clone https://github.com/mfzzf/claudedeploy.git
cd claudedeploy
npm install
npm link

Usage Examples

๐ŸŽจ Web UI (Recommended)

# Start the interactive web interface
claudedeploy ui

# Use custom port
claudedeploy ui --port 3000

# Access the UI in your browser
# Default: http://localhost:3456

Web UI Features:

  • ๐Ÿ“Š Visual Interface - Modern, responsive design with intuitive navigation
  • ๐Ÿ”ง Easy Configuration - Form-based inputs with validation and helpful hints
  • ๐Ÿ“œ Installation History - Track all installations with status, duration, and logs
  • ๐Ÿ’ป Real-time Console - Live streaming of command output via WebSocket
  • ๐ŸŒ Auto-Browser Launch - Automatically opens UI in your default browser
  • ๐Ÿ”„ WebSocket Connection - Bi-directional communication for instant updates
  • ๐ŸŽจ Beautiful Design - Large fonts, gradient backgrounds, smooth animations
  • ๐Ÿ“ก Live Command Logs - See every npm install, version check, and verification
  • โฑ๏ธ Timestamped Entries - Each log shows exact time of execution
  • ๐Ÿ”ด Color-coded Output - Green for success, red for errors, yellow for warnings

๐Ÿ–ฅ๏ธ Local Installation (Your Computer)

# Install Claude Code on your local computer
claudedeploy --local

# Install with OpenAI config generation
claudedeploy --local --openai-key YOUR_API_KEY

# Install with custom OpenAI-compatible URL
claudedeploy --local --openai-key YOUR_API_KEY --openai-url https://your-api-domain.com

# Install with Chinese npm registry
claudedeploy --local --registry https://registry.npmmirror.com

# Works on Windows, macOS, and Linux

๐Ÿ” Remote Installation (SSH Servers)

# Install on remote Ubuntu/CentOS server
claudedeploy -h your-server.com -u username

# Use SSH key authentication
claudedeploy -h 192.168.1.100 -u ubuntu -k ~/.ssh/id_rsa

# Use password authentication
claudedeploy -h example.com -u ubuntu -p yourpassword

# Custom port
claudedeploy -h server.com -u ubuntu --port 2222

# Skip config copying
claudedeploy -h server.com -u ubuntu --skip-config

# Use Chinese npm registry (Taobao)
claudedeploy -h server.com -u ubuntu --registry https://registry.npmmirror.com

โš™๏ธ OpenAI Config Generation

# Generate config.json with OpenAI API key
claudedeploy --generate-config --openai-key YOUR_API_KEY

# Generate with custom OpenAI-compatible URL
claudedeploy --generate-config --openai-key YOUR_API_KEY --openai-url https://your-api-domain.com

UCloud Config Generation

# Generate config.json with UCloud API key (defaults to https://api.modelverse.cn)
claudedeploy --generate-config --ucloud-key YOUR_UCLOUD_KEY

# Specify custom UCloud base URL
claudedeploy --generate-config --ucloud-key YOUR_UCLOUD_KEY --ucloud-url https://api.modelverse.cn

# Generate a combined config for OpenAI + UCloud
claudedeploy --generate-config --openai-key OPENAI_KEY --ucloud-key UCLOUD_KEY

Local Installation with Config Generation

# Local install + generate UCloud config (models fetched from https://api.modelverse.cn)
claudedeploy --local --ucloud-key YOUR_UCLOUD_KEY

# Local install + generate OpenAI config
claudedeploy --local --openai-key YOUR_OPENAI_KEY

# Local install + combined providers
claudedeploy --local --openai-key OPENAI_KEY --ucloud-key UCLOUD_KEY

First-time Setup Tip

If this is your first time installing Claude Code and ccr code gets stuck on the Claude login screen, run the following once, then exit and try again:

# macOS / Linux
ANTHROPIC_AUTH_TOKEN=token claude

# Then exit the `claude` CLI and run:
ccr code

๐Ÿ“‹ Command Line Options

Web UI

Option Description Required
ui Start the web-based UI server โœ…
--port <port> Port to run UI server on (default: 3456) โŒ
--no-open Do not automatically open browser โŒ

Local Installation

Option Description Required
--verbose Enable verbose output โŒ
--dry-run Print commands without executing them โŒ
--local Install on this local computer โœ…
--openai-key <key> OpenAI API key for config generation โŒ
--openai-url <url> OpenAI base URL (default: https://api.openai.com) โŒ
--registry <registry> npm registry URL (e.g., https://registry.npmmirror.com) โŒ

Remote Installation

Option Description Required
-h, --host <host> Remote server hostname or IP โœ…
-u, --username <username> SSH username โœ…
-p, --password <password> SSH password โŒ
-k, --key <path> SSH private key file path โŒ
--passphrase <passphrase> SSH key passphrase โŒ
--port <port> SSH port (default: 22) โŒ
--skip-config Skip copying config.json (for remote installation) โŒ
--registry <registry> npm registry URL (e.g., https://registry.npmmirror.com) โŒ
--user-install Install without sudo (user-level global) โŒ

OpenAI Config Generation

Option Description Required
--generate-config Generate OpenAI config.json with API key โœ…
--openai-key <key> OpenAI API key for config generation โœ…
--openai-url <url> OpenAI base URL (default: https://api.openai.com) โŒ

๐Ÿ”ง What It Does

Security Notes

  • Avoid passing passwords via CLI flags. Use the interactive prompt (input is hidden) or SSH agent.
  • Config files contain API keys. They are written with permission 600.
  • --registry is validated as a URL before use.

Local Installation:

  1. Checks Node.js installation on your computer
  2. Installs Claude Code globally: npm install -g @anthropic-ai/claude-code
  3. Installs Claude Code Router globally: npm install -g @musistudio/claude-code-router
  4. Verifies both tools are working locally

Remote Installation:

  1. Connects to your remote server via SSH
  2. Checks Node.js and npm installation
  3. Installs Node.js and npm if needed
  4. Installs Claude Code and Claude Code Router globally
  5. Copies your local config.json to remote server (optional)
  6. Verifies both tools are working correctly

OpenAI Config Generation:

  1. Fetches available models from /v1/models endpoint
  2. Filters chat models (GPT models)
  3. Generates optimized config.json with your API key
  4. Includes all available OpenAI models automatically

๐Ÿ–ฅ๏ธ Supported Platforms

Local Installation:

  • Windows 10/11
  • macOS 10.15+
  • Ubuntu 18.04+
  • CentOS 7+
  • Any system with Node.js 16+

Remote Installation:

  • Ubuntu/Debian
  • CentOS/RHEL
  • Amazon Linux
  • Any Linux distribution with apt/yum

๐Ÿ› ๏ธ Requirements

Local Installation:

  • Node.js 16.0.0 or higher
  • npm (comes with Node.js)

Remote Installation:

  • Node.js 16.0.0 or higher
  • SSH access to remote server
  • sudo privileges on remote server

๐Ÿ“Š Example Output

Web UI Console:

๐ŸŒ Opening browser to http://localhost:3456
โœ… ClaudeDeploy UI is running at: http://localhost:3456
๐Ÿ“ฑ Open your browser to configure and manage installations

# Real-time logs in browser:
[10:23:45] Connected to ClaudeDeploy server
[10:23:46] WebSocket connection established for real-time logging
[10:23:50] Starting local installation...
[10:23:50] Checking Node.js installation...
[10:23:51] v20.11.0
[10:23:51] โœ… Node.js is already installed
[10:23:51] Checking npm installation...
[10:23:52] 10.2.4
[10:23:52] โœ… npm is available
[10:23:52] ๐Ÿ“ฆ Installing @anthropic-ai/claude-code...
[10:23:58] โœ… Claude Code installed successfully
[10:23:58] ๐Ÿ“ฆ Installing @musistudio/claude-code-router...
[10:24:03] โœ… Claude Code Router installed successfully
[10:24:03] ๐ŸŽ‰ Local installation completed successfully!

Local Installation:

๐Ÿš€ Installing Claude Code locally...
โœ… Node.js is already installed
โœ… Installing Claude Code globally
โœ… Installing Claude Code Router globally
โœ… Verifying Claude Code installation
โœ… Verifying Claude Code Router installation

โœ… Claude Code installed successfully on your computer!
๐ŸŽ‰ You can now use `claude` and `ccr` commands locally.

Remote Installation:

๐Ÿš€ Installing Claude Code on remote server...
โœ… Connected to remote server
โœ… Checking Node.js installation
โœ… Installing npm
โœ… Installing Claude Code
โœ… Installing Claude Code Router
โœ… Config file copied successfully
โœ… Verifying Claude Code installation
โœ… Verifying Claude Code Router installation

โœ… Claude Code installed successfully on remote server!
๐ŸŽ‰ You can now use Claude Code on your remote server.

๐Ÿค Contributing

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

See CONTRIBUTING.md for details. This repo uses a lightweight CI:

  • CI runs only on Pull Requests and only lints changed JS/config/workflow files.
  • For docs-only changes, add [skip ci] in the PR title/description or label skip-ci to skip CI.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ†˜ Support

๐ŸŽฏ Roadmap

  • Support for more Linux distributions
  • Docker container support
  • Configuration templates
  • Batch server installation
  • Installation logs and reports

About

๐Ÿš€ไธ€้”ฎ้ƒจ็ฝฒไฝ ็š„ ClaudeCode ๅ’Œ ClaudeCodeRouter

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published