Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
srz (Summarize)
srz (Summarize) is a high-performance, modular Rust CLI tool for extracting and synthesizing structured summaries using local OpenAI-compliant LLMs (such as llama.cpp, Ollama, LM Studio, or vLLM) from:
- π Webpages & articles (Mozilla Readability extraction)
- πΊ YouTube video transcripts
- π PDF documents & local files
- β¨οΈ Unix stdin streams
- π Books
- π° Live news digests & universal RSS/Atom feeds
Highlights
%%{init: {"flowchart": {"minNodeWidth": 210, "minNodeHeight": 54}}}%%
flowchart LR
subgraph Sources["βββββInput Sources"]
S1["π Web & YouTube URLs"]
S2["π PDFs & Documents"]
S3["π Book Synopses"]
S4["π° Live News Feeds"]
end
subgraph Core["ββββsrz Core (100% Private)"]
C["β‘ Ingest & Chunking Pipeline\nπ 100% Local LLM Inference\nπ Summary Presets & Synthesis"]
end
subgraph Highlights["βββββKey Highlights"]
H1["β‘ Rich Terminal Paging"]
H2["π¬ Grounded Q&A Chat"]
H3["π₯οΈ TUI Dashboard View"]
H4["π Clean Reader Views"]
end
S1 --> C
S2 --> C
S3 --> C
S4 --> C
C --> H1
C --> H2
C --> H3
C --> H4
- π 100% Local & Private: Runs on your machine with complete privacy, zero subscriptions, and no API keys.
- π― 3 Summary Presets: Tailor output with
concise(default),bullets, anddetailed. - π§© Exact BPE Token Budgeting: Accurately bounds context windows via
tiktoken-rscl100k_base tokenizer, preventing context truncation on long documents. - π° Universal Syndication Feeds: Parses Google News, RSS 0.9/1.0/2.0, Atom, and JSON feeds seamlessly via
feed-rs. - π High-Fidelity Readability: Scores DOM container density via
dom_smoothieto strip ads, sidebars, and navbars. - β‘ Rich Terminal Paging: Syntax-highlighted CLI output with automatic paging for long summaries.
- π¬ Interactive Grounded Q&A: Ask questions grounded on any document or past read via
srz ask, with persistent multi-turn chat sessions, line editing, and history viarustyline. - π₯οΈ Interactive TUI Dashboard: Browse, search, filter, and copy past summaries with
srz browse. - π BM25 Full-Text Search: Embedded DuckDB indexes every read with relevance-scored BM25 search via
srz find. - π Reading Habits & Model Telemetry: Track reading streaks, time saved, active days, and P50/P95 model generation throughput with
srz stats. - ποΈ Consolidated Embedded Storage: High-speed, atomic caching and analytics powered entirely by embedded DuckDB (
cache.duckdbandsrz.duckdb). - π Distraction-Free Reader Views: Generates clean HTML (GFM tables, task lists, and strikethrough via
pulldown-cmark) and Markdown pages with dark mode support, opened seamlessly viaopen.
Prerequisites: LLM Backend Server
srz requires an OpenAI API-compliant LLM server. While cloud provider APIs (OpenAI, Anthropic, Google, Groq, etc.) are supported, running a local LLM is strongly preferred for complete privacy, zero subscription fees, and offline capability:
- macOS: Llama-macOS (recommended local default; connects out-of-the-box on port
9931). - Windows: Llama-Windows (recommended local default; connects out-of-the-box on port
9931). - Linux: llama.cpp (recommended local default; run
llama-server). - Other Backends: Compatible with Ollama, LM Studio, vLLM, or cloud providers (OpenAI, Anthropic, Google Gemini, Groq, etc.).
See Configuring Your LLM Backend below for step-by-step setup instructions and profile templates.
Installation
Quick Install
macOS & Linux:
|
Windows:
powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/NewGuy012/srz/master/scripts/install.ps1 | iex"
Homebrew (macOS & Linux)
Build from Source (Cargo)
If you prefer building with Rust from source:
Usage
Summarize
|
Ask & Chat
Library, Search & Telemetry
Cache & Storage Maintenance
Run srz --help to see all available subcommands and flags.
Features
- Universal Ingestion: Webpages, YouTube captions, PDFs, local text files, Unix pipes (
-), book synopses, and live news. - Interactive Q&A (
srz ask): Ask questions or launch an interactive multi-turn chat REPL grounded on any document or past read, with persistent DuckDB session storage (--chats,--resume). - TUI Dashboard (
srz browse): Browse, search, filter, and copy past summaries in a split-pane terminal UI. - 3 Summary Presets: Tailor summaries with
concise(default),bullets, ordetailed. - Offline BM25 Library Search: Embedded DuckDB indexes every read with Robertson-Sparck Jones BM25 relevance ranking (
srz find) and HTML dashboards (srz index). - Rich Habit & Model Telemetry: Track active reading days, reading streaks, estimated reading time saved, top domains, and P50/P95 token throughput percentiles (
srz stats). - Consolidated DuckDB Cache: Scraped pages, search candidates, and generated summaries are consolidated into embedded DuckDB (
cache.duckdb) with atomic writes and instant SQL TTL pruning. - Reader Views & Paging: Standalone dark-mode HTML/Markdown exports, plus automatic terminal paging (
less -RFX). - Map-Reduce Chunking: Splits and synthesizes long documents exceeding LLM context windows in parallel.
- Private & Secure: 100% local inference, zero tracking, safe Rust, private file permissions (
0700/0600), and SHA-256 verified binary updates. - Profiles & Diagnostics: Switch backends in
config.toml, test server health (srz doctor), and self-update (srz upgrade).
For architectural diagrams, lifecycle execution sequences, and in-depth subsystem specs, see
OVERVIEW.md.
Configuring Your LLM Backend
srz connects to any OpenAI-compatible API. Local inference is preferred for privacy and zero cost, but cloud providers are fully supported.
Local LLMs (Preferred)
- macOS & Windows (Default): Install Llama-macOS (macOS) or Llama-Windows (Windows). Launch the app and load a modelβ
srzconnects automatically tohttp://localhost:9931/v1with zero setup. - Linux: Build or install llama.cpp and launch
llama-server:# Start llama-server on port 9931 for zero configuration: # Or on default port 8080: - Diagnostics: Run
srz doctorto test server latency andsrz modelsto list loaded models.
Cloud Providers (Optional)
srz works with any OpenAI-compatible provider (OpenAI, Anthropic, Google, Groq, OpenRouter):
# Or on the fly via CLI flag:
Profile Switching (~/.config/srz/config.toml)
Run srz config init to generate a starter config, then configure named profiles:
# Default local model
= "http://localhost:9931/v1"
= "ggml-org/gemma-4-E4B-it-GGUF:Q8_0"
# Storage limits and retention policies
[]
= 500 # Disk budget (LRU eviction past threshold)
= 7 # Scraped web content & news TTL
= 14 # Book metadata & search candidates TTL
= 90 # Generated LLM outputs TTL
= true # Opportunistic 24h background pruning
# Cloud profile (e.g. OpenAI or Anthropic)
[]
= "https://api.openai.com/v1"
= "gpt-4o-mini"
= "sk-..."
Switch profiles on the fly with --profile:
Architecture & Modules
See OVERVIEW.md for detailed Mermaid architecture diagrams and execution sequences.
Running Tests & Static Analysis
# Run full automated test suite (119 tests)
# Strict static analysis (warnings denied)