diff --git a/README.md b/README.md index ba5d138..d3db4ff 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 🔒 Portable Uncensored AI — Runs Entirely from a USB Drive -A **fully private, portable, uncensored AI assistant** that runs 100% from a USB flash drive. No internet needed after setup. No data leaves the USB. Works on both **Windows** and **Mac**. +A **fully private, portable, uncensored AI assistant** that runs 100% from a USB flash drive. No internet needed after setup. No data leaves the USB. Works on **Windows**, **Mac**, and **Linux**. **Now with multi-model support!** Choose from 6 curated AI models or bring your own. @@ -23,20 +23,20 @@ During installation, you'll choose which model(s) to download: | 6 | **Phi-3.5 Mini 3.8B** | ~2.2 GB | 🔒 STANDARD | Lightweight — good reasoning | | C | **Custom GGUF** | Varies | 🎨 CUSTOM | Bring your own HuggingFace model | -> **🔓 UNCENSORED** = No content filters, answers everything +> **🔓 UNCENSORED** = No content filters, answers everything > **🔒 STANDARD** = Normal safety guidelines apply ## 🚀 Setup (One Time Only) ### What You Need - A USB flash drive with **at least 16 GB** of free space (32 GB recommended for multiple models) -- Format the USB as **exFAT** (works on both Windows and Mac) +- If unsure, format the USB as **exFAT** (works on Windows, Mac and Linux) - An internet connection for the initial download ### Steps 1. **Download this repo** and copy ALL files to your USB drive -2. **Double-click `install.bat`** on the USB drive +2. **Double-click `install-windows.bat`/`install-linux.sh`** on the USB drive 3. **Choose your model(s)** from the interactive menu 4. **Interactive AnythingLLM Setup**: - The AnythingLLM installer will open automatically. @@ -76,6 +76,14 @@ Want a model not on the list? During install, choose option **C** and paste any - The AnythingLLM window will open automatically. - Press ENTER in the terminal to safely shut down. +### On Windows +- Double-click **`linux/start-linux.sh`** on the USB drive. +- First time: It will automatically download the Ollama engine (~2 min). +- The AnythingLLM chat window will open automatically. +- **Switch between models** in AnythingLLM: Settings → LLM → select your model. +- Keep the black terminal window open while chatting. +- Press ENTER in the terminal to safely shut down. + ## 🔐 Privacy - **All chats & settings stay on the USB** — never saved to the host PC. @@ -91,6 +99,7 @@ USB Drive/ ├── install-core.ps1 ← Setup script (called by install.bat) ├── start-windows.bat ← Windows launcher (with auto-cache clearing) ├── start-mac.command ← Mac launcher +├── linux/start-linux.sh ← Linux launcher ├── ollama/ ← AI engine (Windows) ├── models/ ← AI model files (.gguf) & configs │ ├── installed-models.txt ← List of installed models diff --git a/linux/install.sh b/install-linux.sh similarity index 92% rename from linux/install.sh rename to install-linux.sh index e07dbf2..70f628c 100755 --- a/linux/install.sh +++ b/install-linux.sh @@ -26,12 +26,12 @@ read -r # Run the preflight check first to ensure we target the correct USB drive SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -if [[ -f "$SCRIPT_DIR/preflight-check.sh" ]]; then - bash "$SCRIPT_DIR/preflight-check.sh" +if [[ -f "$SCRIPT_DIR/linux/preflight-check.sh" ]]; then + bash "$SCRIPT_DIR/linux/preflight-check.sh" EXIT_CODE=$? else # Fallback if preflight is missing - bash "$SCRIPT_DIR/install-core.sh" + bash "$SCRIPT_DIR/linux/install-core.sh" EXIT_CODE=$? fi diff --git a/install.bat b/install-windows.bat old mode 100644 new mode 100755 similarity index 74% rename from install.bat rename to install-windows.bat index eb61b44..e3c46e1 --- a/install.bat +++ b/install-windows.bat @@ -3,7 +3,7 @@ title Portable AI - Multi-Model Setup color 0E echo =================================================== -echo PORTABLE UNCENSORED AI - USB SETUP +echo PORTABLE UNCENSORED AI - USB SETUP echo =================================================== echo. echo This will download and configure AI models onto @@ -18,12 +18,12 @@ echo Make sure you have a good internet connection! echo. pause -:: Run the PowerShell setup script from the same folder as this bat file -powershell -ExecutionPolicy Bypass -File "%~dp0install-core.ps1" +:: Run the PowerShell setup script from the windows/ directory +powershell -ExecutionPolicy Bypass -File "%~dp0windows\install-core.ps1" echo. echo =================================================== -echo SETUP COMPLETE! You're ready to go! +echo SETUP COMPLETE! You're ready to go! echo =================================================== echo. echo To start your AI, double-click start-windows.bat diff --git a/linux/install-core.sh b/linux/install-core.sh index 61a6e65..6faa4a7 100755 --- a/linux/install-core.sh +++ b/linux/install-core.sh @@ -23,7 +23,7 @@ if [[ -n "${1:-}" && -d "$1" ]]; then USB_DIR="$(cd "$1" && pwd)" echo -e "${YELLOW}Target directory overridden to: ${USB_DIR}${NC}" else - USB_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + USB_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" fi # ── Dependency check ────────────────────────────────────────── @@ -614,7 +614,7 @@ if (( ${#DOWNLOAD_ERRORS[@]} > 0 )); then echo -e "${RED} ! ${err}${NC}" done echo "" - echo -e "${YELLOW} You can re-run install.sh to retry failed downloads.${NC}" + echo -e "${YELLOW} You can re-run install-linux.sh to retry failed downloads.${NC}" else echo -e "${GREEN} SETUP COMPLETE! YOUR PORTABLE AI IS READY!${NC}" echo -e "${CYAN}==========================================================${NC}" diff --git a/linux/preflight-check.sh b/linux/preflight-check.sh index 60434f0..0e0b942 100755 --- a/linux/preflight-check.sh +++ b/linux/preflight-check.sh @@ -703,15 +703,17 @@ elif (( WARN_COUNT > 0 )); then echo "" if [[ "$TARGET_MOUNT" != "$SCRIPT_DIR" ]]; then echo -e " ${YELLOW}Copying setup scripts to USB drive...${NC}" - cp "$SCRIPT_DIR/install.sh" "$TARGET_MOUNT/" - cp "$SCRIPT_DIR/install-core.sh" "$TARGET_MOUNT/" - cp "$SCRIPT_DIR/preflight-check.sh" "$TARGET_MOUNT/" - cp "$SCRIPT_DIR/start-linux.sh" "$TARGET_MOUNT/" + mkdir -p "$TARGET_MOUNT/linux" + cp "$SCRIPT_DIR/../install-linux.sh" "$TARGET_MOUNT/" + cp "$SCRIPT_DIR/../start-linux.sh" "$TARGET_MOUNT/" + cp "$SCRIPT_DIR/install-core.sh" "$TARGET_MOUNT/linux/" + cp "$SCRIPT_DIR/preflight-check.sh" "$TARGET_MOUNT/linux/" chmod +x "$TARGET_MOUNT/"*.sh 2>/dev/null || true + chmod +x "$TARGET_MOUNT/linux/"*.sh 2>/dev/null || true fi echo -e " ${GREEN}Launching installer on: ${TARGET_MOUNT}...${NC}" sleep 1 - bash "$TARGET_MOUNT/install-core.sh" "$TARGET_MOUNT" + bash "$TARGET_MOUNT/linux/install-core.sh" "$TARGET_MOUNT" else echo "" echo -e " ${YELLOW}Cancelled. Re-run preflight-check.sh when ready.${NC}" @@ -726,15 +728,17 @@ else echo "" if [[ "$TARGET_MOUNT" != "$SCRIPT_DIR" ]]; then echo -e " ${YELLOW}Copying setup scripts to USB drive...${NC}" - cp "$SCRIPT_DIR/install.sh" "$TARGET_MOUNT/" - cp "$SCRIPT_DIR/install-core.sh" "$TARGET_MOUNT/" - cp "$SCRIPT_DIR/preflight-check.sh" "$TARGET_MOUNT/" - cp "$SCRIPT_DIR/start-linux.sh" "$TARGET_MOUNT/" + mkdir -p "$TARGET_MOUNT/linux" + cp "$SCRIPT_DIR/../install-linux.sh" "$TARGET_MOUNT/" + cp "$SCRIPT_DIR/../start-linux.sh" "$TARGET_MOUNT/" + cp "$SCRIPT_DIR/install-core.sh" "$TARGET_MOUNT/linux/" + cp "$SCRIPT_DIR/preflight-check.sh" "$TARGET_MOUNT/linux/" chmod +x "$TARGET_MOUNT/"*.sh 2>/dev/null || true + chmod +x "$TARGET_MOUNT/linux/"*.sh 2>/dev/null || true fi echo -e " ${GREEN}Launching installer on: ${TARGET_MOUNT}...${NC}" sleep 1 - bash "$TARGET_MOUNT/install-core.sh" "$TARGET_MOUNT" + bash "$TARGET_MOUNT/linux/install-core.sh" "$TARGET_MOUNT" else echo "" echo -e " ${DGRAY}No problem — run install-core.sh whenever you're ready.${NC}" diff --git a/linux/start-linux.sh b/start-linux.sh similarity index 98% rename from linux/start-linux.sh rename to start-linux.sh index ada84fc..e05a2ff 100755 --- a/linux/start-linux.sh +++ b/start-linux.sh @@ -90,13 +90,13 @@ fi # ------------------------------------------------------- if [[ ! -x "$OLLAMA_BIN" ]]; then echo -e "${RED}ERROR: Ollama binary not found at: $OLLAMA_BIN${NC}" - echo "Please run install.sh first." + echo "Please run install-linux.sh first." exit 1 fi if [[ ! -f "$APPIMAGE" ]]; then echo -e "${RED}ERROR: AnythingLLM AppImage not found at: $APPIMAGE${NC}" - echo "Please run install.sh first." + echo "Please run install-linux.sh first." exit 1 fi diff --git a/start-mac.command b/start-mac.command old mode 100644 new mode 100755 diff --git a/start-windows.bat b/start-windows.bat old mode 100644 new mode 100755 diff --git a/install-core.ps1 b/windows/install-core.ps1 old mode 100644 new mode 100755 similarity index 99% rename from install-core.ps1 rename to windows/install-core.ps1 index 65311b7..6250af3 --- a/install-core.ps1 +++ b/windows/install-core.ps1 @@ -6,7 +6,7 @@ # ================================================================ $ErrorActionPreference = "Continue" -$USB_Drive = Split-Path -Parent $MyInvocation.MyCommand.Path +$USB_Drive = Split-Path -Parent (Split-Path -Parent $MyInvocation.MyCommand.Path) # ----------------------------------------------------------------- # MODEL CATALOG (All presets use Q4_K_M quantization from bartowski) @@ -661,4 +661,4 @@ Write-Host " TIP: In AnythingLLM, go to Settings > LLM to switch" -ForegroundCo Write-Host " between your installed models." -ForegroundColor DarkGray Write-Host "" Write-Host "Press any key to close this installer..." -ForegroundColor Yellow -$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") | Out-Null \ No newline at end of file +$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") | Out-Null