Skip to content
/ awrit Public

A full graphical web browser for Kitty terminal with mouse and keyboard support

License

Notifications You must be signed in to change notification settings

chase/awrit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actual Web Rendering in Terminal

Or just awrit.

awrit-demo.mp4

Yep, actual Chromium being rendered in your favorite terminal that supports the Kitty terminal graphics protocol.

awrit works best in Kitty v0.28 or newer

Why?

  • Display documentation from DevDocs
  • Watch the changes from Vite come to life
  • Tiled layout without a tiling window manager using Kitty's layouts
  • Add fancy UI using web technologies, so NeoVim can pretend it is Emacs instead of the other way around

Installing from Brew (macOS only)

brew install chase/tap/awrit

Building

Prerequisites

  • CMake v3.22 or newer
  • Ninja

Linux:

  • Install these packages: build-essential ninja-build cmake
  • For ArchLinux install these packages using sudo pacman -S ninja cmake base-devel

macOS:

  • Xcode 14.3, try xcodes
  • Brew: brew install ninja cmake
  • MacPorts: port install ninja cmake

cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -S . -B build
cmake --build build

# The resulting build will be located in build/awrit/Release
# The build can be run from the top-level directory with ./build/awrit/Release/awrit

Installing from Source

After building:

# install to the prefix ~/.local
cmake --install build --prefix ~/.local

# or if you're feeling adventurous 
# install to the prefix /usr/local
# sudo cmake --install build --prefix /usr/local

If the installation prefix is in your PATH, it can be run with awrit.
You can check if awrit is in your PATH with which awrit.

Usage

awrit [url]

# if url is not provided, it will go to the awrit homepage (this is temporary, promise)
# the URL protocol can be http:, https:, or data:
# if the URL protocol is not included, https: is used by default

The data: URL in the demo video is the following:

awrit 'data:text/html;base64,PCFET0NUWVBFIGh0bWw+PGh0bWw+PGhlYWQ+PHN0eWxlPjpyb2
90ey0tYmFja2dyb3VuZDojMjMyYTJlOy0tYmFzZTojRDNDNmFhOy0tYWNjZW50OiM4M2MwOTI7LS1za
GFkb3c6IzRGNUI1OH1odG1se2Rpc3BsYXk6Z3JpZDtoZWlnaHQ6MTAwJ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dpZHRoe2Zyb217bWF4LXdpZHRoOjB9dG97bWF4LXdpZHRoOjEwMC
V9fUBrZXlmcmFtZXMgbWF4LWhlaWdodHtmcm9te21heC1oZWlnaHQ6MH10b3ttYXgtaGVpZ2h0OjEwM
CV9fTwvc3R5bGU+PC9oZWFkPjxib2R5PjxwIGNsYXNzPSJjb29sIj48c3BhbiBkYXRhLXRleHQ9IkFX
UklULCI+QVdSSVQsPC9zcGFuPgo8c3BhbiBkYXRhLXRleHQ9IlRIQVQnUyI+VEhBVCdTPC9zcGFuPgo
8c3BhbiBkYXRhLXRleHQ9IlBSRVRUWSI+UFJFVFRZPC9zcGFuPgo8c3BhbiBkYXRhLXRleHQ9IkNPT0
wiPkNPT0w8L3NwYW4+CjwvcD48L2JvZHk+PC9odG1sPg=='

About

A full graphical web browser for Kitty terminal with mouse and keyboard support

Resources

License

Stars

Watchers

Forks