# TypeDialog Bootstrap Installers

Quick installation scripts for all platforms.

## Linux & macOS

Install with `curl`:
```bash
curl -fsSL https://github.com/anthropics/typedialog/releases/download/latest/install.sh | bash
```text

Or with `wget`:
```bash
wget -qO - https://github.com/anthropics/typedialog/releases/download/latest/install.sh | bash
```text

## Windows

Open PowerShell and run:
```powershell
irm https://github.com/anthropics/typedialog/releases/download/latest/install.ps1 | iex
```text

## Manual Installation

### Linux & macOS

```bash
# Download script
wget https://github.com/anthropics/typedialog/releases/download/latest/install.sh

# Run installer
bash install.sh

# Or with environment variables
INSTALL_DIR="$HOME/bin" CONFIG_DIR="$HOME/.typedialog" bash install.sh
```text

### Windows

```powershell
# Download script
Invoke-WebRequest -Uri "https://github.com/anthropics/typedialog/releases/download/latest/install.ps1" -OutFile "install.ps1"

# Run installer
.\install.ps1

# Or with parameters
.\install.ps1 -InstallDir "C:\Program Files\typedialog" -ConfigDir "C:\Users\$env:USERNAME\AppData\Local\typedialog"
```text

## Configuration

### Linux & macOS Environment Variables

- `INSTALL_DIR` - Installation directory (default: `$HOME/.local/bin`)
- `CONFIG_DIR` - Configuration directory (default: `$HOME/.config/typedialog`)
- `VERSION` - Release version (default: `latest`)

### Windows Parameters

- `-InstallDir` - Installation directory (default: `$PROFILE\.local\bin`)
- `-ConfigDir` - Configuration directory (default: `$PROFILE\.config\typedialog`)
- `-Version` - Release version (default: `latest`)

## What Gets Installed

### Binaries
- `typedialog` - CLI backend
- `typedialog-tui` - TUI backend
- `typedialog-web` - Web backend

### Configuration Files
- CLI configs: `cli/default.toml`, `cli/dev.toml`, `cli/production.toml`
- TUI configs: `tui/default.toml`, `tui/dev.toml`, `tui/production.toml`
- Web configs: `web/default.toml`, `web/dev.toml`, `web/production.toml`

## Verification

After installation, verify everything works:

```bash
# Check CLI backend
typedialog --version

# Check TUI backend
typedialog-tui --version

# Check web backend
typedialog-web --version

# List available configurations
ls ~/.config/typedialog/
```text

## Troubleshooting

### Command not found

Update your PATH:

**bash:**
```bash
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc
source ~/.bashrc
```text

**zsh:**
```bash
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.zshrc
source ~/.zshrc
```text

### Permission denied

Make binaries executable:
```bash
chmod +x ~/.local/bin/typedialog*
```text

### Configuration issues

Check configuration directory:
```bash
cat ~/.config/typedialog/cli/default.toml
```text

## Uninstallation

Remove installed files:

```bash
# Remove binaries
rm ~/.local/bin/typedialog*

# Remove configurations (optional)
rm -rf ~/.config/typedialog/
```text

## Platform Support

| Platform | Status | Architecture |
|----------|--------|--------------|
| Linux (glibc) | ✓ | x86_64, aarch64 |
| macOS | ✓ | x86_64, aarch64 |
| Windows | ✓ | x86_64 |

## Requirements

### Linux & macOS
- `curl` or `wget`
- `tar` and `gzip`
- Bash 4.0+

### Windows
- PowerShell 3.0+
- .NET Framework 4.5+ (usually pre-installed)

## Manual Build & Install

To build and install from source:

```bash
# Clone repository
git clone https://github.com/anthropics/typedialog.git
cd typedialog

# Build release
./scripts/build_all.sh release

# Create distribution
./scripts/create_distro.sh v0.1.0

# Install from distribution
tar -xzf distribution/typedialog-0.1.0.tar.gz
cp typedialog-0.1.0/bin/* ~/.local/bin/
cp -r typedialog-0.1.0/config/* ~/.config/typedialog/
```text

## Support

- [GitHub Issues](https://github.com/anthropics/typedialog/issues)
- [Documentation](https://github.com/anthropics/typedialog/blob/main/README.md)
