Skip to content

Commit d7aa4dc

Browse files
committed
v1.0.17: migrate from pipx to uv for all installers and documentation
1 parent 7cdd094 commit d7aa4dc

6 files changed

Lines changed: 65 additions & 52 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ Invoke-WebRequest -Uri "https://raw.githubusercontent.com/sinsniwal/hey-cli/main
7171

7272
Download `hey.exe` from the [latest release](https://github.com/sinsniwal/hey-cli/releases/latest). No Python required.
7373

74-
### pip / pipx
74+
### uv (Recommended)
7575

7676
```bash
77-
pipx install hey-cli-python
77+
uv tool install hey-cli-python
7878
```
7979

8080
> **Note:** After installation, authenticate with `ollama login` and pull the default model: `ollama pull gpt-oss:20b-cloud`
@@ -187,8 +187,9 @@ hey "your question"
187187
```
188188

189189
- **Zero external API calls** — communicates with Ollama via `localhost:11434` using Python's built-in `urllib`.
190-
- **Zero compiled dependencies** — the only runtime dependency is `rich` (for terminal formatting).
191-
- **Pure Python 3.9–3.14** — no C extensions, no Rust, no build tools required.
190+
- **Zero compiled dependencies** — the core logic is pure Python (only `rich` is used for formatting).
191+
- **Pure Python 3.9–3.14** — works with `uv`, `pipx`, or standard `pip`. No build tools required.
192+
- **Instant Speed** — Installation with `uv` or `brew` binaries takes < 2 seconds.
192193

193194
---
194195

install.ps1

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.SYNOPSIS
33
Installs hey-cli natively across Windows architectures.
44
.DESCRIPTION
5-
This script verifies Python is installed, forces a user-level pipx installation,
5+
This script verifies Python is installed, forces a user-level uv installation,
66
validates Ollama runtime logic, downloads the default specified model, and natively builds hey.
77
88
Alternative install methods (no Python required):
@@ -14,7 +14,7 @@ $ErrorActionPreference = "Stop"
1414
$ModelName = "gpt-oss:20b-cloud"
1515

1616
Write-Host "Welcome to the hey-cli Windows installer!" -ForegroundColor Cyan
17-
Write-Host "This script will setup Python dependencies, verify Ollama, and build hey-cli locally."
17+
Write-Host "This script will setup uv and Python dependencies, verify Ollama, and build hey-cli locally."
1818
Write-Host ""
1919

2020
# 1. Check Python
@@ -27,15 +27,21 @@ try {
2727
Exit 1
2828
}
2929

30-
# 2. Setup pipx
30+
# 2. Setup uv
3131
try {
32-
$pipxCheck = & pipx --version 2>&1
33-
Write-Host "[OK] pipx found." -ForegroundColor Green
32+
$uvCheck = & uv --version 2>&1
33+
Write-Host "[OK] uv found." -ForegroundColor Green
3434
} catch {
35-
Write-Host "pipx not found. Installing via python..." -ForegroundColor Cyan
36-
& python -m pip install --user pipx
37-
& python -m pipx ensurepath
38-
Write-Host "pipx installed. You may need to restart your terminal for the pipx path to register." -ForegroundColor Yellow
35+
Write-Host "uv not found. Installing via official script..." -ForegroundColor Cyan
36+
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
37+
# Update current session path
38+
$env:PATH = "$env:USERPROFILE\.local\bin;$env:PATH"
39+
40+
if (!(Get-Command uv -ErrorAction SilentlyContinue)) {
41+
Write-Host "[ERROR] uv installation failed or not in PATH." -ForegroundColor Red
42+
Write-Host "Please install uv manually: https://github.com/astral-sh/uv" -ForegroundColor Yellow
43+
Exit 1
44+
}
3945
}
4046

4147
# 3. Setup Ollama
@@ -110,7 +116,7 @@ try {
110116
# 6. Install hey-cli
111117
Write-Host ""
112118
Write-Host "Installing hey-cli-python..." -ForegroundColor Cyan
113-
& pipx install hey-cli-python --force
119+
& uv tool install hey-cli-python --force
114120

115121
Write-Host ""
116122
Write-Host "============ SUCCESS =============" -ForegroundColor Green

install.sh

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if [ "$(uname -s)" = "Darwin" ]; then
1919
fi
2020

2121
echo -e "${BLUE}Welcome to the hey-cli cross-platform installer!${NC}"
22-
echo -e "This script will setup Python, pipx, Ollama, and explicitly build hey-cli locally.\n"
22+
echo -e "This script will setup Python, uv, Ollama, and explicitly build hey-cli locally.\n"
2323

2424
# 1. Check Python
2525
if ! command -v python3 &> /dev/null; then
@@ -28,34 +28,19 @@ if ! command -v python3 &> /dev/null; then
2828
fi
2929
echo -e "✔️ Python 3 found."
3030

31-
# 2. Setup pipx
32-
if ! command -v pipx &> /dev/null; then
33-
echo -e "${BLUE}pipx not found. Attempting to install via system package manager...${NC}"
34-
OS="$(uname -s)"
35-
if [ "$OS" = "Darwin" ]; then
36-
if command -v brew &> /dev/null; then
37-
$BREW_CMD install pipx
38-
else
39-
echo -e "${RED}Homebrew not found. Please install pipx manually: https://pipx.pypa.io/stable/installation/${NC}"
40-
exit 1
41-
fi
42-
elif [ "$OS" = "Linux" ]; then
43-
if command -v apt-get &> /dev/null; then
44-
sudo apt-get update && sudo apt-get install -y pipx
45-
elif command -v dnf &> /dev/null; then
46-
sudo dnf install -y pipx
47-
elif command -v pacman &> /dev/null; then
48-
sudo pacman -Sy --noconfirm python-pipx
49-
elif command -v zypper &> /dev/null; then
50-
sudo zypper install -y python3-pipx
51-
else
52-
echo -e "${RED}Unsupported Linux package manager. Please install pipx manually.${NC}"
53-
exit 1
54-
fi
31+
# 2. Setup uv
32+
if ! command -v uv &> /dev/null; then
33+
echo -e "${BLUE}uv not found. Attempting to install via official script...${NC}"
34+
curl -LsSf https://astral.sh/uv/install.sh | sh
35+
# Ensure uv is in the PATH for this session
36+
export PATH="$HOME/.local/bin:$PATH"
37+
38+
if ! command -v uv &> /dev/null; then
39+
echo -e "${RED}uv installation failed or not in PATH. Please install uv manually: https://docs.astral.sh/uv/getting-started/installation/${NC}"
40+
exit 1
5541
fi
56-
pipx ensurepath --force
5742
else
58-
echo -e "✔️ pipx found."
43+
echo -e "✔️ uv found."
5944
fi
6045

6146
# 3. Setup Ollama
@@ -116,9 +101,9 @@ ollama pull "$MODEL" || echo -e "${RED}Warning: Could not pull $MODEL. Ensure 'o
116101
# 6. Install hey-cli
117102
echo -e "\n${BLUE}Installing hey-cli-python...${NC}"
118103
if [ "$(uname -s)" = "Darwin" ] && [ "$(uname -m)" = "x86_64" ] && [ "$(sysctl -in sysctl.proc_translated 2>/dev/null)" = "1" ]; then
119-
arch -arm64 pipx install hey-cli-python --force
104+
arch -arm64 uv tool install hey-cli-python --force
120105
else
121-
pipx install hey-cli-python --force
106+
uv tool install hey-cli-python --force
122107
fi
123108

124109
echo -e "\n${GREEN}============ SUCCESS =============${NC}"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "hey-cli-python"
7-
version = "1.0.16"
7+
version = "1.0.17"
88
description = "A secure, zero-bloat CLI companion that turns natural language and error logs into executable commands."
99
readme = "README.md"
1010
requires-python = ">=3.9"

uninstall.ps1

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.SYNOPSIS
33
Uninstalls hey-cli from Windows.
44
.DESCRIPTION
5-
Removes hey-cli installed via pipx, pip, Scoop, or standalone binary.
5+
Removes hey-cli installed via uv, pipx, pip, Scoop, or standalone binary.
66
Optionally removes configuration files.
77
#>
88

@@ -25,7 +25,18 @@ try {
2525
}
2626
} catch {}
2727

28-
# 2. pipx
28+
# 2. uv
29+
try {
30+
$uvCheck = & uv tool list 2>&1 | Select-String "hey-cli-python"
31+
if ($uvCheck) {
32+
Write-Host "Removing hey-cli via uv..." -ForegroundColor Cyan
33+
& uv tool uninstall hey-cli-python
34+
Write-Host "[OK] uv package removed." -ForegroundColor Green
35+
$Removed = $true
36+
}
37+
} catch {}
38+
39+
# 3. pipx
2940
try {
3041
$pipxList = & pipx list 2>&1
3142
if ($pipxList -match "hey-cli-python") {
@@ -36,7 +47,7 @@ try {
3647
}
3748
} catch {}
3849

39-
# 3. pip (fallback)
50+
# 4. pip (fallback)
4051
try {
4152
$pipShow = & pip show hey-cli-python 2>&1
4253
if ($LASTEXITCODE -eq 0) {
@@ -47,7 +58,7 @@ try {
4758
}
4859
} catch {}
4960

50-
# 4. Standalone binary
61+
# 5. Standalone binary
5162
$StandalonePath = "$env:LOCALAPPDATA\hey-cli\hey.exe"
5263
if (Test-Path $StandalonePath) {
5364
Write-Host "Removing standalone binary..." -ForegroundColor Cyan
@@ -57,7 +68,7 @@ if (Test-Path $StandalonePath) {
5768
}
5869

5970
if (-not $Removed) {
60-
Write-Host "No hey-cli installation found (checked Scoop, pipx, pip, standalone)." -ForegroundColor Yellow
71+
Write-Host "No hey-cli installation found (checked Scoop, uv, pipx, pip, standalone)." -ForegroundColor Yellow
6172
}
6273

6374
# 5. Config files

uninstall.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,25 @@ if command -v brew &> /dev/null && brew list hey-cli &> /dev/null 2>&1; then
2020
REMOVED=1
2121
fi
2222

23-
# 2. pipx
23+
# 2. uv
24+
if command -v uv &> /dev/null; then
25+
if uv tool list 2>/dev/null | grep -q "hey-cli-python"; then
26+
echo -e "${BLUE}Removing hey-cli via uv...${NC}"
27+
uv tool uninstall hey-cli-python
28+
echo -e "${GREEN}[OK] uv package removed.${NC}"
29+
REMOVED=1
30+
fi
31+
fi
32+
33+
# 3. pipx
2434
if command -v pipx &> /dev/null && pipx list 2>/dev/null | grep -q "hey-cli-python"; then
2535
echo -e "${BLUE}Removing hey-cli via pipx...${NC}"
2636
pipx uninstall hey-cli-python
2737
echo -e "${GREEN}[OK] pipx package removed.${NC}"
2838
REMOVED=1
2939
fi
3040

31-
# 3. pip (fallback)
41+
# 4. pip (fallback)
3242
if pip show hey-cli-python &> /dev/null 2>&1; then
3343
echo -e "${BLUE}Removing hey-cli via pip...${NC}"
3444
pip uninstall hey-cli-python -y
@@ -37,7 +47,7 @@ if pip show hey-cli-python &> /dev/null 2>&1; then
3747
fi
3848

3949
if [ "$REMOVED" -eq 0 ]; then
40-
echo -e "${YELLOW}No hey-cli installation found (checked Homebrew, pipx, pip).${NC}"
50+
echo -e "${YELLOW}No hey-cli installation found (checked Homebrew, uv, pipx, pip).${NC}"
4151
fi
4252

4353
# 4. Config files

0 commit comments

Comments
 (0)