Skip to content

okht/clip-md

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

38 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“Ž clip-md

Copy what matters. Save it as Markdown in one click.

Release Build & Release License: MIT Stars

Python 3.10+ Windows macOS Local Processing


๐Ÿ’ฌ ย Copied a useful AI response, then lost it among tabs and clipboard history?
๐Ÿ“ ย Tired of opening an editor, creating a file, choosing a folder, and naming it every time?
๐Ÿง  ย Want research notes, technical explanations, and useful snippets to stay organized without breaking focus?

โœจ clip-md turns copied text into a local, smart-named Markdown archive.

AI responses ยท research notes ยท code explanations ยท any text worth keeping

Copy โ†’ Mโ†“ appears โ†’ click โ†’ smart filename โ†’ .md saved


๐Ÿ“ฃ What's New ยท โšก Install ยท ๐Ÿš€ Usage ยท โœจ Demo ยท ๐Ÿง  Naming ยท ๐Ÿ”ง Features ยท ๐Ÿ“‚ Structure ยท ๐Ÿ“Œ Notes

English ยท ็ฎ€ไฝ“ไธญๆ–‡ ยท ็น้ซ”ไธญๆ–‡ ยท Espaรฑol ยท Deutsch ยท ๆ—ฅๆœฌ่ชž ยท ะ ัƒััะบะธะน ยท Portuguรชs ยท ํ•œ๊ตญ์–ด


๐Ÿ“ฃ What's new

v1.2.0 โ€” clip-md now speaks three languages

English ยท ็ฎ€ไฝ“ไธญๆ–‡ ยท ็น้ซ”ไธญๆ–‡

  • Detects the system language while the language setting is auto.
  • Switches language from the tray menu and applies it after restart.
  • Publishes standalone Windows and macOS builds from GitHub Actions.

See the latest release.


๐Ÿงฉ Works with any text you can copy

clip-md listens for non-empty plain text at the clipboard level, so it works across browsers, AI assistants, and most apps. Selected Windows editor processes are suppressed by default to reduce interruptions.

Content Examples Saved result
๐Ÿ’ฌ AI responses Text copied from ChatGPT, Claude, DeepSeek, or another app UTF-8 .md file
๐Ÿ”ฌ Research notes Excerpts, interview notes, reading highlights UTF-8 .md file
๐Ÿ’ป Technical content Code explanations, lists, Markdown text UTF-8 .md file
๐Ÿ“ Plain text Any non-empty clipboard text worth keeping UTF-8 .md file

The original clipboard text is written to disk without HTML conversion, image extraction, or cloud processing.


โšก Install

Download the latest standalone build:

Platform Download First launch
Windows x86-64 Windows download Download the Windows executable and double-click it; SmartScreen may show an unsigned-app warning
macOS Apple Silicon macOS download Download the macOS binary and grant execute permission; Gatekeeper may warn or block it

Pre-built files are standalone executables and do not require Python.

After downloading the macOS build, open Terminal in the download folder, grant the file execute permission with chmod +x, then launch it.

The current macOS release file is ad-hoc signed, has not been notarized, and omits some project-owned icon and translation assets. Run from source when you need the complete repository assets.

๐Ÿ›  Run from source

Clone the current repository:

git clone https://github.com/okht/clip-md.git
cd clip-md

Windows

py -m venv .venv
.\.venv\Scripts\Activate.ps1
py -m pip install -r requirements.txt
py main.py

macOS

python3 -m venv .venv
source .venv/bin/activate
python -m pip install "PyQt6>=6.6" "keyboard>=0.13" "jieba>=0.42"
python main.py

๐Ÿš€ Usage

The core loop is intentionally small:

Copy โ†’ Mโ†“ appears โ†’ click โ†’ โœ“ โ†’ Markdown saved
Action Result
Copy non-empty text An Mโ†“ bubble appears beside the cursor
Left-click Mโ†“ Saves the clipboard text as a local .md file
Left-click the green โœ“ Opens the saved file while the success bubble is still visible
Right-click the bubble Dismisses it immediately
Hover over the bubble Pauses the auto-dismiss timer
Wait 3 seconds The bubble fades automatically
Press Ctrl+Alt+M Force-saves the current clipboard when the hotkey is available

On first launch, choose a save folder or keep the default subfolder created in your Documents directory.

System tray

Tray action What it does
Left-click the tray icon Opens the save folder
Set / open save folder Changes or opens the destination
Recently unsaved Keeps up to 5 recently detected items for the current session
Pause / resume Stops or resumes clipboard-triggered bubbles
Launch at startup Toggles the current user's startup entry
Language Switches English / ็ฎ€ไฝ“ไธญๆ–‡ / ็น้ซ”ไธญๆ–‡ after restart
Exit Closes clip-md and unregisters its hotkey

โœจ Demo

Imagine copying this text from a browser or AI assistant:

# Retrieval-Augmented Generation

RAG combines retrieval, context assembly, and generation to ground model output.

clip-md keeps the interaction compact:

Clipboard  โฏ Retrieval-Augmented Generation...
clip-md    โฏ Mโ†“
Click      โฏ โœ“
Saved      โฏ a smart-named .md file in your chosen folder

A generated filename for this example is:

Retrieval_Generation_Augmented_RAG.md

The exact words depend on the copied text. Existing files are preserved; duplicate names receive _1, _2, and so on.


๐Ÿง  Smart filenames

clip-md uses a three-stage fallback chain:

Priority Strategy Example
1 Extract up to 4 Chinese or English keywords from the first 500 characters ๆฃ€็ดข_RAG_ๆžถๆž„_ๅˆ†ๆž.md
2 Use the first 10 cleaned content characters RetrievalA.md
3 Use a timestamp 20260404_143022.md

During keyword extraction, clip-md filters common filler phrases, URLs, file paths, emoji, Markdown syntax, stop words, and common code keywords.

Every selected filename is then sanitized to:

  • remove characters that are illegal in Windows filenames
  • merge repeated underscores and limit the name to 50 characters
  • append _1, _2, and later numbers instead of overwriting an existing file

๐Ÿ”ง Features

Core loop Stay focused Desktop native
Mouse-side save bubble Event-driven clipboard monitoring Windows and macOS builds
One-click UTF-8 Markdown save Suppression for selected editor processes System tray controls
Smart keyword filenames Duplicate-content protection Dark / light system theme
Three-stage filename fallback Session-only recent queue High-DPI positioning
Global hotkey when available Pause / resume monitoring Launch at startup
Duplicate-name protection Asynchronous file writes Three UI languages

๐Ÿ”’ Privacy and safety

Topic Behavior
Clipboard processing Runs locally; no external API, telemetry, upload, or auto-update client is used
Saving Happens after a bubble click, a recent-item selection, or an explicit hotkey action
File content Writes the original clipboard text as UTF-8 without BOM
Existing files Never overwritten; duplicate names receive numeric suffixes
Recent items Keeps at most 5 items in memory and clears them when the app exits
Logging Records operations and filenames without recording clipboard text
Configuration Stored in the operating system's standard per-user application data location

๐Ÿ“‚ Project structure

clip-md/
โ”œโ”€โ”€ main.py                     # application entry point
โ”œโ”€โ”€ clipboard_monitor.py        # event-driven clipboard watcher
โ”œโ”€โ”€ bubble_widget.py            # cursor-side save bubble
โ”œโ”€โ”€ file_saver.py               # asynchronous UTF-8 writer
โ”œโ”€โ”€ filename_generator.py       # filename fallback chain
โ”œโ”€โ”€ keyword_extractor.py        # Chinese and English keyword extraction
โ”œโ”€โ”€ tray_manager.py             # tray menu and global hotkey
โ”œโ”€โ”€ config_manager.py           # local settings
โ”œโ”€โ”€ platform_utils.py           # Windows / macOS integrations
โ”œโ”€โ”€ signal_bus.py               # shared Qt signals
โ”œโ”€โ”€ i18n.py                     # language routing
โ”œโ”€โ”€ translations/               # en / zh_CN / zh_TW
โ”œโ”€โ”€ assets/                     # tray and state icons
โ”œโ”€โ”€ test_*.py                   # automated tests
โ””โ”€โ”€ .github/workflows/          # tagged release builds

The modules communicate through a Qt signal bus, keeping clipboard monitoring, UI, file writing, and tray behavior independently testable.


๐Ÿ— Build from source

Windows

py -m pip install -r requirements.txt pyinstaller
$spec = Get-ChildItem -Filter *.spec | Select-Object -First 1
py -m PyInstaller $spec.FullName --clean -y

macOS

python -m pip install "PyQt6>=6.6" "keyboard>=0.13" "jieba>=0.42" pyinstaller
python -m PyInstaller --onefile --noconsole --collect-data jieba \
  --add-data "assets:assets" \
  --add-data "translations:translations" \
  --name clip-md main.py

Build output is written to dist/. Tagged pushes trigger the repository's Windows and macOS release workflow.


๐Ÿ“Œ Notes

  • Windows and macOS Apple Silicon are the currently published targets.
  • Clipboard handling covers plain text. Images, files, HTML-to-Markdown conversion, and rich-text extraction are outside the current scope.
  • The default suppression list uses Windows process names for VS Code, Typora, Obsidian, and MarkText; behavior differs on macOS.
  • The global hotkey may require Accessibility permission on macOS. The app continues running if hotkey registration fails.
  • The Windows executable is unsigned. The macOS build is ad-hoc signed and has not been notarized. SmartScreen or Gatekeeper may ask for confirmation.
  • The current release workflow and v1.2.0 macOS package omit some project-owned icon and translation assets; source mode provides the complete repository assets.

๐Ÿ—“ Changelog

Version Date Highlights
v1.2.0 2026-04-07 English, Simplified Chinese, Traditional Chinese, system-language detection, tray language switcher
v1.1.0 2026-04-04 macOS platform layer and dual-platform release workflow
v1.0.1 2026-04-04 Smart keyword filenames, denoising, sanitization, duplicate handling
v1.0.0 2026-04-04 Clipboard monitoring, mouse-side bubble, tray menu, global hotkey

See every published build on the Releases page.


Made for ideas worth keeping.


MIT License ยฉ okht

About

Clipboard to Markdown in one click. Auto-detect AI chats, smart keyword filenames, system tray app.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages