Skip to content

About

AI-powered context capture and organization tool for developers

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

ContextBox

Capture and organize your working context from the command line

Python 3.9+ License: MIT GitHub Pages

Documentation • Installation • Quick Start


What is ContextBox?

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

Installation

Using pip

Not on PyPI yet, so install from GitHub:

pip install git+https://github.com/jayhemnani9910/contextbox.git

From source

git clone https://github.com/jayhemnani9910/contextbox.git
cd contextbox
pip install -e ".[all]"

Optional dependencies

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]"

Quick Start

1. Capture your screen

contextbox capture

This takes a screenshot, extracts text via OCR, and stores it in the local database.

2. List captured contexts

contextbox list

3. Ask questions (not implemented yet in the CLI)

export GITHUB_TOKEN="your_github_token"
contextbox ask "What was I working on?"

4. Generate summaries (not implemented yet in the CLI)

contextbox summarize --all-contexts

CLI Commands

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

Configuration

GitHub Token (for AI features)

export GITHUB_TOKEN="ghp_xxxxxxxxxxxx"

Supported AI Models

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

Python API

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)

Requirements

Platform Screenshot Tool OCR
macOS Built-in Tesseract
Linux scrot / flameshot Tesseract
Windows pyautogui Tesseract

License

MIT License


About

AI-powered context capture and organization tool for developers

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages