Capture and organize your working context from the command line
ContextBox captures, organizes, and queries your working context. Take screenshots, extract web content, and ask AI questions about everything you've captured.
Key Features:
| Feature | Description |
|---|---|
| Screenshot Capture | Capture screen with automatic OCR text extraction |
| Web Extraction | Pull content from web pages, Wikipedia, YouTube |
| LLM backend | GitHub Models client for the Python API (contextbox ask is not implemented yet) |
| Search | Text search across captured contexts |
| Cross-Platform | Works on macOS, Linux, Windows |
Not on PyPI yet, so install from GitHub:
pip install git+https://github.com/jayhemnani9910/contextbox.gitgit clone https://github.com/jayhemnani9910/contextbox.git
cd contextbox
pip install -e ".[all]"Run these from the cloned source folder:
# LLM features (GitHub Models)
pip install -e ".[llm]"
# OCR support
pip install -e ".[ocr]"
# YouTube extraction
pip install -e ".[youtube]"
# Everything
pip install -e ".[all]"contextbox captureThis takes a screenshot, extracts text via OCR, and stores it in the local database.
contextbox listexport GITHUB_TOKEN="your_github_token"
contextbox ask "What was I working on?"contextbox summarize --all-contexts| Command | Description |
|---|---|
contextbox capture |
Capture screenshot and extract context |
contextbox list |
List all stored contexts |
contextbox search <query> |
Search through contexts |
contextbox ask <question> |
Ask questions about context (AI), not implemented yet in the CLI |
contextbox summarize |
Generate context summaries (AI), not implemented yet in the CLI |
contextbox stats |
Show database statistics |
contextbox export |
Export contexts to file |
export GITHUB_TOKEN="ghp_xxxxxxxxxxxx"All models are free via GitHub Models:
| Model | Best For |
|---|---|
gpt-4o-mini |
Fast responses (default) |
gpt-4o |
Complex reasoning |
meta-llama-3.1-70b-instruct |
Open-source alternative |
from contextbox import ContextBox
app = ContextBox()
# Capture and store
context_id = app.capture_context({"active_window": {"title": "Terminal"}, "clipboard": "copied text"})
# Search and retrieve
results = app.database.search_contexts("keyword")
context = app.get_context(context_id)| Platform | Screenshot Tool | OCR |
|---|---|---|
| macOS | Built-in | Tesseract |
| Linux | scrot / flameshot | Tesseract |
| Windows | pyautogui | Tesseract |
MIT License