Skip to main content

SLBrowser - AI-powered terminal web browser for content analysis and research

Project description

SLBrowser ๐Ÿ”๐Ÿง 

AI-Powered Terminal Web Browser for Content Analysis and Research

PyPI version Python 3.11+ License: MIT

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: /find command searches and analyzes multiple results automatically
  • Step-by-step Analysis: Traditional /search + /open workflow 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

  1. Get a Google Gemini API Key

  2. Configure SLBrowser

    slb
    # 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

Launch SLBrowser

slb

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:

  1. Fork the Repository

    git clone https://github.com/antonvice/slbrowser.git
    cd slbrowser
    
  2. Set Up Development Environment

    pip install -e ".[dev]"
    
  3. Run Tests

    pytest
    mypy slbrowser/
    ruff check slbrowser/
    
  4. 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

๐Ÿ“Š Changelog

v0.1.0 (2024-09-14)

  • ๐ŸŽ‰ Initial release
  • โœจ Unified /find command 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slbrowser-0.1.0.tar.gz (38.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slbrowser-0.1.0-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

Details for the file slbrowser-0.1.0.tar.gz.

File metadata

  • Download URL: slbrowser-0.1.0.tar.gz
  • Upload date:
  • Size: 38.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for slbrowser-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8179e1355ebb981d4626fe800c70b7cd18c418005a5cd32b9a89478549e4d19f
MD5 8fddd0af7df2f2750945ae7d6e4a3d04
BLAKE2b-256 4f2d2fdfb43546adb6b340a7c935684296b27d92085769f236491adda7a79127

See more details on using hashes here.

File details

Details for the file slbrowser-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: slbrowser-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for slbrowser-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e04b002fe0ca6534073eadf1cbfec636e259b2bb66d3cce63cf6329da8037a7
MD5 3111d61d8dd346d2f19e3264e99feb42
BLAKE2b-256 2eda29b476570279c16b14e6f69e5fc3bb853f717f5a92e8bdd3e0e36ff2224b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page