Wiki

Complete reference for all brt commands.

Installation

brt is installed directly from this site. The install box detects your OS and shows the matching command — macOS/Linux use brt, Windows uses brtwin.

Click to copy the one-liner for your platform:

Install with one command (macOS / Linux)
curl -fsSL https://brt.sushii.dev/install.sh | sh

Windows: irm https://brt.sushii.dev/win/install.ps1 | iex

What the installer does:

Override the download URL (for self-hosting):

BRT_BASE_URL=https://brt.sushii.dev curl -fsSL https://brt.sushii.dev/install.sh | sh

The full source code is published at /source — same files the installer downloads, MIT licensed.

Syntax

All commands follow the pattern:

brt -<command> [arguments...]

Run brt -help for a quick reference.

Networking

CommandDescription
brt -ip [check|local|public|interfaces]Show local/public IP or interface details
brt -dns <host> [type]DNS lookup (A, AAAA, MX, TXT, NS, CNAME, etc.)
brt -portscan <host> [ports]Scan ports — single, range (1-1024), or comma-separated
brt -ping <host> [-c count]Ping a host
brt -whois <domain|ip>WHOIS lookup
brt -traceroute <host>Trace network route
brt -reverse <ip>Reverse DNS lookup
brt -headers <url>Fetch HTTP response headers
brt -ssl <host> [port]Check SSL certificate and expiry
brt -curl <url> [flags...]curl with response stats
brt -post <url> [flags...]Send POST requests with curl-style flags

Examples

brt -ip check
brt -dns google.com MX
brt -ssl github.com
brt -headers https://example.com
brt -post https://httpbin.org/post -d 'hello=world'
brt -portscan localhost 1-1024
brt -ping 8.8.8.8 -c 3

Command chains (-run)

Chain commands separated by semicolons. Use wait N to pause for N seconds between steps.

brt -run 'echo "hello world";wait 5;echo "bye"'
brt -run echo hello wait 5 echo bye
brt -run my_zsh_function wait 1 other_function

Quote the chain if it contains semicolons, or use spaces with wait N as its own word. Shell functions from your .zshrc work in the chain.

If any command fails (non-zero exit), the chain stops immediately.

Editor (-edit)

A simple line-based editor — easier than nano for quick edits.

brt -edit myfile.txt
KeyAction
lList all lines with numbers
g <n>Go to line n
i <text>Insert line after current
r <text>Replace current line
a <text>Append to current line
dDelete current line
s <n> <text>Set line n to text
wSave (write) file
qQuit (prompts if unsaved)

Remote access (-access)

Secure terminal relay with token authentication. The server generates a random token; clients must provide it to connect.

Start a relay (on the host machine)

brt -access serve
# Optional: custom port
brt -access serve -p 9000

Output includes an endpoint (IP:port) and secret token.

Connect (from another machine)

brt -access connect 192.168.1.10:8765 <token>

While connected, type exit in the remote shell to disconnect. From another terminal on the same machine, run brt -access leave to end your session without stopping the server.

Manage

brt -access status   # Show running server info
brt -access stop      # Stop the relay (server host only)
brt -access leave     # Disconnect your client session

Security note: The relay uses token auth over TCP. Use only on trusted networks or behind a VPN/firewall. Tokens are stored in ~/.brt/access.info.

Text & Data

CommandDescription
brt -json [file|-]Pretty-print JSON
brt -encode <string|file>Base64 encode
brt -decode <string|file>Base64 decode
brt -hash <algo> <input>Hash (md5, sha1, sha256, sha512)
brt -urlencode <string>URL-encode a string
brt -urldecode <string>URL-decode a string
brt -grep <pattern> [path...]Search files with line numbers
brt -uuidGenerate UUID
brt -pass [length]Generate secure password

Media

View images and play videos directly in your terminal.

CommandDescription
brt -image <file> [-x cols] [-y rows]Render an image (chafa, viu, imgcat, or ASCII)
brt -video <file|url> [--no-audio]Play video from a file, direct URL, or YouTube link
brt -doom [--wad file] [--scaling N]Play Doom in the terminal (Freedoom WAD auto-downloaded)

While playing, brt temporarily shrinks the terminal font (iTerm2, Kitty, WezTerm, Ghostty) so more character cells fit on screen — higher resolution. Use --no-tiny-font or BRT_VIDEO_TINY_FONT=0 to disable.

Recommended tools

brew install chafa mpv yt-dlp
# chafa — image rendering
# mpv — terminal video playback
# yt-dlp — YouTube and stream URLs

Examples

brt -image photo.png -x 120 -y 30
brt -video movie.mp4 -x 120 -y 30
brt -video https://example.com/clip.mp4
brt -video 'https://www.youtube.com/watch?v=...'
brt -video clip.mp4 --no-audio
brt -doom

Doom controls

KeyAction
W A S DMove
Arrow keysTurn
SpaceUse doors / switches
Right ShiftFire

System

CommandDescription
brt -serve <port> [dir]Static file HTTP server
brt -watch <cmd>Re-run command every 2 seconds
brt -listen [port]Show listening ports or check one
brt -killport <port>Kill process using a port
brt -du [path] [depth]Disk usage summary
brt -extract <archive> [dest]Extract zip/tar/tar.gz
brt -sysinfoSystem information
brt -publickey [key.pub]Show and copy SSH public key
brt -timestamp [now|unix|date]Convert or show timestamps
brt -timer <seconds> [msg]Countdown timer
brt -calc <expression>Calculator
brt -env [pattern]List environment variables
brt -which-all <cmd>Find all PATH matches
brt -speedQuick download speed test
brt -weather [location]Current weather
brt -qr <text>QR code in terminal (needs qrencode)
brt -updateCheck for updates and install from site
brt -uninstallRemove brt from this system
brt -versionShow installed version

Updates (-update)

Check brt.sushii.dev for a newer version. If an update is available, brt prompts before downloading.

brt -update

Press Y or Enter to install; n to cancel.

Uninstall (-uninstall)

Remove brt, its symlink, install directory, and config. Press Enter to confirm.

brt -uninstall