Skip to content

Commit 98c7caa

Browse files
author
Jay Hemnani
committed
Refine README and update repo about section
1 parent 718232d commit 98c7caa

1 file changed

Lines changed: 42 additions & 113 deletions

File tree

‎README.md‎

Lines changed: 42 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
1+
<div align="center">
2+
13
# ContextBox
24

3-
AI-powered context capture and organization tool for developers.
5+
**AI-powered context capture and organization for developers**
46

57
[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
68
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7-
[![Live Demo](https://img.shields.io/badge/Live%20Demo-Open-2ea44f)](https://jayhemnani9910.github.io/contextbox/)
9+
[![GitHub Pages](https://img.shields.io/badge/docs-live-2ea44f)](https://jayhemnani9910.github.io/contextbox/)
10+
11+
[Documentation](https://jayhemnani9910.github.io/contextbox/) • [Installation](#installation) • [Quick Start](#quick-start)
12+
13+
</div>
14+
15+
---
816

9-
## Features
17+
## What is ContextBox?
1018

11-
- **Screenshot Capture** - Capture screenshots with automatic OCR text extraction
12-
- **Web Content Extraction** - Extract content from web pages, Wikipedia, and YouTube
13-
- **LLM-Powered Q&A** - Ask questions about your captured context using GitHub Models (free)
14-
- **Intelligent Summarization** - Generate summaries of captured content
15-
- **Semantic Search** - Search across all your captured contexts
16-
- **Cross-Platform CLI** - Beautiful terminal interface with Rich formatting
19+
ContextBox captures, organizes, and queries your working context. Take screenshots, extract web content, and ask AI questions about everything you've captured.
20+
21+
**Key Features:**
22+
23+
| Feature | Description |
24+
|---------|-------------|
25+
| **Screenshot Capture** | Capture screen with automatic OCR text extraction |
26+
| **Web Extraction** | Pull content from web pages, Wikipedia, YouTube |
27+
| **AI Q&A** | Ask questions about your context (free via GitHub Models) |
28+
| **Smart Search** | Semantic search across all captured contexts |
29+
| **Cross-Platform** | Works on macOS, Linux, Windows |
1730

1831
## Installation
1932

@@ -86,141 +99,57 @@ contextbox summarize --all-contexts
8699
| `contextbox ask <question>` | Ask questions about context (AI) |
87100
| `contextbox summarize` | Generate context summaries (AI) |
88101
| `contextbox stats` | Show database statistics |
89-
| `contextbox config` | Manage configuration |
90102
| `contextbox export` | Export contexts to file |
91103

92-
### Capture Options
93-
94-
```bash
95-
contextbox capture --help
96-
97-
Options:
98-
-o, --output PATH Output file for results
99-
-a, --artifact-dir PATH Directory for artifacts (default: artifacts)
100-
--no-screenshot Skip taking screenshot
101-
--extract-text Extract text content
102-
--extract-urls Extract URLs from content
103-
```
104-
105104
## Configuration
106105

107106
### GitHub Token (for AI features)
108107

109-
Set your GitHub token to enable AI-powered features:
110-
111108
```bash
112109
export GITHUB_TOKEN="ghp_xxxxxxxxxxxx"
113110
```
114111

115-
Or configure via CLI:
112+
### Supported AI Models
116113

117-
```bash
118-
contextbox config --api-key
119-
```
114+
All models are free via [GitHub Models](https://github.com/marketplace/models):
120115

121-
### Supported LLM Models (via GitHub Models)
122-
123-
| Model | Description |
124-
|-------|-------------|
125-
| `gpt-4o` | Most capable GPT-4 model |
126-
| `gpt-4o-mini` | Fast and efficient (default) |
127-
| `meta-llama-3.1-405b-instruct` | Meta's largest Llama |
128-
| `meta-llama-3.1-70b-instruct` | Meta's Llama 70B |
129-
| `mistral-large` | Mistral's flagship model |
116+
| Model | Best For |
117+
|-------|----------|
118+
| `gpt-4o-mini` | Fast responses (default) |
119+
| `gpt-4o` | Complex reasoning |
120+
| `meta-llama-3.1-70b-instruct` | Open-source alternative |
130121

131122
## Python API
132123

133124
```python
134125
from contextbox import ContextBox
135126

136-
# Initialize
137127
app = ContextBox()
138128

139-
# Capture context
129+
# Capture and store
140130
context = app.capture()
141-
print(f"Captured: {context['context_id']}")
142-
143-
# Store and retrieve
144131
context_id = app.store_context(context)
145-
retrieved = app.get_context(context_id)
146132

147-
# Search
133+
# Search and retrieve
148134
results = app.search("keyword")
149135
```
150136

151-
### Using the LLM Backend
152-
153-
```python
154-
from contextbox.llm import create_github_models_backend, ChatRequest
155-
156-
# Create backend
157-
backend = create_github_models_backend()
158-
159-
async def ask_question():
160-
async with backend:
161-
request = ChatRequest.from_text(
162-
text="Summarize this context",
163-
model="gpt-4o-mini",
164-
provider="github_models"
165-
)
166-
response = await backend.chat_completion(request)
167-
print(response.content)
168-
```
169-
170-
## Project Structure
171-
172-
```
173-
contextbox/
174-
├── contextbox/ # Python package
175-
│ ├── cli.py # CLI interface (Click + Rich)
176-
│ ├── main.py # Core ContextBox class
177-
│ ├── capture.py # Screen capture functionality
178-
│ ├── database.py # SQLite storage
179-
│ ├── config.py # Configuration management
180-
│ ├── extractors/ # Content extractors
181-
│ │ ├── webpage.py # Web page extraction
182-
│ │ ├── wikipedia.py # Wikipedia extraction
183-
│ │ └── youtube.py # YouTube extraction
184-
│ └── llm/ # LLM integration
185-
│ ├── github_models.py # GitHub Models backend
186-
│ ├── qa.py # Q&A system
187-
│ └── summarization.py # Summarization
188-
├── frontend/ # React + Vite documentation site
189-
├── pyproject.toml # Package configuration
190-
└── README.md
191-
```
192-
193137
## Requirements
194138

195-
- Python 3.9+
196-
- For screenshots: platform-specific tools
197-
- macOS: Built-in `screencapture`
198-
- Linux: `scrot`, `gnome-screenshot`, or `flameshot`
199-
- Windows: `pyautogui`
200-
- For OCR: Tesseract OCR engine
139+
| Platform | Screenshot Tool | OCR |
140+
|----------|----------------|-----|
141+
| macOS | Built-in | Tesseract |
142+
| Linux | scrot / flameshot | Tesseract |
143+
| Windows | pyautogui | Tesseract |
201144

202-
## Development
203-
204-
```bash
205-
# Clone and install dev dependencies
206-
git clone https://github.com/jayhemnani9910/contextbox.git
207-
cd contextbox
208-
pip install -e ".[dev]"
209-
210-
# Run tests
211-
pytest
145+
## License
212146

213-
# Format code
214-
black contextbox/
215-
ruff check contextbox/
216-
```
147+
MIT License
217148

218-
## License
149+
---
219150

220-
MIT License - see [LICENSE](LICENSE) for details.
151+
<div align="center">
221152

222-
## Links
153+
[Documentation](https://jayhemnani9910.github.io/contextbox/) • [Issues](https://github.com/jayhemnani9910/contextbox/issues) • [Contribute](https://github.com/jayhemnani9910/contextbox)
223154

224-
- [Documentation](https://jayhemnani9910.github.io/contextbox)
225-
- [GitHub Repository](https://github.com/jayhemnani9910/contextbox)
226-
- [Issue Tracker](https://github.com/jayhemnani9910/contextbox/issues)
155+
</div>

0 commit comments

Comments
 (0)