MCPcopy
hub / github.com/browsh-org/browsh

github.com/browsh-org/browsh @v1.8.3 sqlite

repository ↗ · DeepWiki ↗ · release v1.8.3 ↗
542 symbols 1,429 edges 56 files 53 documented · 10%
README

Follow @brow_sh

Browsh Logo

A fully interactive, real-time, and modern text-based browser rendered to TTYs and browsers

Browsh GIF

Why use Browsh?

Not all the world has good Internet.

If you only have a 3kbps internet connection tethered from a phone, then it's good to SSH into a server and browse the web through, say, elinks. That way the server downloads the web pages and uses the limited bandwidth of an SSH connection to display the result. However, traditional text-based browsers lack JS and all other modern HTML5 support. Browsh is different in that it's backed by a real browser, namely headless Firefox, to create a purely text-based version of web pages and web apps. These can be easily rendered in a terminal or indeed, ironically, in another browser. Do note that currently the browser client doesn't have feature parity with the terminal client.

Why not VNC? Well VNC is certainly one solution but it doesn't quite have the same ability to deal with extremely bad Internet. Terminal Browsh can also use MoSH to further reduce bandwidth and increase stability of the connection. Mosh offers features like automatic reconnection of dropped or roamed connections and diff-only screen updates. Furthermore, other than SSH or MoSH, terminal Browsh doesn't require a client like VNC.

One final reason to use terminal Browsh could be to offload the battery-drain of a modern browser from your laptop or low-powered device like a Raspberry Pi. If you're a CLI-native, then you could potentially get a few more hours of life if your CPU-hungry browser is running somewhere else on mains electricity.

Installation

Download a binary from the releases (~11MB). You will need to have Firefox already installed.

Or download and run the Docker image (~230MB) with: docker run --rm -it browsh/browsh

Usage

Most keys and mouse gestures should work as you'd expect on a desktop browser.

For full documentation click here.

Contributing

Note that some of these instructions may be out of date (July 2022)

For generic Linux systems you can follow this guide on how to setup a build environment, that you may be able to adapt for other systems as well.

Windows users can follow this guide in order to set up a build environment.

Mac users may follow this guide that goes through the steps of setting up a build environment.

Communication

Questions about Brow.sh? Stuck trying to resolve a tricky issue? Try: - Github Discussions - Gitter

Tests

For the webextension: in webext/ folder, npm test
For CLI unit tests: in /interfacer run go test src/browsh/*.go
For CLI E2E tests: in /interfacer run go test test/tty/*.go
For HTTP Service tests: in /interfacer run go test test/http-server/*.go

Special Thanks

Donating

Please consider donating: https://www.brow.sh/donate

License

GNU Lesser General Public License v2.1

Core symbols most depended-on inside this repo

Shutdown
called by 40
interfacer/src/browsh/browsh.go
log
called by 37
webext/src/background/common_mixin.js
BeInFrameAt
called by 29
interfacer/test/tty/matchers.go
SpecialKey
called by 22
interfacer/test/tty/setup.go
log
called by 20
webext/src/dom/common_mixin.js
sendMessageToWebExtension
called by 19
interfacer/src/browsh/comms.go
writeString
called by 13
interfacer/src/browsh/ui.go
update
called by 12
webext/src/dom/dimensions.js

Shape

Method 336
Function 154
Class 38
Struct 14

Languages

TypeScript52%
Go48%
Python1%

Modules by API surface

webext/src/dom/text_builder.js32 symbols
webext/src/dom/serialise_mixin.js31 symbols
interfacer/src/browsh/input_multiline.go28 symbols
webext/src/dom/graphics_builder.js27 symbols
webext/src/background/manager.js27 symbols
interfacer/src/browsh/frame_builder.go26 symbols
webext/src/dom/manager.js24 symbols
interfacer/test/tty/setup.go22 symbols
interfacer/src/browsh/raw_text_server.go22 symbols
interfacer/src/browsh/input_cursor.go20 symbols
webext/src/dom/dimensions.js19 symbols
webext/src/background/tty_commands_mixin.js18 symbols

Dependencies from manifests, versioned

github.com/NYTimes/gziphandlerv1.1.1 · 1×
github.com/fsnotify/fsnotifyv1.7.0 · 1×
github.com/gdamore/encodingv1.0.0 · 1×
github.com/go-errors/errorsv1.5.1 · 1×
github.com/lucasb-eyer/go-colorfulv1.2.0 · 1×
github.com/magiconair/propertiesv1.8.7 · 1×
github.com/mattn/go-runewidthv0.0.15 · 1×

For agents

$ claude mcp add browsh \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact