Skip to content

omsingh02/brop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Brop (Browser-to-Phone)

A Windows utility that syncs URLs from Brave browser to your Android phone via SSH/Termux. Perfect for quickly sending videos and web pages from your desktop to your mobile device.

Features

  • πŸ”— One-Click URL Sync - Copy and send URLs with a single keyboard shortcut
  • πŸ“± Direct to Phone - Uses SSH/Termux for instant transfer
  • πŸŽ₯ Smart Video Handling - Automatically downloads videos using yt-dlp on your phone
  • πŸͺŸ Windows Native - Integrates with Windows notifications and clipboard
  • πŸ”” Toast Notifications - Get instant feedback on transfer status
  • 🎯 Auto-Focus - Automatically focuses Brave browser window

Requirements

Windows (Desktop)

  • Python 3.7+
  • PowerShell 5.1+
  • SSH client (built into Windows 10+)
  • Brave Browser

Android (Phone)

  • Termux
  • OpenSSH server running in Termux
  • yt-dlp (for video downloads)

Installation

1. Windows Setup

# Clone or download to your preferred location
cd d:\dev\repos\show
cd brop

# Install Python dependencies (if any additional needed)
# pip install -r requirements.txt

2. Android/Termux Setup

# Install required packages
pkg update && pkg upgrade
pkg install openssh python ffmpeg

# Install yt-dlp
pip install yt-dlp

# Generate SSH key (if not already done)
ssh-keygen -t ed25519

# Start SSH server
sshd

# Find your phone's IP address
ifconfig

3. SSH Configuration

On Windows, create/edit ~/.ssh/config:

Host tmux
    HostName 192.168.1.xxx  # Your phone's IP
    User u0_a123             # Your Termux user (check with 'whoami' in Termux)
    Port 8022                # Default Termux SSH port
    IdentityFile ~/.ssh/id_ed25519

Copy your public key to phone:

type ~\.ssh\id_ed25519.pub | ssh tmux "cat >> ~/.ssh/authorized_keys"

Usage

Basic Usage

Run the main script:

python brop.py

Or use the PowerShell wrapper:

.\brop.ps1 -Action Sync

Direct URL Mode

Send a URL directly without browser interaction:

python brop.py --url "https://youtube.com/watch?v=example"

Check Dependencies

Verify all required tools are installed:

python brop.py --check-deps

Keyboard Shortcut

In Brave browser, press Ctrl+Shift+Y to:

  1. Copy the current URL
  2. Automatically trigger the sync script
  3. Send the URL to your phone

Configuration

Edit the configuration variables in brop.py:

SSH_PROFILE = "tmux"          # SSH config profile name
LOG_DIR = Path.home() / "AppData" / "Local" / "brop"
LOG_FILE = LOG_DIR / "brop.log"
BRAVE_SHORTCUT = "^+y"        # Ctrl+Shift+Y

Supported Video Platforms

  • YouTube
  • Vimeo
  • Dailymotion
  • Twitch
  • TikTok
  • Instagram
  • Reddit

How It Works

  1. Focus: Script focuses on Brave browser window
  2. Copy: Sends Ctrl+Shift+Y to copy current URL
  3. Extract: Extracts URL from clipboard
  4. Detect: Determines if URL is a video platform
  5. Send: SSH to phone and execute appropriate command
    • Videos: Downloads with yt-dlp
    • Regular URLs: Echoes URL (can be extended)
  6. Notify: Shows Windows toast notification with result

Logs

Logs are stored at: %LOCALAPPDATA%\brop\brop.log

View logs:

Get-Content $env:LOCALAPPDATA\brop\brop.log -Tail 20

Troubleshooting

SSH Connection Failed

  • Ensure Termux SSH server is running: sshd
  • Check phone's IP address hasn't changed
  • Verify SSH config profile name matches

No URL Detected

  • Ensure Brave browser is focused
  • Check if Ctrl+Shift+Y is the correct shortcut in your Brave setup
  • Verify clipboard contains valid URL

Video Download Failed

  • Ensure yt-dlp is installed on phone: pip install -U yt-dlp
  • Check phone has storage space
  • Verify URL is supported by yt-dlp

PowerShell Actions

The PowerShell wrapper supports multiple actions:

.\brop.ps1 -Action Focus          # Focus Brave window
.\brop.ps1 -Action GetClipboard   # Get clipboard content
.\brop.ps1 -Action SendKeys -Keys "^c"  # Send keys
.\brop.ps1 -Action Notify -Title "Test" -Message "Hello"
.\brop.ps1 -Action Sync           # Full sync (default)
.\brop.ps1 -Action CheckDeps      # Check dependencies

License

MIT License - See LICENSE file for details

Author

Om Singh

Version

1.0.0 - November 2025

About

Browser-to-Phone URL sync utility for Windows and Android via SSH/Termux

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published