Skip to content
Open
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
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
push:
tags:
- "v*"
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4

- name: Verify installer assets
run: |
test -f install-windows.ps1
test -f scripts/install-linux.sh
test -f scripts/install-wsl.sh

- name: Build release bundle
run: |
mkdir -p dist
git archive --format=tar.gz --prefix="telecli-${GITHUB_REF_NAME}/" -o "dist/telecli-${GITHUB_REF_NAME}-source.tar.gz" HEAD
cp install-windows.ps1 dist/install-windows.ps1
cp scripts/install-linux.sh dist/install-linux.sh
cp scripts/install-wsl.sh dist/install-wsl.sh
cp README.md dist/README.md

- name: Publish release
uses: softprops/action-gh-release@v2
with:
files: |
dist/install-windows.ps1
dist/install-linux.sh
dist/install-wsl.sh
dist/telecli-${{ github.ref_name }}-source.tar.gz
66 changes: 66 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,72 @@ TeleCLI is a web-based terminal interface that allows users to interact with com
pip install -r requirements.txt
```

### Linux

For Linux hosts, use the dedicated installer to clone TeleCLI into `~/.local/share/telecli`, create a virtualenv, copy `.env.sample` to `.env` if needed, and install a `telecli` launcher into `~/.local/bin`.

From a checkout:
```bash
./scripts/install-linux.sh
telecli start
telecli status
```

Without cloning first:
```bash
curl -fsSL https://raw.githubusercontent.com/malandr/telecli/main/scripts/install-linux.sh | bash
telecli start
```

On a fresh install the installer will guide you through the key `.env` settings:
- Telegram bot token
- Allowed Telegram user IDs
- Web host binding (`127.0.0.1` vs `0.0.0.0`)
- Web port
- Whether web auth is required
- Auth token (auto-generated if left blank)
- Whether AI proxy should start enabled
- Which AI proxy provider to use
- Whether TeleCLI should start at startup/login through a user `systemd` service

For scripted installs, you can skip prompts and preseed answers:
```bash
TELECLI_AUTO_CONFIG=1 \
TELECLI_INSTALL_TELEGRAM_BOT_TOKEN="" \
TELECLI_INSTALL_WEB_HOST=127.0.0.1 \
TELECLI_INSTALL_WEB_PORT=8000 \
TELECLI_INSTALL_AUTH_REQUIRED=true \
./scripts/install-linux.sh
```

If you opt in to start at startup, the installer writes `~/.config/systemd/user/telecli.service`, runs `systemctl --user daemon-reload`, enables it, and starts it immediately. If `systemctl --user` is unavailable, the installer keeps going and leaves the service file in place for manual setup.

### Windows (WSL2)

Windows support is currently delivered through WSL2 so TeleCLI can keep using a real Linux shell and tmux.

1. Install WSL2 with an Ubuntu distro if you do not already have one:
```powershell
wsl --install -d Ubuntu
```
2. Run the Windows bootstrapper:
```powershell
powershell -ExecutionPolicy Bypass -File .\install-windows.ps1
```
3. Start TeleCLI inside WSL:
```powershell
wsl telecli-wsl start
```
4. Inspect status or logs from Windows:
```powershell
wsl telecli-wsl status
wsl telecli-wsl logs
```

The installer clones TeleCLI into `~/.local/share/telecli` inside your WSL distro, creates a virtualenv, copies `.env.sample` to `.env` when needed, and installs a `telecli-wsl` launcher in `~/.local/bin`.
It asks the same setup questions as the Linux installer, and you can preseed them with the same `TELECLI_AUTO_CONFIG=1` and `TELECLI_INSTALL_*` environment variables before running the WSL-side script.
If you enable start at startup there, it uses a user `systemd` service inside WSL. This requires a systemd-enabled WSL distro.

## Configuration

TeleCLI uses environment variables for configuration. Copy `.env.sample` to `.env` and configure the following key settings:
Expand Down
58 changes: 58 additions & 0 deletions install-windows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
param(
[string]$Distro = "",
[string]$RepoUrl = "https://github.com/malandr/telecli.git",
[string]$Ref = "main",
[string]$Prefix = '~/.local/share/telecli',
[switch]$SkipSystemPackages
Comment on lines +3 to +6
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

The Windows bootstrapper defaults $Prefix to "~/.local/share/telecli" and always passes it through to the bash installer. In this execution path there is no Linux shell to expand ~, so the WSL-side script will treat it as a literal directory name (e.g. install into a ~ folder) rather than the user’s home directory. Consider either omitting --prefix unless the user explicitly supplies one (letting the bash script use its $HOME-based default), or passing an already-expanded absolute WSL path.

Copilot uses AI. Check for mistakes.
)

$ErrorActionPreference = "Stop"

function Write-Step {
param([string]$Message)
Write-Host "==> $Message"
}

if (-not (Get-Command wsl.exe -ErrorAction SilentlyContinue)) {
throw "wsl.exe is not available. Install WSL first with: wsl --install -d Ubuntu"
}

$listedDistros = & wsl.exe -l -q 2>$null | Where-Object { $_.Trim() -ne "" }
if (-not $listedDistros) {
throw "No WSL distro is installed. Install one first with: wsl --install -d Ubuntu"
}

$scriptUrl = "https://raw.githubusercontent.com/malandr/telecli/$Ref/scripts/install-wsl.sh"

Write-Step "Downloading WSL installer from $scriptUrl"
$wslInstaller = Invoke-WebRequest -UseBasicParsing -Uri $scriptUrl | Select-Object -ExpandProperty Content
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

Invoke-WebRequest -UseBasicParsing is not supported in PowerShell 6+/7 (it was specific to Windows PowerShell 5.1). This will break installs on systems where users run pwsh. Consider removing -UseBasicParsing or conditionally adding it only when it’s available.

Suggested change
$wslInstaller = Invoke-WebRequest -UseBasicParsing -Uri $scriptUrl | Select-Object -ExpandProperty Content
$wslInstaller = Invoke-WebRequest -Uri $scriptUrl | Select-Object -ExpandProperty Content

Copilot uses AI. Check for mistakes.

$arguments = @()
if ($Distro) {
$arguments += @("-d", $Distro)
}

$arguments += @(
"--",
"bash",
"-s",
"--",
"--repo-url",
$RepoUrl,
"--ref",
$Ref,
"--prefix",
$Prefix
)

if ($SkipSystemPackages) {
$arguments += "--skip-system-packages"
}

Write-Step "Running TeleCLI installer inside WSL"
$wslInstaller | & wsl.exe @arguments

Write-Step "TeleCLI is installed in WSL"
Write-Host "Start it with: wsl telecli-wsl start"
Write-Host "Check status with: wsl telecli-wsl status"
Write-Host "Open logs with: wsl telecli-wsl logs"
Loading
Loading