summera
Intelligent webpage summarisation powered by LLMs with a beautiful TUI.
Features
- Structured Intelligence: Returns typed summaries with key points, conclusions, entities, and action items
- Hybrid Storage: sled for persistent storage, tantivy for full-text search
- Provider Agnostic: Supports Gemini and OpenAI via rstructor
- Beautiful TUI: Split-pane interface with summary list and scrollable detail view
- CLI Support: Use from the command line for scripting and automation
Installation
Usage
TUI Mode (default)
Simply run summera to launch the interactive TUI:
Key bindings:
o- Open a URL to summarisef- Search stored summaries↑/↓orj/k- Navigate summary listTab- Switch between list and detail panesPageUp/PageDown- Scroll detail viewEsc- Clear search / Cancel dialogueq- Quit
CLI Mode
Summarise a webpage
Example:
View raw extracted text
Search stored summaries
Example:
List all stored summaries
Configuration
On the first run, summa will automatically create a default configuration file at the standard location for your
operating system:
- macOS:
~/Library/Application Support/summa/summa.toml - Linux:
~/.config/summa/summa.toml - Windows:
%APPDATA%\summa\summa.toml
Summa looks for configuration in the following locations (in order):
./summera.toml(current directory)summera.tomlin default config directory
If no config file exists, a default one is created automatically.
Example summera.toml
[agent]
provider = "gemini" # "gemini" or "openai"
model = "gemini-2.0-flash" # Model identifier
persona = "You are a senior research assistant specialising in technical synthesis."
prompt = "Can you provide a comprehensive summary of the given text? The summary should cover all the key points and main ideas presented in the original text, while also condensing the information into a concise and easy-to-understand format. Please ensure that the summary includes relevant details and examples that support the main ideas, while avoiding any unnecessary information or repetition. The length of the summary should be appropriate for the length and complexity of the original text, providing a clear and accurate overview without omitting any important information. Use British English spelling and conventions throughout your response." # Customise the summarisation prompt
[storage]
path = "/path/to/data" # Where to store summaries
[api]
gemini_key = "AIza..."
API Keys
Use the section in summera.toml or set your API key as an environment variable:
# For Gemini
# For OpenAI
Data Storage
Summa stores data in two locations within the configured storage path:
- sled database: Stores full summary data with timestamps
- tantivy index: Full-text search index for fast querying
Default location: ~/.local/share/summera_data/
Architecture
src/
├── main.rs # CLI entry point and argument parsing
├── lib.rs # Library exports
├── agent.rs # LLM integration via rstructor
├── config.rs # Configuration loading and management
├── scraper.rs # Web content extraction
├── search.rs # Tantivy full-text search
├── storage.rs # Sled persistent storage
├── summary.rs # Summary data structure
└── ui.rs # Ratatui TUI implementation
Dependencies
- rstructor: Structured LLM outputs with schema enforcement
- ratatui: Terminal UI framework
- sled: Embedded database for storage
- tantivy: Full-text search engine
- reqwest: HTTP client for web scraping
- scraper: HTML parsing and content extraction
- tokio: Async runtime
- clap: CLI argument parsing
License
MIT
Contributing
Contributions are welcome! Please feel free to open an issue or submit a pull request.