Name | selflayer JSON |
Version |
0.2.1
JSON |
| download |
home_page | None |
Summary | SelfLayer - AI-powered terminal web browser for content analysis and research |
upload_time | 2025-09-14 20:39:36 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | None |
keywords |
web
browser
ai
research
analysis
terminal
cli
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# SelfLayer 🔍🧠
**AI-Powered Terminal Web Browser for Content Analysis and Research**
[](https://badge.fury.io/py/selflayer)
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
SelfLayer 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 SelfLayer 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)
```bash
pip install selflayer
```
### From Source
```bash
git clone https://github.com/antonvice/selflayer.git
cd selflayer
pip install -e .
```
## 🔧 Setup
1. **Get a Google Gemini API Key**
- Visit [Google AI Studio](https://makersuite.google.com/app/apikey)
- Create a free API key
- Copy the key for the next step
2. **Configure SelfLayer**
```bash
selflayer
# On first run, set your API key:
/key YOUR_API_KEY_HERE
```
Your API key will be securely saved to `~/.selflayer/api_key.txt` for future sessions.
## 📖 Usage
SelfLayer provides two interfaces:
- **`selflayer`**: Interactive Terminal User Interface (TUI) with commands like `/find`, `/search`, `/key`
- **`sl`**: Command Line Interface (CLI) for direct command execution with arguments
### Launch SelfLayer
**Interactive TUI (Recommended)**
```bash
selflayer
```
**Command Line Interface**
```bash
# For direct command execution
sl search "your query" --max-results 3
sl analyze https://example.com
```
### Basic Commands
#### 🔍 **Find & Analyze** (Recommended)
```bash
# 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**
```bash
# 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**
```bash
# Analyze any webpage directly
/url https://docs.python.org/3/tutorial/
/u https://github.com/trending
```
#### ⚙️ **Configuration**
```bash
# 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 SelfLayer |
## 🎯 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
SelfLayer 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
```
selflayer/
├── __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**
```bash
git clone https://github.com/antonvice/selflayer.git
cd selflayer
```
2. **Set Up Development Environment**
```bash
pip install -e ".[dev]"
```
3. **Run Tests**
```bash
pytest
mypy selflayer/
ruff check selflayer/
```
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](LICENSE) file for details.
## 👨💻 Author
**Anton Vice** - CTO, SelfLayer
📧 [anton@selflayer.com](mailto:anton@selflayer.com)
🐙 [GitHub](https://github.com/antonvice)
🔗 [LinkedIn](https://linkedin.com/in/antonvice)
## 🙏 Acknowledgments
- [Pydantic AI](https://github.com/pydantic/pydantic-ai) for structured AI outputs
- [Rich](https://github.com/Textualize/rich) for beautiful terminal formatting
- [DuckDuckGo](https://duckduckgo.com) for privacy-focused search
- [Google Gemini](https://developers.generativeai.google/) for powerful AI analysis
## 📊 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.**
*SelfLayer - Because the web deserves intelligent exploration.*
Raw data
{
"_id": null,
"home_page": null,
"name": "selflayer",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": "Anton Vice <anton@selflayer.com>",
"keywords": "web, browser, ai, research, analysis, terminal, cli",
"author": null,
"author_email": "Anton Vice <anton@selflayer.com>",
"download_url": "https://files.pythonhosted.org/packages/49/00/e72a0ef436a009a3ab4062734a2a9b18b8277ece14b2164e38b7203aef11/selflayer-0.2.1.tar.gz",
"platform": null,
"description": "# SelfLayer \ud83d\udd0d\ud83e\udde0\n\n**AI-Powered Terminal Web Browser for Content Analysis and Research**\n\n[](https://badge.fury.io/py/selflayer)\n[](https://www.python.org/downloads/)\n[](https://opensource.org/licenses/MIT)\n\nSelfLayer 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.\n\n## \u2728 Features\n\n### \ud83d\udd0d **Smart Web Search & Analysis**\n- **Unified Search & Analysis**: `/find` command searches and analyzes multiple results automatically\n- **Step-by-step Analysis**: Traditional `/search` + `/open` workflow for detailed control\n- **DuckDuckGo Integration**: Privacy-focused web search\n- **Configurable Depth**: Analyze 1-10 search results at once\n\n### \ud83e\udde0 **AI-Powered Content Analysis**\n- **Google Gemini Integration**: State-of-the-art AI analysis using Pydantic AI\n- **Structured Output**: WebCards with summaries, key facts, dates, and links\n- **Confidence Scoring**: AI provides confidence ratings for each analysis\n- **Streaming Support**: Real-time analysis progress updates\n\n### \ud83c\udfa8 **Beautiful Terminal Interface**\n- **Rich Formatting**: Colorful, responsive terminal UI using Rich library\n- **ASCII Art Branding**: Eye-catching SelfLayer logo\n- **Progress Indicators**: Visual feedback for all operations\n- **Error Handling**: Graceful error display and recovery\n\n### \u26a1 **Performance & Usability**\n- **Async Operations**: Non-blocking web requests and AI processing\n- **Smart Caching**: Search result and analysis caching\n- **Command Aliases**: Short commands (`/f`, `/s`, `/k`, etc.) for power users\n- **Persistent Config**: API keys saved locally for seamless usage\n\n## \ud83d\ude80 Installation\n\n### From PyPI (Recommended)\n```bash\npip install selflayer\n```\n\n### From Source\n```bash\ngit clone https://github.com/antonvice/selflayer.git\ncd selflayer\npip install -e .\n```\n\n## \ud83d\udd27 Setup\n\n1. **Get a Google Gemini API Key**\n - Visit [Google AI Studio](https://makersuite.google.com/app/apikey)\n - Create a free API key\n - Copy the key for the next step\n\n2. **Configure SelfLayer**\n ```bash\n selflayer\n # On first run, set your API key:\n /key YOUR_API_KEY_HERE\n ```\n\nYour API key will be securely saved to `~/.selflayer/api_key.txt` for future sessions.\n\n## \ud83d\udcd6 Usage\n\nSelfLayer provides two interfaces:\n\n- **`selflayer`**: Interactive Terminal User Interface (TUI) with commands like `/find`, `/search`, `/key`\n- **`sl`**: Command Line Interface (CLI) for direct command execution with arguments\n\n### Launch SelfLayer\n\n**Interactive TUI (Recommended)**\n```bash\nselflayer\n```\n\n**Command Line Interface**\n```bash\n# For direct command execution\nsl search \"your query\" --max-results 3\nsl analyze https://example.com\n```\n\n### Basic Commands\n\n#### \ud83d\udd0d **Find & Analyze** (Recommended)\n```bash\n# Search and analyze top 5 results automatically\n/find python machine learning tutorials\n\n# Analyze specific number of results (1-10)\n/find quantum computing 3\n\n# Short alias\n/f artificial intelligence trends 2024\n```\n\n#### \ud83d\udd0e **Traditional Search**\n```bash\n# Search only (no analysis)\n/search web scraping python\n/s data science tools\n\n# Then analyze specific results\n/open 1 # Analyze first result\n/o 3 # Analyze third result\n```\n\n#### \ud83c\udf10 **Direct URL Analysis**\n```bash\n# Analyze any webpage directly\n/url https://docs.python.org/3/tutorial/\n/u https://github.com/trending\n```\n\n#### \u2699\ufe0f **Configuration**\n```bash\n# Set API key\n/key YOUR_NEW_API_KEY\n/k YOUR_NEW_API_KEY\n\n# Clear API key\n/key clear\n\n# Check status\n/status\n\n# Clear screen\n/clear\n/c\n\n# Get help\n/help\n/h\n\n# Quit\n/quit\n/q\n```\n\n### Command Aliases\n| Full Command | Alias | Description |\n|-------------|-------|-------------|\n| `/find` | `/f` | Search and analyze multiple results |\n| `/search` | `/s` | Search only (no analysis) |\n| `/open` | `/o` | Analyze search result by number |\n| `/url` | `/u` | Analyze URL directly |\n| `/key` | `/k` | Set/clear API key |\n| `/clear` | `/c` | Clear screen |\n| `/help` | `/h` | Show help |\n| `/quit` | `/q` | Exit SelfLayer |\n\n## \ud83c\udfaf Use Cases\n\n### \ud83d\udcda **Research & Learning**\n- Quickly analyze multiple sources on a topic\n- Get structured summaries of complex articles\n- Extract key facts and dates from content\n- Discover related links and resources\n\n### \ud83d\udcbc **Professional Analysis**\n- Market research and trend analysis\n- Competitive intelligence gathering\n- Technical documentation review\n- News and industry monitoring\n\n### \ud83d\udd2c **Academic Work**\n- Literature review and source analysis\n- Fact-checking and verification\n- Research paper preparation\n- Educational content exploration\n\n## \ud83c\udfd7\ufe0f Architecture\n\nSelfLayer is built with modern Python practices:\n\n- **Pydantic AI**: Structured AI outputs with Google Gemini\n- **Rich**: Beautiful terminal formatting and progress indicators\n- **httpx**: Modern async HTTP client for web requests\n- **BeautifulSoup**: HTML parsing and content extraction\n- **ddgs**: Privacy-focused DuckDuckGo search\n\n### Project Structure\n```\nselflayer/\n\u251c\u2500\u2500 __init__.py # Package initialization and exceptions\n\u251c\u2500\u2500 __main__.py # Entry point and logging setup\n\u251c\u2500\u2500 ai.py # Pydantic AI integration with Gemini\n\u251c\u2500\u2500 config.py # Configuration management\n\u251c\u2500\u2500 models.py # Pydantic data models\n\u251c\u2500\u2500 search.py # DuckDuckGo search functionality\n\u251c\u2500\u2500 tui.py # Rich-powered terminal interface\n\u2514\u2500\u2500 web.py # Web scraping and content extraction\n```\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions! Here's how to get started:\n\n1. **Fork the Repository**\n ```bash\n git clone https://github.com/antonvice/selflayer.git\n cd selflayer\n ```\n\n2. **Set Up Development Environment**\n ```bash\n pip install -e \".[dev]\"\n ```\n\n3. **Run Tests**\n ```bash\n pytest\n mypy selflayer/\n ruff check selflayer/\n ```\n\n4. **Submit Pull Request**\n\n### Development Tools\n- **Testing**: pytest, pytest-asyncio, pytest-cov\n- **Type Checking**: mypy\n- **Linting**: ruff\n- **Formatting**: ruff format\n\n## \ud83d\udcc4 License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## \ud83d\udc68\u200d\ud83d\udcbb Author\n\n**Anton Vice** - CTO, SelfLayer\n\ud83d\udce7 [anton@selflayer.com](mailto:anton@selflayer.com)\n\ud83d\udc19 [GitHub](https://github.com/antonvice)\n\ud83d\udd17 [LinkedIn](https://linkedin.com/in/antonvice)\n\n## \ud83d\ude4f Acknowledgments\n\n- [Pydantic AI](https://github.com/pydantic/pydantic-ai) for structured AI outputs\n- [Rich](https://github.com/Textualize/rich) for beautiful terminal formatting\n- [DuckDuckGo](https://duckduckgo.com) for privacy-focused search\n- [Google Gemini](https://developers.generativeai.google/) for powerful AI analysis\n\n## \ud83d\udcca Changelog\n\n### v0.1.0 (2024-09-14)\n- \ud83c\udf89 Initial release\n- \u2728 Unified `/find` command for search + analysis\n- \ud83e\udde0 Google Gemini AI integration\n- \ud83c\udfa8 Rich terminal interface\n- \u26a1 Async operations and caching\n- \ud83d\udd27 Command aliases and persistent config\n\n---\n\n**Made with \u2764\ufe0f for researchers, developers, and curious minds everywhere.**\n\n*SelfLayer - Because the web deserves intelligent exploration.*\n",
"bugtrack_url": null,
"license": null,
"summary": "SelfLayer - AI-powered terminal web browser for content analysis and research",
"version": "0.2.1",
"project_urls": {
"Bug-Tracker": "https://github.com/antonvice/selflayer/issues",
"Documentation": "https://github.com/antonvice/selflayer#readme",
"Homepage": "https://github.com/antonvice/selflayer",
"Repository": "https://github.com/antonvice/selflayer"
},
"split_keywords": [
"web",
" browser",
" ai",
" research",
" analysis",
" terminal",
" cli"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9930c1c8e1453f5310a6cf389683612ab423e1adc5c673bf8f03d039eeac52a8",
"md5": "022cba7825ba40e4ab744ed46c990de7",
"sha256": "752e34d6df6a9b043f4b21f2cd391e2972f9bfc195122059dafc5d907d31fca4"
},
"downloads": -1,
"filename": "selflayer-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "022cba7825ba40e4ab744ed46c990de7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 34839,
"upload_time": "2025-09-14T20:39:35",
"upload_time_iso_8601": "2025-09-14T20:39:35.892905Z",
"url": "https://files.pythonhosted.org/packages/99/30/c1c8e1453f5310a6cf389683612ab423e1adc5c673bf8f03d039eeac52a8/selflayer-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4900e72a0ef436a009a3ab4062734a2a9b18b8277ece14b2164e38b7203aef11",
"md5": "f4a80191c1a33c1800d63fcd639ae7e9",
"sha256": "c896ee4d12343c52feed5ee1117de65f5ab7653dec7b33c0117bc082cf0c56bb"
},
"downloads": -1,
"filename": "selflayer-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "f4a80191c1a33c1800d63fcd639ae7e9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 38820,
"upload_time": "2025-09-14T20:39:36",
"upload_time_iso_8601": "2025-09-14T20:39:36.789075Z",
"url": "https://files.pythonhosted.org/packages/49/00/e72a0ef436a009a3ab4062734a2a9b18b8277ece14b2164e38b7203aef11/selflayer-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-14 20:39:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "antonvice",
"github_project": "selflayer",
"github_not_found": true,
"lcname": "selflayer"
}