PERUSE 1.0 · MACOS & WINDOWS

Your agent writes the code.
You read it here.

A native code & Markdown reader for the AI coding age. Three megabytes, opens in an instant, and shows only your file tree and your text — plus walkthroughs your agent can lead, and a timeline that catches every edit it makes.

14-day full trial · no account · Universal for Apple silicon & Intel

Live miniature Peruse window showing an AI edit arriving in src/engine.ts, followed by an agent-led walkthrough spotlight with interactive branch signposts.

edited 6 min ago
1import { LRUResultCache } from './cache';2import type { QueryOptions, SearchHit } from './types';34export function createQueryEngine(indexDocs: SearchHit[]) {5  const cache = new LRUResultCache(128);67  return async function runQuery(rawQuery: string, opts: QueryOptions = {}): Promise<SearchHit[]> {8    if (opts.signal?.aborted) return [];9    const query = rawQuery.trim().toLowerCase();10    if (!query) return [];1112    const cached = cache.get(query);13    if (cached) {14      return cached.slice(0, opts.limit ?? 25);15    }1617    if (opts.regex) {18      const pattern = new RegExp(rawQuery, 'i');19      return indexDocs.filter((doc) => pattern.test(doc.snippet)).slice(0, opts.limit ?? 25);20    }21Step 2 · Fork · src/engine.tsL7–21runQuery — three-way dispatchSplits on abort signal, LRU cache hit and regex flag — click a signpost or press 1 to follow the fast path.22    const limit = opts.limit ?? 25;23    const matched = indexDocs24      .filter((doc) => doc.snippet.toLowerCase().includes(query))25      .sort((a, b) => b.score - a.score)26      .slice(0, limit);2728    cache.set(query, matched, opts.cacheTtlMs ?? 30_000);29    return matched;30  };31}

This is real HTML, not a video — click around.

01 — WALKTHROUGH

Let your agent walk you through the code.

Ask your agent. Peruse opens with a route map of the logic, then walks you through the real code — step by step, fork by fork.

An AI agent is asked about the query pipeline, calls the viewer_walkthrough MCP tool, and Peruse opens on the route map before walking through the code.

~/work/lumina — agent
  1. Agent ready · MCP server "viewer" connected
    cwd ~/work/lumina
  2. How does the query pipeline handle caching and branch routing?
  3. Thinking…
  4. Read(src/engine.ts)
    31 lines
  5. viewer · viewer_walkthrough (MCP)
    project: "lumina" · mode: review · 4 steps · 3 branches
    Done · pushed to Peruse — lumina
  6. I've laid out this logic in Peruse — opening the walkthrough now.
Ask about this codebase…
⏎ send · esc interrupt
Review Retrieval pipeline dispatch & cache review Issue 1 Optimize 2
Route map4 steps · 3 branches · Esc for code
Route map — the whole logic at a glance

02 — TIMELINE ⌘Y

Every AI edit, kept on file.

Every AI edit is kept as a local snapshot. ⌘Y shows what changed; ⌘↩ takes you back.

Interactive snapshot timeline showing automatic local snapshots, calm warm-green and terracotta diffs, draggable scrub handle, and lossless rollback.

router.ts engine.ts × ARCHITECTURE.md
edited 6 min ago
1import { LRUResultCache } from './cache';2import type { QueryOptions, SearchHit } from './types';34export function createQueryEngine(indexDocs: SearchHit[]) {5  const cache = new LRUResultCache(128);67  return async function runQuery(rawQuery: string, opts: QueryOptions = {}): Promise<SearchHit[]> {8    if (opts.signal?.aborted) return [];9    const query = rawQuery.trim().toLowerCase();10    if (!query) return [];1112    const cached = cache.get(query);13    if (cached) {14      return cached.slice(0, opts.limit ?? 25);15    }1617    if (opts.regex) {18      const pattern = new RegExp(rawQuery, 'i');19      return indexDocs.filter((doc) => pattern.test(doc.snippet)).slice(0, opts.limit ?? 25);20    }2122    const limit = opts.limit ?? 25;23    const matched = indexDocs24      .filter((doc) => doc.snippet.toLowerCase().includes(query))25      .sort((a, b) => b.score - a.score)26      .slice(0, limit);2728    cache.set(query, matched, opts.cacheTtlMs ?? 30_000);29    return matched;30  };31}
Timeline open · drag handle or press ↑ ↓ to scrub

03 — READING ⌘E

Book-grade Markdown. Compiler-grade jumps.

Markdown set like a book. Hold ⌘ and click any symbol to land on its definition.

Interactive showcase switching between synchronized Markdown Reader/Split/Source view and ⌘-click cross-file definition jumps with References · 7 peek.

router.ts engine.ts ARCHITECTURE.md ×
1# Lumina Architecture Overview23Lumina is a lightweight, zero-dependency local indexing engine4designed for sub-10ms document retrieval and memory bounds.56## Core Design Principles781. **Zero Background Bloat**: Index segments stay compact.92. **Cancellation First**: Accepts standard `AbortSignal`.103. **Composable Routing**: Pinned & corpus merge in `SearchRouter`.1112## Query Pipeline Latency1314| Stage | Target Budget | Implementation |15| --- | --- | --- |16| Tokenize & Normalize | `< 0.4 ms` | `runQuery()` |17| LRU Cache Lookup | `< 0.1 ms` | `LRUResultCache` |18| Ranked Merge | `< 2.5 ms` | `SearchRouter.dispatch()` |1920## Quick Example21```ts22const runQuery = createQueryEngine(corpus);23const results = await runQuery('abort signal', { limit: 10 });24```

Lumina Architecture Overview

Lumina is a lightweight, zero-dependency local indexing engine designed for sub-10ms document retrieval and predictable memory bounds.

Core Design Principles

  1. Zero Background Bloat: Index segments stay compact in memory with deterministic LRU eviction.
  2. Cancellation First: Every query pipeline accepts a standard AbortSignal so stale keystrokes cancel immediately.
  3. Composable Routing: Pinned workspace documents and standard corpus results merge cleanly in SearchRouter.

Query Pipeline Latency

StageTarget BudgetImplementation
Tokenize & Normalize< 0.4 msrunQuery() in src/engine.ts
LRU Cache Lookup< 0.1 msLRUResultCache in src/cache.ts
Ranked Merge< 2.5 msSearchRouter.dispatch()

Quick Example

const runQuery = createQueryEngine(corpus);
const results = await runQuery('abort signal', { limit: 10 });
Markdown · ⇧⌘E synchronised split

Get Peruse

Free for 14 days — every feature, no account.

Download for macOS Universal DMG · 3.1 MB
Download for Windows Setup · 7.0 MB · Portable .zip
$4.99

One-time purchase · lifetime · Mac & Windows · core reading free forever

Already purchased? Find your key →

Also on the Mac App Store, as a sandboxed edition →