Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
314 changes: 314 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,314 @@
# πŸš€ Heidi CLI One-Click Installer

Install Heidi CLI with a single command! The installer will automatically:
- Clone the latest version from GitHub
- Install all dependencies
- Build and install Heidi CLI
- Verify the installation
- Clean up temporary files

## πŸ“‹ **System Requirements**

### **Required**
- **Python 3.10+** - [Download Python](https://python.org)
- **Git** - [Download Git](https://git-scm.com)
- **pip** - Usually included with Python

### **Optional**
- **CUDA** - For GPU acceleration (automatic if available)
- **Admin/root access** - For system-wide installation (optional)

---

## πŸ–₯️ **Installation**

### **Linux/macOS**

```bash
# Download and run the installer
curl -fsSL https://raw.githubusercontent.com/heidi-dang/heidi-cli/main/install | bash

# Or download first, then run
wget https://raw.githubusercontent.com/heidi-dang/heidi-cli/main/install
chmod +x install
./install
```

### **Windows (PowerShell)**

```powershell
# Download and run the installer
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/heidi-dang/heidi-cli/main/install.ps1" -OutFile "install.ps1"
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
.\install.ps1
```

### **From Local Clone**

```bash
# Clone the repository
git clone https://github.com/heidi-dang/heidi-cli.git
cd heidi-cli

# Run the installer
./install # Linux/macOS
# or
.\install.ps1 # Windows
```

---

## 🎯 **What the Installer Does**

### **βœ… Automatic Steps**

1. **πŸ” Check Requirements** - Verifies Python, Git, and pip
2. **πŸ“₯ Clone Repository** - Downloads latest Heidi CLI from main branch
3. **πŸ—οΈ Setup Environment** - Creates virtual environment
4. **πŸ“¦ Install Dependencies** - Installs all required packages
5. **πŸ”¨ Build Heidi CLI** - Compiles and builds the application
6. **βš™οΈ Install Heidi CLI** - Installs system-wide or for current user
7. **βœ… Verify Installation** - Tests that everything works
8. **🧹 Clean Up** - Removes temporary files

### **πŸŽ‰ Installation Results**

After successful installation, you'll have:
- βœ… **Heidi CLI command** available system-wide
- βœ… **All dependencies** installed and configured
- βœ… **API key system** ready to use
- βœ… **Model hosting** capabilities
- βœ… **Complete documentation** accessible

---

## πŸš€ **Post-Installation**

### **Quick Start**

```bash
# Verify installation
heidi --version

# Run setup wizard
heidi setup

# Generate API key
heidi api generate --name "My First Key"

# Start model server
heidi model serve

# View help
heidi --help
```

### **Next Steps**

1. **πŸ”‘ Generate API Key**
```bash
heidi api generate --name "Production Key" --user "your-username"
```

2. **πŸ€– Download Models**
```bash
heidi hf search "text-generation" --limit 5
heidi hf download "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
```

3. **🌐 Start API Server**
```bash
heidi api server
```

4. **πŸ“š Explore Documentation**
```bash
# View comprehensive guide
cat docs/how-to-use.md
```

---

## πŸ”§ **Installation Options**

### **User vs System Installation**

**User Installation (Default)**
- Installs to `~/.local/bin` (Linux/macOS) or `%USERPROFILE%\AppData\Local\Programs` (Windows)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The documentation states that the default user installation path for Windows is %USERPROFILE%\AppData\Local\Programs. However, the install.ps1 script defaults to installing in $env:USERPROFILE\heidi-cli. This discrepancy should be corrected to avoid confusing users.

Suggested change
- Installs to `~/.local/bin` (Linux/macOS) or `%USERPROFILE%\AppData\Local\Programs` (Windows)
- Installs to `~/.local/bin` (Linux/macOS) or `%USERPROFILE%\heidi-cli` (Windows)

- No admin privileges required
- Available only for current user

**System Installation (Admin Required)**
- Installs to `/usr/local/bin` (Linux/macOS) or system-wide (Windows)
- Requires admin/root privileges
- Available for all users

### **Custom Installation Path**

```bash
# Linux/macOS - set custom prefix
export HEIDI_INSTALL_PREFIX="/opt/heidi-cli"
./install

# Windows - custom path
.\install.ps1 -InstallPath "C:\HeidiCLI"
```

---

## πŸ› οΈ **Troubleshooting**

### **Common Issues**

#### **Python Not Found**
```bash
# Install Python 3.10+
# Ubuntu/Debian:
sudo apt update && sudo apt install python3 python3-pip python3-venv

# macOS (with Homebrew):
brew install python3

# Windows: Download from python.org
```

#### **Git Not Found**
```bash
# Ubuntu/Debian:
sudo apt install git

# macOS (with Homebrew):
brew install git

# Windows: Download from git-scm.com
```

#### **Permission Denied**
```bash
# Make installer executable
chmod +x install

# Or use bash directly
bash install
```

#### **Command Not Found After Installation**
```bash
# Add to PATH (Linux/macOS)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

# Or restart your terminal
```

#### **Virtual Environment Issues**
```bash
# Clean installation
rm -rf ~/.heidi
./install --force
```

### **Get Help**

```bash
# Check system requirements
heidi doctor

# View installation logs
# Installer shows detailed error messages

# Get community help
# GitHub Issues: https://github.com/heidi-dang/heidi-cli/issues
# Discord: https://discord.gg/heidi-cli
```

---

## πŸ“Š **Installation Verification**

### **Check Installation Status**

```bash
# Verify Heidi CLI is installed
heidi --version

# Check all systems
heidi doctor

# Test API key system
heidi api config

# List available models
heidi api models
```

### **Expected Output**

```
πŸ”‘ Heidi API Key: heidik_abc123...
πŸ“‹ User Information:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ User ID: β”‚ default β”‚
β”‚ Key Name: β”‚ Demo Key β”‚
β”‚ Rate Limit: β”‚ 100 requests/min β”‚
β”‚ Usage Count: β”‚ 0 requests β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ€– Available Models:
β€’ local://opencode-gpt-4
β€’ hf://TinyLlama/TinyLlama-1.1B-Chat-v1.0
β€’ opencode://gpt-4
```

---

## πŸ”„ **Update Heidi CLI**

### **Update to Latest Version**

```bash
# Re-run the installer (will update existing installation)
./install

# Or manually update
pip install --upgrade heidi-cli
```

### **Uninstall Heidi CLI**

```bash
# Uninstall with pip
pip uninstall heidi-cli

# Remove configuration (optional)
rm -rf ~/.heidi
```

---

## πŸŽ‰ **Success!**

**πŸš€ Heidi CLI is now installed and ready to use!**

### **What You Can Do Now**

- βœ… **Generate API keys** for unified model access
- βœ… **Host models locally** with automatic management
- βœ… **Access HuggingFace models** with smart integration
- βœ… **Track usage and costs** with built-in analytics
- βœ… **Scale to production** with enterprise features

### **Learn More**

- πŸ“– **Complete Guide**: [docs/how-to-use.md](docs/how-to-use.md)
- πŸ”‘ **API Keys**: [docs/api-keys.md](docs/api-keys.md)
- πŸ€– **Model Management**: [docs/model-management.md](docs/model-management.md)
- πŸ’¬ **Community**: [Discord Server](https://discord.gg/heidi-cli)

---

**🎯 Installation completed successfully! Welcome to Heidi CLI!** πŸš€

*Last updated: March 2026*
*Installer version: 1.0.0*
*Heidi CLI version: 0.1.1*
Loading
Loading