memo-clipboard 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Memo Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,190 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
+ <img src="assets/memo.png" alt="Memo Logo" width="128" height="128" />
3
+ <h1>Memo</h1>
4
+ <p><strong>Ultra-lightweight, blazing-fast open-source clipboard manager for Windows, macOS &amp; Linux — built with pure Rust.</strong></p>
2
5
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
6
+ <p>
7
+ <a href="https://onursercanyilmaz.github.io/memo/"><img src="https://img.shields.io/badge/Website-GitHub%20Pages-4F8CFF?style=flat-square" alt="Website" /></a>
8
+ <a href="https://github.com/onursercanyilmaz/memo/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/onursercanyilmaz/memo/ci.yml?style=flat-square&label=CI" alt="CI" /></a>
9
+ <a href="https://github.com/onursercanyilmaz/memo/releases"><img src="https://img.shields.io/github/v/release/onursercanyilmaz/memo?style=flat-square&color=blue&label=Release" alt="Release" /></a>
10
+ <a href="https://www.npmjs.com/package/memo-clipboard"><img src="https://img.shields.io/badge/npm-memo--clipboard-CB3837?style=flat-square&logo=npm" alt="npm" /></a>
11
+ <a href="https://www.rust-lang.org/"><img src="https://img.shields.io/badge/Rust-1.80%2B-orange?style=flat-square&logo=rust" alt="Rust" /></a>
12
+ <img src="https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-0078D4?style=flat-square" alt="Platforms" />
13
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-lightgrey?style=flat-square" alt="License" /></a>
14
+ </p>
15
+
16
+ <p>
17
+ <a href="#installation">Installation</a> •
18
+ <a href="#features">Features</a> •
19
+ <a href="#memo-vs-ditto">Memo vs Ditto</a> •
20
+ <a href="#keyboard-shortcuts">Shortcuts</a> •
21
+ <a href="#privacy--security">Security</a> •
22
+ <a href="#code-signing">Code Signing</a>
23
+ </p>
24
+ </div>
25
+
26
+ ---
27
+
28
+ **Memo** is a modern, open-source alternative to **Ditto** for **Windows, macOS, and Linux**, written in **pure Rust**. On Windows it uses native **Win32 API + Direct2D/DirectWrite** (~1.5 MB single `.exe`, ~2.4 MB idle RAM, 0% idle CPU); on macOS and Linux it runs natively via **egui (`eframe`) + `arboard`**, sharing the same fast **SQLite + FTS5** core.
29
+
30
+ ```text
31
+ +----------------------------------------------------------------------+
32
+ | Search... (Ctrl+V paste, Ctrl+A select, Up/Down) [*] [Gear] |
33
+ | [All] [Pinned] [Text] [Image] [Link] [Files] [Work] [+ Folder] |
34
+ +-----------------------------------+----------------------------------+
35
+ | [KOD] fn main() { println!... [1]| Preview |
36
+ | * Code.exe - 2m | ------------------------------- |
37
+ | --------------------------------- | fn main() { |
38
+ | [CLR] #4F8CFF [2]| println!("Hello Memo!"); |
39
+ | Figma.exe - 5m | } |
40
+ | --------------------------------- | |
41
+ | [IMG] Image (1920x1080) [3]| ------------------------------- |
42
+ | SnippingTool - 12m | Type: KOD | 38 chars | Code.exe |
43
+ | | [Paste] [Plain] [Edit] [Pin] |
44
+ +-----------------------------------+----------------------------------+
45
+ ```
46
+
47
+ ---
48
+
49
+ ## Features
50
+
51
+ - **Zero-Polling Native Listener:** Uses Win32 `AddClipboardFormatListener` (`WM_CLIPBOARDUPDATE`) — **0% CPU** when idle.
52
+ - **Multi-Format Capture:** Plain text, code snippets, URLs, rich text (`HTML` / `RTF`), images (`PNG` stored on disk outside the DB), and file lists (`CF_HDROP`).
53
+ - **Instant Auto-Paste:** Remembers your previous active window (`HWND`), hides on selection, restores focus, and simulates `Ctrl + V` via `SendInput`.
54
+ - **Customizable Keybindings:** Built-in **Shortcut Recorder** in Settings (`⚙`) lets you assign any global hotkey (`Ctrl/Shift/Alt/Win + Key` or `F1–F12`) and customize every in-window shortcut.
55
+ - **Folders & Pinning Protection:** Organize clips into custom folders or pin (`📌`) important snippets — pinned and folder-assigned items are **never deleted** by automatic retention cleanup.
56
+ - **Multi-Select Merge Paste:** Hold `Ctrl + Click` or `Shift + Click` to select multiple items and paste them merged together in one shot.
57
+ - **Inline Editing & Context Menu:** Press `Ctrl + E` (or right-click any card) to edit text clips in place (`Ctrl + S` to save), move to folders, pin, or paste as plain text.
58
+ - **Smart Previews:**
59
+ - **Hex Colors (`#4F8CFF` / `#f0a`):** Live color swatches in both the list and preview pane.
60
+ - **JSON:** Automatic pretty-printed preview.
61
+ - **Links:** One-click `🌐 Open` button to launch URLs in your default browser.
62
+ - **Dark & Light Themes:** Instant toggle, frameless rounded window (`DwmSetWindowAttribute`), draggable top bar, and system tray integration.
63
+
64
+ ---
65
+
66
+ ## Memo vs Ditto
67
+
68
+ | Capability | Memo (v0.2.0) | Ditto |
69
+ | :--- | :---: | :---: |
70
+ | **Executable Size** | `~1.5 MB` (single `.exe`) | `~14 MB` installed |
71
+ | **Idle Private RAM** | `~2.4 MB` | `~5–8 MB` |
72
+ | **UI Engine** | Modern Two-Pane Direct2D + DirectWrite | Classic Win32 MFC List |
73
+ | **Custom Global & In-App Key Recorder** | ✅ Built-in | ✅ |
74
+ | **Folders & Never-Delete Protection** | ✅ | ✅ |
75
+ | **Multi-Select Merge Paste** | ✅ | ✅ |
76
+ | **Inline Clip Editing (`Ctrl+E`)** | ✅ | ✅ |
77
+ | **Smart Hex Color & JSON Previews** | ✅ | ❌ |
78
+ | **Password Manager Blacklist & Privacy Flags** | ✅ | Partial |
79
+ | **Memory-Safe Core** | ✅ Pure Rust | C++ |
80
+
81
+ ---
82
+
83
+ ## Installation
84
+
85
+ ### Option 1: Windows Installer (Recommended)
86
+ Download **`Memo-Setup-vX.Y.Z.exe`** from [GitHub Releases](https://github.com/onursercanyilmaz/memo/releases):
87
+ - Installs to `%LOCALAPPDATA%\Memo` (no admin rights required)
88
+ - Creates a **Desktop shortcut** and Start Menu entry
89
+ - Optional **Start with Windows** integration and clean uninstaller
90
+
91
+ ### Option 2: Portable Executable
92
+ Download **`memo-windows-x64.exe`** from [GitHub Releases](https://github.com/onursercanyilmaz/memo/releases) and run it directly — zero installation required.
93
+
94
+ ### Option 3: Install via npm (Node.js)
95
+ ```bash
96
+ npm install -g memo-clipboard
97
+ memo
98
+ ```
99
+ Or run directly with `npx`:
100
+ ```bash
101
+ npx memo-clipboard
102
+ ```
103
+ *(Automatically downloads the latest Windows release binary on first run if not already installed.)*
104
+
105
+ ### Option 4: One-Click Local Install (from source)
106
+ ```powershell
107
+ npm run install:windows
108
+ # or directly:
109
+ powershell -ExecutionPolicy Bypass -File scripts/install.ps1
110
+ ```
111
+
112
+ ### Option 5: Build from Source (Pure Rust)
113
+ ```powershell
114
+ cargo test
115
+ cargo build --release
116
+ # Output: target/release/memo.exe
117
+ ```
118
+
119
+ ---
120
+
121
+ ## Keyboard Shortcuts
122
+
123
+ | Shortcut | Action |
124
+ | :--- | :--- |
125
+ | `Ctrl + Shift + V` | Toggle Memo window *(customizable in `⚙ Settings`)* |
126
+ | `Enter` | Paste selected item (or merge multiple selected items) |
127
+ | `Shift + Enter` | Paste as **plain text** (strips HTML/RTF formatting) |
128
+ | `Ctrl + C` | Copy to clipboard without pasting |
129
+ | `Ctrl + E` | Edit selected text/code clip inline (`Ctrl + S` to save) |
130
+ | `Ctrl + P` | Pin / Unpin item |
131
+ | `Alt + 1..9` | Quick-paste top 9 items |
132
+ | `Ctrl + A` / `Ctrl + V` | Select all / Paste inside search box |
133
+ | `Delete` | Delete selected item |
134
+ | `Esc` | Clear search, cancel edit, or hide window |
135
+
136
+ ---
137
+
138
+ ## Privacy & Security
139
+
140
+ - **100% Local & Offline:** All clipboard history is stored locally in `%APPDATA%\memo\memo.db` and `%APPDATA%\memo\images\`. Zero telemetry, zero network calls.
141
+ - **OS Privacy Compliance:** Automatically ignores clipboard entries marked with `ExcludeClipboardContentFromMonitorProcessing`, `Clipboard Viewer Ignore`, or `CanIncludeInClipboardHistory = 0`.
142
+ - **App Blacklist:** Skips password managers (`keepass.exe`, `keepassxc.exe`, `1password.exe`, `bitwarden.exe`) by default (configurable in `%APPDATA%\memo\settings.json`).
143
+ - **Legal & Policies:** [Privacy Policy](https://onursercanyilmaz.github.io/memo/privacy.html) · [Terms of Use & Disclaimer](https://onursercanyilmaz.github.io/memo/terms.html)
144
+
145
+ ---
146
+
147
+ ## Code Signing
148
+
149
+ > Free code signing provided by **[SignPath.io](https://signpath.io/)**, certificate by **[SignPath Foundation](https://signpath.org/)**.
150
+
151
+ Our release pipeline (`.github/workflows/release.yml`) is integrated with SignPath.io so signed release binaries eliminate the Windows SmartScreen *"Unknown Publisher"* warning.
152
+
153
+ <details>
154
+ <summary>Maintainer setup to activate SignPath.io signing on GitHub Actions</summary>
155
+
156
+ 1. Register the open-source project `onursercanyilmaz/memo` at [SignPath.io](https://about.signpath.io/product/open-source).
157
+ 2. Add the following in **GitHub Repository Settings → Secrets and variables → Actions**:
158
+ - **Secret:** `SIGNPATH_API_TOKEN`
159
+ - **Variables:** `SIGNPATH_ORGANIZATION_ID`, `SIGNPATH_PROJECT_SLUG` (default: `memo`), `SIGNPATH_SIGNING_POLICY_SLUG` (default: `release-signing`).
160
+ 3. Push a new tag (`git tag v0.2.1 && git push --tags`) — signed `Memo-Setup-*.exe` and `memo-windows-x64.exe` will be published automatically.
161
+
162
+ </details>
163
+
164
+ ---
165
+
166
+ ## Project Structure
167
+
168
+ ```text
169
+ memo/
170
+ ├── src/
171
+ │ ├── main.rs # Win32 message loop, single-instance guard, tray & hotkey routing
172
+ │ ├── ui.rs # Software Direct2D / DirectWrite UI, settings, key recorder, context menu
173
+ │ ├── db.rs # Bundled SQLite + FTS5 schema, folders, retention cleanup
174
+ │ ├── clipboard.rs # Win32 clipboard listener, multi-format read/write, PNG image & privacy filters
175
+ │ ├── paste.rs # Global RegisterHotKey, focus capture/restore, SendInput Ctrl+V
176
+ │ ├── tray.rs # System tray icon & context menu
177
+ │ └── config.rs # JSON settings, keybindings, Windows Registry autostart
178
+ ├── assets/ # App icon (memo.ico & memo.png)
179
+ ├── docs/ # GitHub Pages landing site
180
+ ├── bin/memo.js # Node.js CLI wrapper
181
+ ├── installer/memo.iss # Inno Setup Windows installer script (Desktop shortcut + uninstaller)
182
+ ├── scripts/install.ps1# Local PowerShell installer (Desktop + Start Menu shortcuts)
183
+ └── .github/workflows/ # CI, GitHub Pages, SignPath.io code signing & Release automation
184
+ ```
185
+
186
+ ---
187
+
188
+ ## License
189
+
190
+ [MIT](LICENSE)
Binary file
Binary file
package/bin/memo.js ADDED
@@ -0,0 +1,115 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const { spawn, execSync } = require("child_process");
5
+ const fs = require("fs");
6
+ const https = require("https");
7
+ const os = require("os");
8
+ const path = require("path");
9
+
10
+ const rootDir = path.resolve(__dirname, "..");
11
+ const isWin = process.platform === "win32";
12
+ const isMac = process.platform === "darwin";
13
+
14
+ function getAssetName() {
15
+ if (isWin) return "memo-windows-x64.exe";
16
+ if (isMac) return process.arch === "arm64" ? "memo-macos-arm64" : "memo-macos-x64";
17
+ return "memo-linux-x64";
18
+ }
19
+
20
+ function getInstallPath() {
21
+ if (isWin) {
22
+ return path.join(process.env.LOCALAPPDATA || rootDir, "Memo", "memo.exe");
23
+ }
24
+ return path.join(os.homedir(), ".local", "bin", "memo");
25
+ }
26
+
27
+ const releaseExe = path.join(
28
+ rootDir,
29
+ "target",
30
+ "release",
31
+ isWin ? "memo.exe" : "memo"
32
+ );
33
+ const installedExe = getInstallPath();
34
+ const RELEASE_URL = `https://github.com/onursercanyilmaz/memo/releases/latest/download/${getAssetName()}`;
35
+
36
+ function findExecutable() {
37
+ if (fs.existsSync(releaseExe)) return releaseExe;
38
+ if (fs.existsSync(installedExe)) return installedExe;
39
+ return null;
40
+ }
41
+
42
+ function downloadFile(url, dest, redirectsLeft = 5) {
43
+ return new Promise((resolve, reject) => {
44
+ https
45
+ .get(url, { headers: { "User-Agent": "memo-clipboard-cli" } }, (res) => {
46
+ if (
47
+ res.statusCode >= 300 &&
48
+ res.statusCode < 400 &&
49
+ res.headers.location &&
50
+ redirectsLeft > 0
51
+ ) {
52
+ res.resume();
53
+ return resolve(
54
+ downloadFile(res.headers.location, dest, redirectsLeft - 1)
55
+ );
56
+ }
57
+ if (res.statusCode !== 200) {
58
+ res.resume();
59
+ return reject(new Error(`HTTP ${res.statusCode}`));
60
+ }
61
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
62
+ const file = fs.createWriteStream(dest);
63
+ res.pipe(file);
64
+ file.on("finish", () => {
65
+ file.close(() => {
66
+ if (!isWin) {
67
+ fs.chmodSync(dest, 0o755);
68
+ }
69
+ resolve();
70
+ });
71
+ });
72
+ file.on("error", (err) => {
73
+ fs.unlink(dest, () => reject(err));
74
+ });
75
+ })
76
+ .on("error", reject);
77
+ });
78
+ }
79
+
80
+ async function main() {
81
+ let exePath = findExecutable();
82
+
83
+ if (!exePath && fs.existsSync(path.join(rootDir, "Cargo.toml"))) {
84
+ console.log("[memo] Building release binary with cargo...");
85
+ try {
86
+ execSync("cargo build --release", { cwd: rootDir, stdio: "inherit" });
87
+ exePath = findExecutable();
88
+ } catch {
89
+ // Fall back to downloading from GitHub Releases
90
+ }
91
+ }
92
+
93
+ if (!exePath) {
94
+ console.log(`[memo] Downloading ${getAssetName()} from GitHub Releases...`);
95
+ try {
96
+ await downloadFile(RELEASE_URL, installedExe);
97
+ exePath = installedExe;
98
+ console.log(`[memo] Installed to ${installedExe}`);
99
+ } catch (err) {
100
+ console.error(`[memo] Failed to download binary: ${err.message}`);
101
+ console.error(
102
+ "[memo] Download manually from: https://github.com/onursercanyilmaz/memo/releases"
103
+ );
104
+ process.exit(1);
105
+ }
106
+ }
107
+
108
+ const child = spawn(exePath, process.argv.slice(2), {
109
+ detached: true,
110
+ stdio: "ignore",
111
+ });
112
+ child.unref();
113
+ }
114
+
115
+ main();
package/package.json CHANGED
@@ -1,6 +1,42 @@
1
1
  {
2
2
  "name": "memo-clipboard",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "Ultra-lightweight, native cross-platform clipboard manager written in pure Rust (Windows, macOS, Linux)",
5
+ "main": "bin/memo.js",
6
+ "bin": {
7
+ "memo": "bin/memo.js"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/onursercanyilmaz/memo.git"
12
+ },
13
+ "homepage": "https://onursercanyilmaz.github.io/memo/",
14
+ "bugs": {
15
+ "url": "https://github.com/onursercanyilmaz/memo/issues"
16
+ },
17
+ "scripts": {
18
+ "start": "node bin/memo.js",
19
+ "build": "cargo build --release",
20
+ "test": "cargo test",
21
+ "install:windows": "powershell -ExecutionPolicy Bypass -File scripts/install.ps1"
22
+ },
23
+ "keywords": [
24
+ "clipboard",
25
+ "clipboard-manager",
26
+ "rust",
27
+ "windows",
28
+ "direct2d",
29
+ "ditto-alternative",
30
+ "productivity"
31
+ ],
32
+ "author": "Onur Sercan Yilmaz",
33
+ "license": "MIT",
34
+ "engines": {
35
+ "node": ">=18.0.0"
36
+ },
37
+ "os": [
38
+ "win32",
39
+ "darwin",
40
+ "linux"
41
+ ]
42
+ }
@@ -0,0 +1,51 @@
1
+ param(
2
+ [switch]$Autostart
3
+ )
4
+
5
+ $ErrorActionPreference = "Stop"
6
+ $RepoRoot = Split-Path -Parent $PSScriptRoot
7
+ $ExeSource = Join-Path $RepoRoot "target\release\memo.exe"
8
+
9
+ if (-not (Test-Path $ExeSource)) {
10
+ Write-Host "Building memo.exe (release)..." -ForegroundColor Cyan
11
+ Push-Location $RepoRoot
12
+ cargo build --release
13
+ Pop-Location
14
+ }
15
+
16
+ $InstallDir = Join-Path $env:LOCALAPPDATA "Memo"
17
+ New-Item -ItemType Directory -Force -Path $InstallDir | Out-Null
18
+
19
+ # Stop running instance if present
20
+ Stop-Process -Name memo -Force -ErrorAction SilentlyContinue
21
+ Start-Sleep -Milliseconds 300
22
+
23
+ $InstalledExe = Join-Path $InstallDir "memo.exe"
24
+ Copy-Item -Path $ExeSource -Destination $InstalledExe -Force
25
+
26
+ $WshShell = New-Object -ComObject WScript.Shell
27
+
28
+ # Create Desktop Shortcut
29
+ $DesktopPath = [Environment]::GetFolderPath("Desktop")
30
+ $DesktopShortcut = $WshShell.CreateShortcut((Join-Path $DesktopPath "Memo.lnk"))
31
+ $DesktopShortcut.TargetPath = $InstalledExe
32
+ $DesktopShortcut.WorkingDirectory = $InstallDir
33
+ $DesktopShortcut.IconLocation = "$InstalledExe,0"
34
+ $DesktopShortcut.Description = "Memo - Ultra-Lightweight Rust Clipboard Manager"
35
+ $DesktopShortcut.Save()
36
+
37
+ # Create Start Menu Shortcut
38
+ $StartMenuDir = Join-Path $env:APPDATA "Microsoft\Windows\Start Menu\Programs"
39
+ $StartShortcut = $WshShell.CreateShortcut((Join-Path $StartMenuDir "Memo.lnk"))
40
+ $StartShortcut.TargetPath = $InstalledExe
41
+ $StartShortcut.WorkingDirectory = $InstallDir
42
+ $StartShortcut.IconLocation = "$InstalledExe,0"
43
+ $StartShortcut.Description = "Memo - Ultra-Lightweight Rust Clipboard Manager"
44
+ $StartShortcut.Save()
45
+
46
+ if ($Autostart) {
47
+ Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "MemoClipboard" -Value "`"$InstalledExe`""
48
+ }
49
+
50
+ Write-Host "Memo installed to $InstallDir" -ForegroundColor Green
51
+ Write-Host "Desktop shortcut created: $(Join-Path $DesktopPath 'Memo.lnk')" -ForegroundColor Green