Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
Refactoring quickstart script
Dillon DuPont2b630fc7f8d8
diff --git a/scripts/playground.sh b/scripts/playground.shindex 7e7f038aa1..10f04c5c65 100755--- a/scripts/playground.sh+++ b/scripts/playground.sh@@ -2,11 +2,15 @@set -e-echo "π Setting up C/ua playground environment..."+echo "π Launching C/ua Computer-Use Agent UI..."# Save the original working directoryORIGINAL_DIR="$(pwd)"+# Directories used by the script+DEMO_DIR="$HOME/.cua-demo"+VENV_DIR="$DEMO_DIR/venv"+# Function to clean up on exitcleanup() {cd ~@@ -33,7 +37,6 @@ if [[ "$CHOICE" == "1" ]]; thenecho ""# Check if existing .env.local already has CUA_API_KEY (check current dir and demo dir)- DEMO_DIR="$HOME/.cua-demo"# Look for .env.local in the original working directory (before cd to temp dir)CURRENT_ENV_FILE="$ORIGINAL_DIR/.env.local"DEMO_ENV_FILE="$DEMO_DIR/.env.local"@@ -152,7 +155,6 @@ if [ "$PYTHON_MAJOR" -lt 3 ] || ([ "$PYTHON_MAJOR" -eq 3 ] && [ "$PYTHON_MINOR"fi# Create a virtual environment-VENV_DIR="$HOME/.cua-venv"if [ ! -d "$VENV_DIR" ]; then$PYTHON_CMD -m venv "$VENV_DIR"fi@@ -169,7 +171,6 @@ pip install -U cua-computer "cua-agent[all]"pip install git+https://github.com/ddupont808/mlx-vlm.git@stable/fix/qwen2-position-id# Create a simple demo script-DEMO_DIR="$HOME/.cua-demo"mkdir -p "$DEMO_DIR"# Create .env.local file with API keys (only if it doesn't exist)@@ -198,13 +199,13 @@ if [[ "$USE_CLOUD" == "true" ]]; thenfi# Create a convenience script to run the demo-cat > "$DEMO_DIR/start_demo.sh" << EOF+cat > "$DEMO_DIR/start_ui.sh" << EOF#!/bin/bashsource "$VENV_DIR/bin/activate"cd "$DEMO_DIR"python run_demo.pyEOF-chmod +x "$DEMO_DIR/start_demo.sh"+chmod +x "$DEMO_DIR/start_ui.sh"echo "β Setup complete!"@@ -276,7 +277,7 @@ fiecho "βοΈ CUA Cloud Container setup complete!"echo "π Edit $DEMO_DIR/.env.local to update your API keys"-echo "π₯οΈ Start the playground by running: $DEMO_DIR/start_demo.sh"+echo "π₯οΈ Start the playground by running: $DEMO_DIR/start_ui.sh"# Check if the VM is running (only for local setup)if [[ "$USE_CLOUD" == "false" ]]; then@@ -296,10 +297,10 @@ fi# Ask if the user wants to start the demo nowecho-read -p "Would you like to start the CUA playground now? (y/n) " -n 1 -r+read -p "Would you like to start the C/ua Computer-Use Agent UI now? (y/n) " -n 1 -rechoif [[ $REPLY =~ ^[Yy]$ ]]; then- echo "π Starting the CUA playground..."+ echo "π Starting the C/ua Computer-Use Agent UI..."echo ""- "$DEMO_DIR/start_demo.sh"+ "$DEMO_DIR/start_ui.sh"fi