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
π Documentation: Visit the srz Documentation Site for full guides, tutorials, and command references.
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 device with zero fees and no API keys.
- π― 3 Summary Presets: Choose concise, bulleted, or detailed summaries.
- β‘ Zero-Worry Dynamic Sizing: Automatically probes server context (
n_ctx) and concurrency slots to size chunks and eliminate OOM crashes. - π» Laptop Hardware Optimization: Steers towards high-fidelity Google Gemma 4 (
Q8_0) models matched to your machine's unified memory. - π― Exact Server Tokenization: Queries the local LLM's native
/tokenizeendpoint for 0% tokenizer drift across code and multilingual text. - π° Google News Feeds: Summarize top stories and search topics by default.
- β‘ Terminal Paging: Clean CLI output with auto-paging for long summaries.
- π¬ Interactive Q&A: Chat and ask questions about any document or read with token-budgeted memory.
- π₯οΈ Terminal Dashboard: Browse, search, filter, and read past summaries.
- π Fast Offline Search: Find past summaries instantly without internet.
- ποΈ Local Smart Cache: Saves past reads and server capabilities locally for instant offline review.
- π Clean Reader Views: Distraction-free HTML and Markdown with dark mode.
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
0. Recommend Model & Context Length for Your Hardware
Before summarizing, run srz recommend (or srz doctor) to instantly inspect your host RAM/CPU and get the recommended model, optimal context window, and exact launch commands:
π‘ One-Command Decision: Auto-detects whether your device has 8GB, 16GB, 24β36GB, or 64GB+ unified memory, steers towards high-fidelity Google Gemma 4 (
Q8_0), selects the optimal context length (8k, 32k, 64k, or 128k), and prints ready-to-run startup commands for llama.cpp and Ollama!
Summarize
|
Ask & Chat
Library, Search & Telemetry
Cache & Storage Maintenance
Run srz --help to see all available subcommands and flags.
Features
- Universal Ingestion
- Interactive Q&A (
srz ask) - TUI Dashboard (
srz browse) - 3 Summary Presets
- Offline BM25 Library Search
For full guides and tutorials, visit the Documentation Website. 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.
π‘ Not sure which model or context length to choose? Run
srz recommendin your terminal. It instantly detects your machine's physical RAM, recommends the best high-fidelity Google Gemma 4 model (Q8_0), selects the optimal context length, and outputs ready launch commands for bothllama.cppandOllama!
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 & llama.cpp: Build or install llama.cpp and launch
llama-server:# Start llama-server on port 9931 with recommended Gemma 4 Q8_0 model: # Or on default port 8080: - Ollama: Run with explicit context window size (Ollama defaults to only 2048 tokens unless specified):
OLLAMA_NUM_PARALLEL=1 - Hardware & Context Recommendations: Run
srz recommendfor a fast 1-second advisory card, orsrz doctorfor full diagnostics including network latency, DuckDB integrity, and server context probing (n_ctx). - Manual Context Override: Override auto-detected context length on the fly via
--context-window <NUM>(orcontext_windowinconfig.toml).
Cloud Providers (Optional)
srz works with any OpenAI-compatible provider (OpenAI, Anthropic, Google, Groq, OpenRouter):
# Or on the fly via CLI flag:
Hardware-Tailored Configuration (srz config init)
Run srz config init to generate a ~/.config/srz/config.toml file pre-tailored to your computer's RAM, optimal model, and context window:
# Default local model tailored for your hardware
= "http://localhost:9931/v1"
= "ggml-org/gemma-4-E4B-it-GGUF:Q8_0"
= 32768
# 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:
Documentation & Architecture
- π Documentation Website: Comprehensive mdBook site covering installation, quick start, command reference, and configuration.
- ποΈ Architecture Overview (
OVERVIEW.md): Detailed Mermaid architecture diagrams, execution sequence flows, storage schemas, and subsystem specifications. - π¦ Rust Learning Guide (
RUST_LEARNING_GUIDE.md): Hands-on case study exploring Rust systems programming concepts and patterns using realsrzcode.
Running Tests & Static Analysis
# Run full automated test suite (120 tests)
# Strict static analysis (warnings denied)