-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·94 lines (78 loc) · 2.15 KB
/
install.sh
File metadata and controls
executable file
·94 lines (78 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/env bash
#
# forestui installer
#
# Installs forestui from PyPI using uv.
#
# Usage:
# curl -fsSL https://raw.githubusercontent.com/flipbit03/forestui/main/install.sh | bash
#
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
info() {
echo -e "${GREEN}[INFO]${NC} $1"
}
warn() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
error() {
echo -e "${RED}[ERROR]${NC} $1" >&2
exit 1
}
check_command() {
command -v "$1" &> /dev/null
}
info "forestui installer"
echo ""
# Check for tmux (required dependency)
if ! check_command tmux; then
error "tmux is not installed. Please install tmux first:
macOS: brew install tmux
Ubuntu: sudo apt install tmux
Fedora: sudo dnf install tmux"
fi
# Install uv if not present
if ! check_command uv; then
info "Installing uv (Python package manager)..."
curl -LsSf https://astral.sh/uv/install.sh | sh
# Add to PATH for this session
export PATH="$HOME/.local/bin:$PATH"
if ! check_command uv; then
error "Failed to install uv. Please install manually: https://docs.astral.sh/uv/"
fi
info "uv installed successfully"
fi
# Install forestui from PyPI
info "Installing forestui from PyPI..."
if uv tool install forestui; then
echo ""
info "Installation complete!"
else
error "Failed to install forestui from PyPI"
fi
echo ""
echo " Run 'forestui' to start the application."
echo " Run 'forestui --help' for usage information."
echo ""
# Check if uv tools are in PATH
if ! check_command forestui; then
warn "forestui was installed but is not in your PATH."
echo ""
echo " Add the following to your shell profile (~/.bashrc, ~/.zshrc, etc.):"
echo ""
echo " export PATH=\"\$HOME/.local/bin:\$PATH\""
echo ""
echo " Then restart your shell or run: source ~/.bashrc"
fi
# Notify about old installation directory
OLD_INSTALL_DIR="$HOME/.forestui-install"
if [ -d "$OLD_INSTALL_DIR" ]; then
echo ""
info "Note: Found old git-based installation at $OLD_INSTALL_DIR"
echo " This directory is no longer needed. You can remove it with:"
echo " rm -rf $OLD_INSTALL_DIR"
fi