-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
47 lines (39 loc) · 1.39 KB
/
setup.sh
File metadata and controls
47 lines (39 loc) · 1.39 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
#!/bin/bash
# PocketCode Setup Script
# One command to setup AI coding agents on Android
set -e
echo "🚀 PocketCode Setup Starting..."
echo ""
# Step 1: Update Termux
echo "📦 Updating Termux..."
pkg update -y > /dev/null 2>&1
pkg upgrade -y > /dev/null 2>&1
# Step 2: Install proot-distro
echo "📦 Installing Linux container..."
pkg install proot-distro -y > /dev/null 2>&1
proot-distro install debian > /dev/null 2>&1 || true
# Step 3: Setup inside Debian
echo "⚙️ Setting up development environment..."
proot-distro login debian -- bash -c '
apt update > /dev/null 2>&1
apt install curl git build-essential python3 -y > /dev/null 2>&1
curl -fsSL https://deb.nodesource.com/setup_20.x 2>/dev/null | bash - > /dev/null 2>&1
apt install nodejs -y > /dev/null 2>&1
curl -fsSL https://opencode.ai/install 2>/dev/null | bash > /dev/null 2>&1
echo "alias opencode-web=\"opencode web --hostname 127.0.0.1 --port 4096\"" >> ~/.bashrc
'
# Step 4: Create shortcut alias
echo "🔗 Creating shortcuts..."
echo 'alias pocketcode="proot-distro login debian"' >> ~/.bashrc
source ~/.bashrc
# Step 5: Source bashrc to make alias available immediately
source ~/.bashrc
echo ""
echo "✅ Setup Complete!"
echo ""
echo "📱 Quick Start:"
echo " Type: pocketcode"
echo " Then: opencode (terminal) or opencode-web (browser)"
echo ""
echo "📁 To edit files visually, install Acode from Play Store"
echo ""