Tvali

A lens browser for developers

Tvali is an experimental, open-source browser for macOS. Web pages remain fully interactive and unchanged. Tvali builds a structured model of each page and lets you explore it through different lenses: a distraction-free Reader, an Outline that stays with you as you navigate, and Portals that take you back to anything a lens leaves out.

Source on GitHub Build from source

Try it on this page

Why an eye

Most browsers show you a webpage as it appears on screen. Tvali goes a step further. It reveals the structure behind the page - its headings, code, tables, and the elements that shape what you see.

The logo reflects this idea: two code brackets with an eye between them. The page stays the same. What changes is how you see it.

The live page is always there

Most reader modes create a copy of a webpage, leaving the original behind. Tvali takes a different approach. Every page loads in a standard WKWebView, keeping the original fully live and always just one keystroke away.

Alongside it, a lightweight extractor builds a PageModel containing the page's headings, paragraphs, code, tables, images and links - represented as plain text, URLs and numbers.

Lenses work with this model. They never replace the original page. They simply offer another way to explore it.

Four ways to explore a page

Each lens presents a different view of the same PageModel. Switching between them never reloads the page.

Reader

A native, centered reading column designed for documentation: proportional typography, syntax-highlighted code in a monospaced font, tables, callouts and images. Tvali supports sites such as MDN, the Swift book, Python documentation, the Rust book and Wikipedia.

Outline

A tree of the page's headings in a side panel. It stays synchronized as you scroll, both in Reader and on the live page. Navigate with j and k, collapse and expand sections with h and l, and jump to a heading with Return.

Video pages

Pages centered around video open in Reader with the page's own player, so playback continues without restarting. Chapters, transcripts, full-screen playback and Picture in Picture are all available.

Portals

Content that a lens can't safely display - forms, embedded content and widgets - appears as a visible card. Open a Portal and Tvali switches to the live page, scrolls to the exact location and brings that element into focus.

Designed for the keyboard

Single-key commands work like those in a modal editor. Keys are recognized by their physical position, so the shortcuts work with a Georgian keyboard layout too. When a text field on the page has focus, keystrokes are passed through to the page.

KeyAction
⌘LEnter a URL, domain or search query
r · ⌘⇧RSwitch between Reader and the live page
o · ⌘⇧OShow or hide the Outline
j · kScroll by one line, or move between sections in the Outline
d · uMove half a page down or up
gg · GJump to the top or bottom
h · lCollapse or expand a section in the Outline
EscReturn to the page
⌃⌘1–4Choose one of four visual styles

Four styles, one app

Choose a style for the app and, if you prefer, a different one for Reader. Pair a Terminal-style interface with a Paper Reader for long reading sessions. This website uses the same four styles. Try them out.

The picture follows the style you pick.

Modern
Dark and understated, with a single blue accent. The default style.
Minimal
Monochrome, serif typography, underlined links and minimal dividers.
Terminal
Green phosphor on black, monospaced throughout, square corners, ## headings and a subtle glow.
Paper
Light and warm, with a paper-like feel, serif typography and a rust-colored accent.
// Tvali/Design/Theme.swift
static let all: [Theme] = [.modern, .minimal, .terminal, .paper]

func selectChrome(_ id: Theme.ID) {
    if id != chromeTheme.id {
        chromeTheme = Theme.with(id)
        defaults.set(id.rawValue, forKey: Key.chrome)
    }
    if readerFollowsApp { setReader(id) }
}

Code is monospaced in every style, and all four styles meet WCAG AA contrast requirements. Reader code highlighting follows each style’s own color palette.

Private by design

  • The extractor runs in an isolated content world and never changes the page.
  • Lenses work exclusively with text, URLs and numbers. They never render page HTML.
  • Reader images load without cookies or a referrer.
  • No telemetry. The observation log stays on your Mac.

How it works

Live page (WKWebView)  ── extractor.js in an isolated WKContentWorld
                          └─ posts PageModel JSON
PageModel (Swift, validated + sanitized)
   ├── Reader lens
   └── Outline lens

The extractor is a single, plain JavaScript file, with an environment-agnostic core and a thin WebKit-specific layer. The Swift side validates and sanitizes the model before it reaches any lens. Forms, media and widgets remain on the live page.

Swift 6 · SwiftUI · AppKit · WKWebView · extractor.js

Build it yourself

You need macOS 15 or later and Xcode 26 or later. There are no third-party dependencies.

git clone https://github.com/lasha3901/tvali.git
cd tvali
open Tvali.xcodeproj

Select the Tvali scheme and My Mac, then press ⌘R. Run the tests with ⌘U.

Issues and ideas are welcome on GitHub.