about summary refs log tree commit diff stats
path: root/readme.md
blob: 8a682149912fa81706962f6743ad5e344bf8c639 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Chawan - a web browser for your terminal

## What is this?

A text-mode web browser. It displays websites in your terminal and allows
you to navigate on them.

It also functions as a pager, similarly to w3m.

## Compiling

1. Install the nim compiler: <https://nim-lang.org/install.html>
	* Please use 1.6.10, older versions will probably not work. (You
	  can check your nim compiler's version using `nim -v`.)
2. Install the following dependencies:
	* libcurl: <https://curl.se/libcurl/>
	* quickjs: <https://bellard.org/quickjs/>
3. Use one of the following:
	* `make release` - optimized release build
	* `make` - debug build (slow, for development)

## Features

Currently implemented features are:

* a multi-charset, double-width capable, multi-processing pager
* a CSS-capable layout engine (with forms, tables...)
* incremental loading of plain text streams
* JavaScript based navigation, (very) basic JS support in documents
* cookies

...with a lot more planned.

## Caveats

Chawan is still an experimental web browser with some serious limitations:

* Chawan uses uses its own browser engine, mostly implemented from
  scratch. Expect bugs and missing features.
* Chawan has no incremental layouting capabilities yet, so it is rather slow
  on large websites with complicated layout.
* While buffers run as separate processes, Chawan does not do any actual
  sandboxing. I would strongly advise against enabling scripting until this
  problem is resolved.

## Configuration

See [doc/config.md](doc/config.md).

## Neighbors

Many other text-based web browsers exist. Here's some recommendations if you
want to try more established ones:

* w3m - A text-mode browser, extensible using local-cgi. Also has inline
  image display and very good table support. Heavily inspired Chawan.
* elinks - Has CSS and JavaScript support, and incremental rendering
  (it's pretty fast.)
* lynx - "THE text-based web browser."
* edbrowse - This one looks more like `ed` than `less` or `vi`. Mainly
  designed for blind users.
* browsh - Firefox in your terminal.

## Why write another web browser?

I've found other text-based web browsers insufficient for my needs, so
I thought it'd be a fun excercise to write one by myself, for myself.

Generally, I'm happy if Chawan works on websites I use frequently. If it
also works on other websites, that's a bonus.

## Where are the w3m keybindings?

At [bonus/w3m.toml](bonus/w3m.toml). Note that not every w3m feature is
implemented yet, so it's not 100% compatible.

I use vi for editing text, and I prefer my pager to function similarly to
my editor. Hence the default vi-like keybindings.