SLBrowser 🔍🧠
AI-Powered Terminal Web Browser for Content Analysis and Research
SLBrowser is a modern, intelligent terminal-based web browser that combines web scraping, AI-powered content analysis, and beautiful terminal formatting to provide an efficient research and content exploration experience directly from your command line.
✨ Features
🔍 Smart Web Search & Analysis
- Unified Search & Analysis:
/findcommand searches and analyzes multiple results automatically - Step-by-step Analysis: Traditional
/search+/openworkflow for detailed control - DuckDuckGo Integration: Privacy-focused web search
- Configurable Depth: Analyze 1-10 search results at once
🧠 AI-Powered Content Analysis
- Google Gemini Integration: State-of-the-art AI analysis using Pydantic AI
- Structured Output: WebCards with summaries, key facts, dates, and links
- Confidence Scoring: AI provides confidence ratings for each analysis
- Streaming Support: Real-time analysis progress updates
🎨 Beautiful Terminal Interface
- Rich Formatting: Colorful, responsive terminal UI using Rich library
- ASCII Art Branding: Eye-catching SLBrowser logo
- Progress Indicators: Visual feedback for all operations
- Error Handling: Graceful error display and recovery
⚡ Performance & Usability
- Async Operations: Non-blocking web requests and AI processing
- Smart Caching: Search result and analysis caching
- Command Aliases: Short commands (
/f,/s,/k, etc.) for power users - Persistent Config: API keys saved locally for seamless usage
🚀 Installation
From PyPI (Recommended)
pip install slbrowser
From Source
git clone https://github.com/antonvice/slbrowser.git
cd slbrowser
pip install -e .
🔧 Setup
-
Get a Google Gemini API Key
- Visit Google AI Studio
- Create a free API key
- Copy the key for the next step
-
Configure SLBrowser
slbrowser # On first run, set your API key: /key YOUR_API_KEY_HERE
Your API key will be securely saved to ~/.slbrowser/api_key.txt for future sessions.
📖 Usage
SLBrowser provides two interfaces:
slbrowser: Interactive Terminal User Interface (TUI) with commands like/find,/search,/keyslb: Command Line Interface (CLI) for direct command execution with arguments
Launch SLBrowser
Interactive TUI (Recommended)
slbrowser
Command Line Interface
# For direct command execution
slb search "your query" --max-results 3
slb analyze https://example.com
Basic Commands
🔍 Find & Analyze (Recommended)
# Search and analyze top 5 results automatically
/find python machine learning tutorials
# Analyze specific number of results (1-10)
/find quantum computing 3
# Short alias
/f artificial intelligence trends 2024
🔎 Traditional Search
# Search only (no analysis)
/search web scraping python
/s data science tools
# Then analyze specific results
/open 1 # Analyze first result
/o 3 # Analyze third result
🌐 Direct URL Analysis
# Analyze any webpage directly
/url https://docs.python.org/3/tutorial/
/u https://github.com/trending
⚙️ Configuration
# Set API key
/key YOUR_NEW_API_KEY
/k YOUR_NEW_API_KEY
# Clear API key
/key clear
# Check status
/status
# Clear screen
/clear
/c
# Get help
/help
/h
# Quit
/quit
/q
Command Aliases
| Full Command | Alias | Description |
|---|---|---|
/find |
/f |
Search and analyze multiple results |
/search |
/s |
Search only (no analysis) |
/open |
/o |
Analyze search result by number |
/url |
/u |
Analyze URL directly |
/key |
/k |
Set/clear API key |
/clear |
/c |
Clear screen |
/help |
/h |
Show help |
/quit |
/q |
Exit SLBrowser |
🎯 Use Cases
📚 Research & Learning
- Quickly analyze multiple sources on a topic
- Get structured summaries of complex articles
- Extract key facts and dates from content
- Discover related links and resources
💼 Professional Analysis
- Market research and trend analysis
- Competitive intelligence gathering
- Technical documentation review
- News and industry monitoring
🔬 Academic Work
- Literature review and source analysis
- Fact-checking and verification
- Research paper preparation
- Educational content exploration
🏗️ Architecture
SLBrowser is built with modern Python practices:
- Pydantic AI: Structured AI outputs with Google Gemini
- Rich: Beautiful terminal formatting and progress indicators
- httpx: Modern async HTTP client for web requests
- BeautifulSoup: HTML parsing and content extraction
- ddgs: Privacy-focused DuckDuckGo search
Project Structure
slbrowser/
├── __init__.py # Package initialization and exceptions
├── __main__.py # Entry point and logging setup
├── ai.py # Pydantic AI integration with Gemini
├── config.py # Configuration management
├── models.py # Pydantic data models
├── search.py # DuckDuckGo search functionality
├── tui.py # Rich-powered terminal interface
└── web.py # Web scraping and content extraction
🤝 Contributing
We welcome contributions! Here's how to get started:
-
Fork the Repository
git clone https://github.com/antonvice/slbrowser.git cd slbrowser
-
Set Up Development Environment
pip install -e ".[dev]"
-
Run Tests
pytest mypy slbrowser/ ruff check slbrowser/
-
Submit Pull Request
Development Tools
- Testing: pytest, pytest-asyncio, pytest-cov
- Type Checking: mypy
- Linting: ruff
- Formatting: ruff format
📄 License
MIT License - see LICENSE file for details.
👨💻 Author
Anton Vice - CTO, SelfLayer 📧 anton@selflayer.com 🐙 GitHub 🔗 LinkedIn
🙏 Acknowledgments
- Pydantic AI for structured AI outputs
- Rich for beautiful terminal formatting
- DuckDuckGo for privacy-focused search
- Google Gemini for powerful AI analysis
📊 Changelog
v0.1.0 (2024-09-14)
- 🎉 Initial release
- ✨ Unified
/findcommand for search + analysis - 🧠 Google Gemini AI integration
- 🎨 Rich terminal interface
- ⚡ Async operations and caching
- 🔧 Command aliases and persistent config
Made with ❤️ for researchers, developers, and curious minds everywhere.
SLBrowser - Because the web deserves intelligent exploration.
Metadata
Release files for slbrowser 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| slbrowser-0.1.2.tar.gz | 39.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| slbrowser-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 74.0 kB
Release files / slbrowser-0.1.2.tar.gz
| Download URL | slbrowser-0.1.2.tar.gz |
|---|---|
| Size | 39.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d4e187968d7fc34bfea275eb3b65ad3d3fbb4fcc46b5141a769b84d5b8bb1a6
|
|
BLAKE2b-256 checksum How to use checksums |
27432df69b74e998c41e852cd322fa3ecc3813d3b63ae75e13254185d5e8ac46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.5
|
Release files / slbrowser-0.1.2-py3-none-any.whl
| Download URL | slbrowser-0.1.2-py3-none-any.whl |
|---|---|
| Size | 34.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8eb0612c11662781efde85e705ffacfc0c91f73410646577b967f0ba427d973e
|
|
BLAKE2b-256 checksum How to use checksums |
c2e3978361b57e1dc947710b61590325aaa01e651bdb36219bfe0aa9665c1be0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.5
|