Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions linux/install.sh → install-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions install.bat → install-windows.bat
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions linux/install-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ──────────────────────────────────────────
Expand Down Expand Up @@ -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}"
Expand Down
24 changes: 14 additions & 10 deletions linux/preflight-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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}"
Expand Down
4 changes: 2 additions & 2 deletions linux/start-linux.sh → start-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Empty file modified start-mac.command
100644 → 100755
Empty file.
Empty file modified start-windows.bat
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions install-core.ps1 → windows/install-core.ps1
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") | Out-Null