← 返回命令列表

Linux command

chawan 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Open

cha [example.org]

View

cha [README.md]

Dump

cha -d [https://example.org]

Open

cha -V

Pipe

cat [file.html] | cha -T text/html

Override

cha -o display.color-mode=eight-bit [example.org]

说明

Chawan (Japanese for "tea bowl") is a text-mode web browser and terminal pager with its own browser engine built from scratch in Nim. Despite being a terminal browser, it can display many websites with layout fidelity comparable to graphical browsers. Features include HTML5 support with multiple encodings, a CSS layout engine supporting flow layout, tables, and flexbox, inline images via Sixel or Kitty graphics protocol (disabled by default), optional JavaScript via QuickJS (disabled by default), and multi-protocol support for HTTP(S), FTP, Gopher, Gemini, Finger, and Spartan. It uses vi(m)-like keybindings, supports mouse input, has a multi-process architecture with incremental document loading, and provides syscall sandboxing on FreeBSD, OpenBSD, and Linux.

参数

-c, --css _stylesheet_
Temporarily append a CSS stylesheet to the user stylesheet.
-d, --dump
Headless mode; sequentially prints opened files to stdout. Implicitly enabled when stdout is not a tty.
-o, --opt _config_
Pass temporary TOML configuration options.
-r, --run _script_
Execute a JavaScript string or file; .mjs files run as ES modules.
-v, --version
Display version and exit.
-C, --config _file_
Override the default configuration file search path.
-I, --input-charset _charset_
Override input character set for all files.
-M, --monochrome
Force monochrome output.
-O, --output-charset _charset_
Override output character set.
-T, --type _content-type_
Override content type of all input files.
-V, --visual
Start in visual mode, opening the configured home page.
-h, --help
Print help and exit.

FAQ

What is the chawan command used for?

Chawan (Japanese for "tea bowl") is a text-mode web browser and terminal pager with its own browser engine built from scratch in Nim. Despite being a terminal browser, it can display many websites with layout fidelity comparable to graphical browsers. Features include HTML5 support with multiple encodings, a CSS layout engine supporting flow layout, tables, and flexbox, inline images via Sixel or Kitty graphics protocol (disabled by default), optional JavaScript via QuickJS (disabled by default), and multi-protocol support for HTTP(S), FTP, Gopher, Gemini, Finger, and Spartan. It uses vi(m)-like keybindings, supports mouse input, has a multi-process architecture with incremental document loading, and provides syscall sandboxing on FreeBSD, OpenBSD, and Linux.

How do I run a basic chawan example?

Run `cha [example.org]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -c, --css _stylesheet_ do in chawan?

Temporarily append a CSS stylesheet to the user stylesheet.