@rbrowser/cli
v0.1.0
Published
Launch RBrowser with a local or remote (SSH) directory as a file server.
Downloads
134
Maintainers
Readme
@rbrowser/cli
NPM CLI for RBrowser. Serve any folder (local or remote-over-SSH) and open it in RBrowser.
npm install -g @rbrowser/cli
rb open .
rb open user@server:/data/projectsWhat it does
rb open <path> starts a small HTTP file server bound to a random free port and prints a URL. Open the URL to browse, preview, and operate on the files with the full RBrowser UI. The frontend is bundled with the package, so no internet connection is required after install.
Usage
rb open <path> [options]
Arguments:
path local directory or user@host:/remote/path
Options:
-p, --port <port> port to bind (default: random free port)
--host <addr> bind address for the file server (default: 0.0.0.0)
--frontend <url> RBrowser frontend URL, or "bundled". Default: bundled.
--public force the printed URL to use this machine's LAN/public hostname
--localhost force the printed URL to use 'localhost' (for ssh -L tunneling)
--token <token> auth token (default: random). Use --no-token to disable auth.
--no-token disable token authentication (NOT recommended on shared hosts)
-h, --help show help
-v, --version show versionExamples
# Local
rb open .
rb open ~/projects
# Remote (uses your local ssh client + ~/.ssh/config)
rb open me@gpu-box:/data/exp42
# In a tmux/ssh session, force LAN URL so you can paste it in your laptop browser
rb open . --public
# Use a tunnel (ssh -L 9000:localhost:9000) and pin the printed URL to localhost
rb open . --localhost --port 9000
# Disable auth (only inside trusted networks!)
rb open . --no-tokenRequirements
- Node.js >= 18
- For remote paths:
sshavailable on PATH and key-based auth set up to the target host. Remote shell must support standard POSIXcd,stat,dd,cat,mkdir,mv,rm,touch.
Security
By default a random per-session token is required for every /api/* and /files/* request. The token is embedded in the printed URL. Anyone with the URL has full read/write access inside the served directory — treat it like a password.
License
See LICENSE.
