Thanks for your interest in contributing! ScreenSight lets any coding agent see your screen — as an MCP server, a plain CLI, or a watch daemon. It's a small, focused Python codebase with strict privacy invariants, so contributions of any size are welcome as long as they respect those invariants.
Before you start, read these three files — they define what already exists and the rules that are not up for reinterpretation:
PROJECT.md— what's built, what's out of scope, the six non-negotiablesARCHITECTURE.md— data flow and whycore.capture_once()is the choke pointAGENTS.md— ground rules and coding conventions (applies to humans too)
- Test an untested platform. macOS, Linux, and WSL backends are written but
marked
⚠️ untested in the README. Running the test suite and a manualscreensight on && screensight captureon one of those and reporting results is genuinely valuable. - Fix a bug you hit while using it.
- Improve a capture backend (
src/screensight/capture/) — better active-window detection, multi-monitor handling, new fallback tools. - Extend the privacy layer (
src/screensight/privacy.py) — as long as changes are strictly more conservative (see rule 3 below). - Improve docs — the README,
GUIDE.md, or per-agent MCP config examples inexamples/.
If your change is large or changes a safety contract, open an issue first so we can agree on the approach before you write code.
Requires Python 3.10+.
git clone git@github.com:himanshu231204/ScreenSight.git screensight
cd screensight
python -m venv .venv
source .venv/bin/activate # Linux/macOS
.\.venv\Scripts\Activate.ps1 # Windows
pip install -e ".[dev]"
pre-commit installVerify the two entry points work:
screensight --help
screensight-mcp --help # starts the FastMCP server on stdiopytest tests/ -vTests never take a real screenshot — capture backends are mocked and image
processing runs against PIL-generated fixtures (see
tests/test_privacy.py and
tests/test_core.py). Keep it that way: do not add a test
that shells out to a real OS screenshot tool — CI has no display.
When you add behavior, add a test for it. The existing suite covers:
| File | Covers |
|---|---|
tests/test_state.py |
master switch on/off round-trip |
tests/test_privacy.py |
blocklist matching + redact-zone coordinate scaling |
tests/test_diff.py |
SHA-256 hashing and change detection |
tests/test_core.py |
capture_once() with a mocked backend |
This project uses pre-commit to enforce code quality on every commit. Hooks run automatically when you commit — you can also run them manually:
# Run all hooks against all files
pre-commit run --all-files
# Run a specific hook
pre-commit run ruff --all-files
pre-commit run mypy --all-filesThe configured hooks are:
| Hook | What it does |
|---|---|
trailing-whitespace |
Strips trailing whitespace |
end-of-file-fixer |
Ensures files end with a newline |
check-yaml |
Validates YAML syntax |
check-toml |
Validates TOML syntax |
check-added-large-files |
Prevents files >500KB from being committed |
ruff |
Lints and auto-fixes Python code |
ruff-format |
Formats Python code |
mypy |
Static type checking on src/screensight/ |
Every change must preserve the privacy guarantees from PROJECT.md:
- Off by default. The master switch check lives inside
core.capture_once()— never add a second, drift-prone check elsewhere. - Never bypass
core.capture_once(). CLI, MCP tools, and the daemon must all route through it. Do not callcapture/*.pybackends directly from anywhere exceptcore.py. - Don't weaken the blocklist or redaction silently. Changes to matching logic
must be strictly more conservative (fewer false negatives). Note any behavior-
contract change in
PROJECT.md. - No screenshot files accumulate on disk. One frame path, overwritten, deleted
on
screensight off. - Cross-platform parity. A feature added to one
capture/*.pybackend must be added (or given a documented graceful fallback) to all three. - No new runtime dependencies without a concrete reason. Current runtime deps
are
fastmcpandpillow. The CLI uses stdlibargparse, notclick.
Match the existing code (see AGENTS.md → Conventions):
- Python 3.10+, type hints everywhere,
from __future__ import annotationsat the top of every module. dataclassesfor structured returns (e.g.CaptureResult,CaptureOutcome), except at JSON-serialization boundaries (state files).- No
printinsidesrc/screensight/*except__main__.py— library functions return values; the CLI formats them. - Expected failures surface as
ok: bool+error: str | Noneon result dataclasses, not exceptions. Reserve exceptions for genuine bugs. - MCP tool docstrings are user-facing — write them like a man-page entry, since the calling agent reads them to decide when to invoke the tool.
- Fork the repo and create a branch from
main. - Make your change, add/update tests, and run
pytest tests/ -v. - If you touched a capture backend, note in the PR which platform you actually tested on and which you didn't — untested is fine, undisclosed is not.
- Open the PR against
mainand fill out the template.
By contributing, you agree that your contributions are licensed under the MIT License.