Skip to content

adriandomc/coontext

Coontext

CI CodeQL Release License: MIT Rust edition: 2021

Coontext is a cross-platform desktop application that allows you to snap screenshots and directly reference them in a Markdown file in just a few clicks. The main purpose of this app is to aid developers with their manual testing/debugging sessions, allowing them to quickly create context files that can be fed into AI agents, like Claude, Copilot, ChatGPT, etc.

Project status

Coontext is alpha software. The current release is 0.1.x.

  • Tested on macOS 26.4. This is the only platform with real-hardware coverage today. Daily-driving on macOS should be safe.
  • Linux and Windows compile in CI — every push builds on Ubuntu and Windows runners — but have not been validated on real hardware yet. Things that work in CI (compilation, unit tests) don't guarantee things that need a real display server (tray, global hotkeys, region capture).
  • Not yet signed or notarized. On macOS you may need to right-click → Open the first time. On Windows, SmartScreen will likely warn on first run.
  • No public release yet. Installation is from source only. See the install section below.
  • The config schema can still break. Until 1.0.0, minor version bumps are allowed to break backward compatibility. Read CHANGELOG.md before upgrading.

See ROADMAP.md for the path to 1.0.0 — cross-platform validation, signing / notarization, and the features that come after.

Documentation

Disclaimer

This is a tool made with Claude Code, an LLM-aided coding tool. While it is entirely local, has no data tracking, nor spying concerns, it's important that you audit the code before building from source and installing. I am not responsible for any weird stuff that happens to your computer. That being said, you're free to modify, fork, contribute to this code, and make cool stuff with this piece of software. :)

Features

  • Custom markdown editor built from scratch on top of ropey
  • Global hotkey capture: Ctrl+Option+Cmd+4 (region), Ctrl+Option+Cmd+3 (full screen), Ctrl+Option+Cmd+5 (window), Cmd+Shift+N (quick note). Works even when Coontext is in the background.
  • System tray which allows quick access to capture and open the app from anywhere.
  • Markdown highlighting: headings, code blocks, images, hyperlinks, etc.
  • Live markdown preview pane with syntax-aware rendering and inline images.
  • Image gallery in the sidebar showing every capture in the current file.
  • Projects: each project consists of a directory with a coontext.json file and multiple .md notes, as well as images directories organized per note.
  • Auto-save every 5 seconds when the buffer is dirty.
  • Cross-platform: macOS, Windows, Linux. macOS uses the native screencapture region selector; Linux uses gnome-screenshot / spectacle/ scrot; Windows support is in progress.

Install

From source

git clone https://github.com/adriandomc/coontext.git
cd coontext
cargo build --release
./target/release/coontext

Coontext has no runtime dependencies beyond what your OS ships with. The binary is self-contained (fonts are embedded via include_bytes!).

Requirements

  • Rust 1.80+
  • macOS 12+, Ubuntu 22.04+, or Windows 10+ (as of now, only tested on macOS 26.4)
  • On Linux: one of gnome-screenshot, spectacle, or scrot for region capture. On macOS: the built-in screencapture.

Usage

  1. Launch Coontext. You'll see the Welcome screen with buttons to create or open a project, and a list of recent projects.
  2. Create a project. Pick a folder — Coontext will write a coontext.json there. Subsequent launches will remember it.
  3. Start a note. Click + in the sidebar to create a new markdown file. It becomes active and ready for input.
  4. Capture a screenshot. Press Cmd+Shift+4 (macOS) and select a region. The image is saved under <project>/<filename>/ and a markdown reference is inserted at the cursor. The cursor is positioned right below it — start typing.
  5. Review with preview. Press Cmd+P to toggle the live preview pane.
  6. Hand it to an agent. Copy the markdown file's contents, or share the whole project folder. All image paths are relative, so it travels.

Keyboard shortcuts

Note: Coontext intentionally avoids Cmd+Shift+3/4/5 because macOS reserves those for its built-in Screenshot.app service — they cannot be overridden by any third-party app. The defaults use Control+Option+Cmd (a quadruple-modifier combo that's unused by both macOS and common apps).

Shortcut Action
Ctrl+Opt+Cmd+R Capture Region
Ctrl+Opt+Cmd+F Capture Full screen
Ctrl+Opt+Cmd+W Capture Window
Ctrl+Opt+Cmd+N Quick New note
Ctrl+Opt+Cmd+O Show / hide the app
Cmd+S Save current file
Cmd+P Toggle preview pane
Cmd+B Toggle sidebar
Cmd+Z / ⇧⌘Z Undo / redo
Cmd+A/C/X/V Select-all, copy, cut, paste
Alt+Left/Right Jump by word

You can always trigger captures from the toolbar inside the editor view if you don't want to memorize global shortcuts.

Architecture

coontext
├── src/main.rs               entry point — initializes services, then iced
├── src/app/                  iced application: state, messages, subscriptions
├── src/views/                welcome · editor · settings views
├── src/widgets/
│   ├── markdown_editor/      custom widget on iced::advanced::Widget trait
│   │   ├── buffer.rs         ropey-backed text buffer with undo/redo
│   │   ├── cursor.rs         cursor + selection
│   │   ├── highlight.rs      per-line markdown classification
│   │   └── render.rs         Widget impl + paragraph cache + hit testing
│   └── markdown_preview/     parsed element tree → iced widgets
├── src/core/                 project, config, recent, screenshot, markdown
├── src/services/             tray · shortcuts · watcher (bridged via tokio mpsc)
└── src/utils/                paths, time, id helpers

Key design decisions:

  • No webview. GUI is iced 0.13 on the wgpu Metal/Vulkan backend. RAM use stays under ~50MB in normal editing.
  • Custom editor. The text buffer is a ropey Rope with char-indexed public API (byte math hidden at the rope boundary). The widget caches one Paragraph per line inside its tree state so we only reshape on content change, not every frame.
  • Services on the main thread. tray-icon and global-hotkey are initialized in main() before iced runs, which is required on macOS. Their event channels are bridged into a single iced::Subscription via iced::stream::channel.
  • Errors carry Arc<String>. iced::Task requires Message: Clone but std::io::Error is not Clone, so we convert at the async boundary.

Project file format

A Coontext project is a directory containing a coontext.json and one or more .md files:

my-project/
├── coontext.json
├── debug-session.md
├── debug-session/
│   ├── 001_14-32-01.png
│   └── 002_14-33-15.png
└── api-migration.md
    └── 001_10-05-42.png

The coontext.json tracks file metadata (screenshot count, active status, settings). Image organization is configurable — alongside the markdown (the default, shown above) or centralized in an images/ subfolder.

Contributing

See CONTRIBUTING.md.

License

MIT — see LICENSE.

About

A multi-platform desktop application that allows you to combine Markdown files with screenshots that feed context to AI Agents

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors