Upload files to "/"
This commit is contained in:
221
README.md
Normal file
221
README.md
Normal file
@@ -0,0 +1,221 @@
|
||||
# Claude Code Installer for Linux
|
||||
|
||||
A colorized, interactive installer script that automates the installation of [Claude Code](https://docs.anthropic.com/en/docs/claude-code) on Linux systems.
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
## Quick Install
|
||||
|
||||
**One-line installation:**
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.bitmaster.cc/BitMaster/claude/raw/branch/main/claude-code-installer.sh | bash
|
||||
```
|
||||
|
||||
**Or with wget:**
|
||||
|
||||
```bash
|
||||
wget -qO- https://git.bitmaster.cc/BitMaster/claude/raw/branch/main/claude-code-installer.sh | bash
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Manual Installation
|
||||
|
||||
**Step 1:** Download the installer script
|
||||
|
||||
```bash
|
||||
curl -O https://git.bitmaster.cc/BitMaster/claude/raw/branch/main/claude-code-installer.sh
|
||||
```
|
||||
|
||||
**Step 2:** Make it executable
|
||||
|
||||
```bash
|
||||
chmod +x claude-code-installer.sh
|
||||
```
|
||||
|
||||
**Step 3:** Run the installer
|
||||
|
||||
```bash
|
||||
./claude-code-installer.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Features
|
||||
|
||||
### 🔍 System Detection
|
||||
|
||||
| Feature | Description |
|
||||
|---------|-------------|
|
||||
| **Distribution Detection** | Identifies Ubuntu, Debian, Fedora, Arch, openSUSE, Alpine, and more |
|
||||
| **Version Information** | Shows version, codename, kernel, and architecture |
|
||||
| **Package Manager** | Automatically selects apt, dnf, yum, pacman, zypper, or apk |
|
||||
|
||||
### 📦 Node.js Management
|
||||
|
||||
| Feature | Description |
|
||||
|---------|-------------|
|
||||
| **Version Check** | Checks if Node.js/npm are installed and their versions |
|
||||
| **Compatibility** | Detects if the version is compatible (v18+ required) |
|
||||
| **Clean Removal** | Offers to remove old installations cleanly |
|
||||
| **Fresh Install** | Installs Node.js 20 LTS from official NodeSource repositories |
|
||||
| **Verification** | Verifies installation after completion |
|
||||
|
||||
### 🛡️ Permission Modes
|
||||
|
||||
When the installation completes, you'll be prompted to choose how Claude Code runs:
|
||||
|
||||
| Mode | Flag | Description |
|
||||
|------|------|-------------|
|
||||
| **1. Normal Mode** | *(default)* | Asks before each operation — **safest option** |
|
||||
| **2. Auto-Accept Edits** | `--auto-accept-edits` | Auto-accepts file changes, confirms commands |
|
||||
| **3. Full Auto Mode** | `--dangerously-skip-permissions` | Skips all prompts — **use with caution!** |
|
||||
| **4. Exit** | — | Don't start Claude, just complete installation |
|
||||
|
||||
---
|
||||
|
||||
## Supported Distributions
|
||||
|
||||
| Distribution Family | Distributions | Package Manager |
|
||||
|---------------------|---------------|-----------------|
|
||||
| **Debian** | Ubuntu, Debian, Linux Mint, Pop!_OS, Elementary OS, Zorin, Kali | `apt` |
|
||||
| **Red Hat** | Fedora, RHEL, CentOS, Rocky Linux, AlmaLinux, Oracle Linux | `dnf` / `yum` |
|
||||
| **Arch** | Arch Linux, Manjaro, EndeavourOS, Garuda | `pacman` |
|
||||
| **SUSE** | openSUSE, SLES | `zypper` |
|
||||
| **Alpine** | Alpine Linux | `apk` |
|
||||
|
||||
---
|
||||
|
||||
## Requirements
|
||||
|
||||
- **Linux** operating system (see supported distributions above)
|
||||
- **sudo** access for package installation
|
||||
- **curl** or **wget** for downloading
|
||||
- **Internet connection** for downloading packages
|
||||
|
||||
---
|
||||
|
||||
## What Gets Installed
|
||||
|
||||
1. **Node.js 20 LTS** — JavaScript runtime (if not already installed or outdated)
|
||||
2. **npm** — Node package manager (comes with Node.js)
|
||||
3. **Claude Code** — Anthropic's CLI tool for AI-assisted coding
|
||||
|
||||
---
|
||||
|
||||
## Post-Installation
|
||||
|
||||
After installation, you can start Claude Code anytime:
|
||||
|
||||
```bash
|
||||
# Normal mode (recommended)
|
||||
claude
|
||||
|
||||
# Auto-accept file edits
|
||||
claude --auto-accept-edits
|
||||
|
||||
# Full auto mode (dangerous)
|
||||
claude --dangerously-skip-permissions
|
||||
```
|
||||
|
||||
If the `claude` command is not found after installation, restart your terminal or run:
|
||||
|
||||
```bash
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Command not found after installation
|
||||
|
||||
```bash
|
||||
# Reload shell configuration
|
||||
source ~/.bashrc
|
||||
|
||||
# Or add npm global bin to PATH manually
|
||||
export PATH=~/.npm-global/bin:$PATH
|
||||
```
|
||||
|
||||
### Permission denied errors
|
||||
|
||||
Make sure you have sudo access:
|
||||
|
||||
```bash
|
||||
sudo -v
|
||||
```
|
||||
|
||||
### Node.js version conflicts
|
||||
|
||||
The installer will detect and offer to remove conflicting packages. If issues persist:
|
||||
|
||||
```bash
|
||||
# Debian/Ubuntu
|
||||
sudo apt remove -y nodejs npm libnode-dev libnode72
|
||||
sudo apt autoremove -y
|
||||
|
||||
# Then run the installer again
|
||||
./claude-code-installer.sh
|
||||
```
|
||||
|
||||
### Download fails
|
||||
|
||||
Check your internet connection and ensure the repository is accessible:
|
||||
|
||||
```bash
|
||||
curl -I https://git.bitmaster.cc/BitMaster/claude/raw/branch/main/claude-code-installer.sh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Uninstallation
|
||||
|
||||
To remove Claude Code:
|
||||
|
||||
```bash
|
||||
npm uninstall -g @anthropic-ai/claude-code
|
||||
```
|
||||
|
||||
To also remove Node.js (Debian/Ubuntu):
|
||||
|
||||
```bash
|
||||
sudo apt remove -y nodejs
|
||||
sudo apt autoremove -y
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
This installer script is provided under the MIT License.
|
||||
|
||||
Claude Code is a product of [Anthropic](https://www.anthropic.com/).
|
||||
|
||||
---
|
||||
|
||||
## Links
|
||||
|
||||
- [Claude Code Documentation](https://docs.anthropic.com/en/docs/claude-code)
|
||||
- [Anthropic](https://www.anthropic.com/)
|
||||
- [Node.js](https://nodejs.org/)
|
||||
- [NodeSource Distributions](https://github.com/nodesource/distributions)
|
||||
|
||||
---
|
||||
|
||||
## Contributing
|
||||
|
||||
Issues and pull requests are welcome at:
|
||||
|
||||
**https://git.bitmaster.cc/BitMaster/claude**
|
||||
|
||||
---
|
||||
|
||||
<p align="center">
|
||||
<sub>Made with ❤️ for the Claude community</sub>
|
||||
</p>
|
||||
Reference in New Issue
Block a user