Add Discord-native hybrid front-end for Jarvis (bot + bridge)
Some checks failed
Release / semantic-release (push) Successful in 59s
tests / Unit tests (Linux, Python 3.11) (push) Successful in 13m45s
Release / build-linux (push) Failing after 7m47s
Release / build-windows (push) Has been cancelled
Release / build-macos (arm64, macos-latest) (push) Has been cancelled
Release / build-macos (x64, macos-15-intel) (push) Has been cancelled
Release / release-main (push) Has been cancelled
Release / release-develop (push) Has been cancelled
Some checks failed
Release / semantic-release (push) Successful in 59s
tests / Unit tests (Linux, Python 3.11) (push) Successful in 13m45s
Release / build-linux (push) Failing after 7m47s
Release / build-windows (push) Has been cancelled
Release / build-macos (arm64, macos-latest) (push) Has been cancelled
Release / build-macos (x64, macos-15-intel) (push) Has been cancelled
Release / release-main (push) Has been cancelled
Release / release-develop (push) Has been cancelled
Transform isair/jarvis into a Discord-controlled voice assistant running on the Ubuntu VNC desktop, keeping the mature ~39k-line Python brain intact. - bot/ (Node + bun, discord.js): /자비스 slash commands (ephemeral), voice channel join + voice receive/playback, pluggable VNC screen broadcast (selfbot live / noVNC / screenshot) - bridge/ (Python, Flask): wraps jarvis STT + run_reply_engine + Piper TTS behind a thin localhost HTTP API - .env.example, scripts/ (start_bridge/start_bot/dev), README rewrite, docs/language-comparison.md and docs/vnc-xfce-setup.md Language decision: hybrid (Python brain + Node/bun Discord layer) because Discord blocks bot video; native screen broadcast only works via a Node selfbot library.
This commit is contained in:
94
scripts/run_desktop_app.sh
Executable file
94
scripts/run_desktop_app.sh
Executable file
@@ -0,0 +1,94 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Test script for the Jarvis Desktop App
|
||||
|
||||
# Parse arguments
|
||||
VOICE_DEBUG=0
|
||||
for arg in "$@"; do
|
||||
case $arg in
|
||||
--voice-debug)
|
||||
VOICE_DEBUG=1
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Navigate to project root first
|
||||
cd "$(dirname "$0")/.." || exit
|
||||
|
||||
echo "🔧 Testing Jarvis Desktop App locally..."
|
||||
if [ "$VOICE_DEBUG" = "1" ]; then
|
||||
echo " 📋 Voice debug: ENABLED"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Find a suitable Python (3.10+)
|
||||
# Check both PATH and common install locations (homebrew, deadsnakes, etc.)
|
||||
PYTHON=""
|
||||
SEARCH_PATHS=(
|
||||
"" # PATH lookup
|
||||
"/opt/homebrew/bin/" # macOS Homebrew (Apple Silicon)
|
||||
"/usr/local/bin/" # macOS Homebrew (Intel) / Linux manual installs
|
||||
)
|
||||
for candidate in python3.12 python3.11 python3.10; do
|
||||
for prefix in "${SEARCH_PATHS[@]}"; do
|
||||
if [ -x "${prefix}${candidate}" ] 2>/dev/null || command -v "${prefix}${candidate}" &>/dev/null; then
|
||||
PYTHON="${prefix}${candidate}"
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
if [ -z "$PYTHON" ]; then
|
||||
# Fall back to python3 and hope it's new enough
|
||||
PYTHON="python3"
|
||||
fi
|
||||
|
||||
# Set up / activate virtual environment
|
||||
if [ ! -d .venv ]; then
|
||||
echo "📦 Creating virtual environment..."
|
||||
"$PYTHON" -m venv .venv
|
||||
fi
|
||||
source .venv/bin/activate
|
||||
|
||||
# Check Python version
|
||||
echo "📋 Checking Python version..."
|
||||
python --version
|
||||
PY_MINOR=$(python -c 'import sys; print(sys.version_info.minor)')
|
||||
if [ "$PY_MINOR" -lt 10 ]; then
|
||||
echo "⚠️ Python 3.10+ is required. Found $(python --version)."
|
||||
echo " Recreating .venv with $PYTHON..."
|
||||
deactivate 2>/dev/null
|
||||
rm -rf .venv
|
||||
"$PYTHON" -m venv .venv
|
||||
source .venv/bin/activate
|
||||
echo " Now using: $(python --version)"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Install dependencies from requirements.txt
|
||||
echo "📦 Installing dependencies..."
|
||||
pip install -q -r requirements.txt
|
||||
echo ""
|
||||
|
||||
# Generate icons
|
||||
echo "🎨 Generating icons..."
|
||||
python src/desktop_app/desktop_assets/generate_icons.py
|
||||
echo ""
|
||||
|
||||
# Run the desktop app
|
||||
echo "🚀 Starting desktop app..."
|
||||
echo " Click the system tray icon to open menu"
|
||||
echo " Select 'Start Listening' from menu to begin"
|
||||
echo " Or press Ctrl+C to quit"
|
||||
echo ""
|
||||
|
||||
# Set PYTHONPATH to include src directory (already at project root)
|
||||
export PYTHONPATH="$(pwd)/src:$PYTHONPATH"
|
||||
|
||||
# Set voice debug environment variable if requested
|
||||
if [ "$VOICE_DEBUG" = "1" ]; then
|
||||
export JARVIS_VOICE_DEBUG=1
|
||||
fi
|
||||
|
||||
python -m desktop_app
|
||||
|
||||
Reference in New Issue
Block a user