@@ -19,7 +19,7 @@ if [ "$(uname -s)" = "Darwin" ]; then
1919fi
2020
2121echo -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
2525if ! command -v python3 & > /dev/null; then
@@ -28,34 +28,19 @@ if ! command -v python3 &> /dev/null; then
2828fi
2929echo -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
5742else
58- echo -e " ✔️ pipx found."
43+ echo -e " ✔️ uv found."
5944fi
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
117102echo -e " \n${BLUE} Installing hey-cli-python...${NC} "
118103if [ " $( 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
120105else
121- pipx install hey-cli-python --force
106+ uv tool install hey-cli-python --force
122107fi
123108
124109echo -e " \n${GREEN} ============ SUCCESS =============${NC} "
0 commit comments