Spaces:
Sleeping
A newer version of the Gradio SDK is available:
5.44.0
Instalation Plan
Below is a pragmatic “one-click” install strategy you can ship this week and polish later.
0 What a user need on laptop
Component | Why |
---|---|
Python ≥ 3.10 | run host.py (pure-Python, 150 LOC) |
aiohttp |
do the HTTPS POST / long-poll to your HF Space |
Native-Messaging manifest | let Chrome spawn the host automatically |
(Optional) Playwright package | only if you picked the CDP replay option |
1 Distribute two thin wrapper scripts
For… | User runs | What it does under the hood | |
---|---|---|---|
macOS / Linux | bash<br>/bin/bash -c "$(curl -fsSL https://rebr.ws/install.sh)" |
• Checks for Python ≥ 3.10 & pipx • Installs both if missing • pipx install rebrowse-host (wheel hosted on GitHub/LFS) • Runs rebrowse-install --extension-id=<your-ID> to write the Native-Messaging manifest |
|
Windows | ```powershell irm https://rebr.ws/install.ps1 |
iex``` | • Winget-installs Python if missing • Installs pipx • pipx install rebrowse-host • Adds registry key for the manifest |
Why not an .exe/.pkg yet?
pipx
isolates dependencies, bundles its own venv, and is <10 s download. You avoid shipping Python yourself (huge) and stay cross-platform with two tiny scripts.
1-a install.sh
(macOS / Linux)
#!/usr/bin/env bash
set -e
EXT_ID="___________" # 👈 fill with your Chrome-Web-Store ID
# 1) Ensure Python 3.10+
command -v python3 >/dev/null 2>&1 || {
echo "❌ Python 3 not found. Install Xcode Command Line Tools or brew python."
exit 1
}
# 2) Install pipx if missing
if ! command -v pipx >/dev/null; then
python3 -m pip install --user --upgrade pipx
python3 -m pipx ensurepath
export PATH="$HOME/.local/bin:$PATH"
fi
# 3) Install rebrowse-host
pipx install --upgrade "rebrowse-host==0.*" # version pin
# 4) Register native-messaging manifest
rebrowse-install --extension-id="$EXT_ID"
echo "✅ Rebrowse host installed! Open Chrome and start recording."
Make it downloadable
chmod +x install.sh
aws s3 cp install.sh s3://rebrowse-public/install.sh --acl public-read # or GitHub raw
1-b install.ps1
(Windows)
$ErrorActionPreference = "Stop"
$extId = "___________" # Chrome Web Store ID
# 1) Ensure Python
if (-not (Get-Command python -ErrorAction SilentlyContinue)) {
Write-Host "Installing Python via winget..."
winget install --id Python.Python.3.11 -e --source winget
}
# 2) pipx
python -m pip install --user --upgrade pipx
$env:PATH += ";$HOME\AppData\Roaming\Python\Scripts"
pipx ensurepath
# 3) rebrowse-host
pipx install --upgrade "rebrowse-host==0.*"
# 4) Register native host
rebrowse-install --extension-id $extId
Write-Host "✅ Rebrowse host installed! Restart Chrome and record."
Host these two scripts at short URLs (https://rebr.ws/install.sh
, …/install.ps1
) so users can copy-paste.
2 Package rebrowse-host
for pipx
Inside native_host/
:
- add a minimal
setup.cfg
/pyproject.toml
- build once and upload to GitHub Releases (or TestPyPI):
python -m build -w
gh release create v0.1 dist/rebrowse_host-0.1-py3-none-any.whl
pipx install "https://github.com/zk1tty/rebrowse-app/releases/download/v0.1/rebrowse_host-0.1-py3-none-any.whl"
(You can move to PyPI later.)
3 What the user experiences
- Runs one command → gets progress messages (“Installing Python…”, “Registering host…”)
- Chrome extension already shipped in the Web Store; once installed it immediately finds the native host.
- They browse, stop recording → trace auto-uploads to the Space.
- They open your Space URL, click Replay, and watch the browser act.
Zero manual Python, zero PATH fiddling, ~30 s total on a fresh machine.
4 Future-proof upgrades
- Auto-update:
pipx upgrade rebrowse-host
can be called by the extension weekly. - Standalone binary: later wrap with PyInstaller + Inno Setup / pkgbuild for true one-file installers; reuse the manifest step.
- Signed: macOS notarization & Windows Authenticode once you move beyond hackathon scope.
TL;DR for non-tech testers
# macOS / Linux
/bin/bash -c "$(curl -fsSL https://rebr.ws/install.sh)"
# Windows 10/11
irm https://rebr.ws/install.ps1 | iex
That single line gives them everything required to record and replay workflows through your Hugging Face Space.