This tool, called “Browsh” (which I just found recently) is a modern tool to view any website in the terminal! According to the website:
Browsh is a fully-modern text-based browser. It renders anything that a modern browser can; HTML5, CSS3, JS, video and even WebGL. Its main purpose is to be run on a remote server and accessed via SSH/Mosh or the in-browser HTML service in order to significantly reduce bandwidth and thus both increase browsing speeds and decrease bandwidth costs.
I just tried browsh
tool today, and the result is amazing! The interface of the webpage opened in the terminal is very similar to the webpage opened in the browser. (Though it can’t be that perfect, it’s still pretty good.)
It supports most of the websites, and can be run on any Linux distribution/Mac OS.
To Install on Ubuntu/Debian Based Distros:
To Install on Redhat/Fedora based Distros:
To Install on Arch/Arch Based Distros:
To Install on Mac OS:
Browsh depends on Firefox browser to load, render the web pages, etc.
According to the official website:
Browsh consists of a minimal Golang CLI client and a browser webextension. Most of the work is done by the webextension. When the CLI starts, it looks for a compatible browser (currently only Firefox) and starts it in headless mode. Once the browser has started it opens a remote debugging connection and installs the extension.
When a web page loads in the browser, custom scripts are injected into the page which then connect to Browsh’s background process in the webextension. This background process is itself connected to the CLI client via a websocket.
Well, we can control the website using our mouse, but using the keyboard shortcuts is much more better.
These are the keyboard shortcuts in Browsh:
Note that OSX users need to use the ⌘/Command
key instead of CTRL
.
F1
Opens the documentation
ARROW KEYS
, PGUP
, PGDN
Scrolling
CTRL+q
Exit app
CTRL+l
Focus the URL bar
BACKSPACE
Go back in history
CTRL+r
Reload page
CTRL+t
New tab
CTRL+w
Close tab
CTRL+\
Cycle to next tab
ALT+SHIFT+p
Takes a screenshot. The status bar will display the saved path
ALT+m
Toggles monochrome mode. Useful for overcoming rendering problems on older terminals.
ALT+u
Toggles the user agent between a desktop and a mobile device. Useful for smaller terminals that want to use a more suitable layout.
They have many things in the official docs, like the extensions, and much more! - HERE
This is all about Browsh! You can visit their homepage or their docs for more.
Thanks for reading :) If you have any questions, feel free to comment below or contact me