Skip to content

Ivaloz/ClipMemo

Repository files navigation

ClipMemo Logo

ClipMemo

Smart Clipboard Manager for Windows / 智能剪贴板管理工具

Log every copy. Find anything in seconds. / 高效管理你的每一次复制粘贴。自动记录、智能分类、秒级检索。

Features / 功能特性Install / 安装使用Shortcuts / 快捷键Dev / 开发指南Architecture / 技术架构

Platform Tauri React Rust License Version


Features / 功能特性

Core / 核心功能

Feature / 功能 Description / 说明
Clipboard History / 剪贴板历史 Auto-record copied text, images, files, links, colors. Up to 10,000 entries / 自动记录复制的文本、图片、文件、链接、颜色,最多保存 10,000 条
Smart Classification / 智能分类 Auto-detect content type (Text/Image/File/URL/Color), filter by tabs / 自动识别内容类型(文本/图片/文件/链接/颜色),支持分类标签页快速筛选
Full-Text Search / 全文搜索 Instant search with Ctrl+F focus / 内容即时搜索,支持 Ctrl+F 快捷聚焦
Pin & Favorite / 置顶 & 收藏 Pin important items to top or save to favorites / 重要内容置顶显示或加入收藏夹
Quick Reply / 快捷回复 Save frequent text snippets, paste with one click / 保存常用文本片段,一键粘贴
Image Preview / 图片预览 Thumbnail grid + full-size viewer, ESC to close / 缩略图列表 + 点击查看高清原图,支持 ESC 关闭
Export / 数据导出 Export to TXT / Word format / 导出为 TXT / Word 格式
Smart Paste / 智能粘贴 Auto-paste, paste as plain text / 支持自动粘贴、粘贴为纯文本

界面特性

功能 说明
深色 / 浅色模式 跟随系统或手动切换,一键切换
自定义标题栏 无边框窗口 + 自定义拖动区域
系统托盘 最小化到托盘后台运行,右键菜单快速操作
窗口置顶 一键置顶窗口,方便随时取用
键盘导航 完整的键盘快捷键支持,无需鼠标

高级功能

功能 说明
来源应用检测 显示内容来自哪个应用(如 Chrome、VS Code)
排除应用 指定应用的复制内容不记录(如密码管理器)
自动清理 定期清理超过 30 天的过期记录
缩略图生成 图片自动生成 200px 缩略图,节省存储空间
开机自启 系统启动时自动运行
应用内更新 基于 GitHub Releases 的自动更新机制

截图预览

TODO: 添加截图


Installation / 安装使用

Option 1: Download Installer (Recommended) / 下载安装包(推荐)

Download the latest version from Releases:

Installer / 安装包 Description / 说明
ClipMemo_x.x.x_x64-setup.exe NSIS installer (recommended, custom path) / NSIS 安装包(推荐,支持自定义安装路径)
ClipMemo_x.x.x_x64_en-US.msi MSI installer (enterprise deployment) / MSI 安装包(适合企业批量部署)

Option 2: Build from Source / 从源码构建

# Clone project / 克隆项目
git clone https://github.com/Ivaloz/ClipMemo.git
cd ClipMemo

# Install dependencies / 安装依赖
npm install

# Development mode / 开发模式运行
npm run tauri:dev

# Build release / 构建发布版本
npm run tauri:build

Build output is in src-tauri/target/release/bundle/.


Shortcuts / 快捷键

Global Shortcuts / 全局快捷键

Shortcut / 快捷键 Function / 功能 Customizable / 可自定义
Ctrl+Shift+V Show/Hide main window / 呼出主窗口
Ctrl+; Show/Hide quick paste panel / 快速粘贴面板

窗口内快捷键

快捷键 功能
/ 上下选择条目
Enter 粘贴选中项到上一个活动窗口
Delete 删除选中项
Escape 关闭窗口 / 关闭预览
Ctrl+F 聚焦搜索框
E 编辑选中文本
1 - 9 快速粘贴前 9 项

Architecture / 技术架构

┌─────────────────────────────────────────────────┐
│                   ClipMemo                       │
├──────────────────────┬──────────────────────────┤
│    Frontend (React)  │    Backend (Rust)         │
│                      │                           │
│  React 18            │  Tauri 2.11               │
│  TypeScript          │  SQLite (rusqlite)        │
│  TailwindCSS         │  Clipboard Monitor (Win32)│
│  Zustand             │  Global Shortcuts         │
│  Lucide Icons        │  System Tray              │
│  date-fns            │  Window Management        │
│                      │  Image Processing (image) │
│                      │  Key Simulation (enigo)   │
│                      │  File Dialog (rfd)        │
├──────────────────────┴──────────────────────────┤
│           SQLite Local Database                  │
│   clipboard_items + settings + FTS index         │
└─────────────────────────────────────────────────┘

Tech Stack / 技术栈

Layer / 层级 Tech / 技术 Version / 版本 Purpose / 用途
Frontend React 18.2 Component UI / 组件化 UI
Type System TypeScript 5.3 Type safety / 类型安全
Build Tool Vite 5.0 Dev server + build / 开发服务器+构建
CSS TailwindCSS 3.3 Atomic CSS / 原子化 CSS
State Mgmt Zustand 4.4 Lightweight state / 轻量级状态管理
Icons Lucide React 0.294 Modern icons / 现代图标
Backend Tauri 2.11 Native app framework / 跨平台原生应用
System Lang Rust 1.70+ High-perf backend / 高性能后端
Database SQLite 3.x Local storage / 本地数据存储
Key Sim enigo 0.2 Simulate Ctrl+V / 模拟粘贴
Image image 0.24 Thumbnail generation / 缩略图生成
File Dialog rfd 0.15 Export file picker / 导出文件选择器

项目结构

ClipMemo/
├── src/                          # React 前端源码
│   ├── main.tsx                  # 入口(含 localStorage 迁移)
│   ├── App.tsx                   # 主应用组件
│   ├── components/               # UI 组件
│   │   ├── TitleBar.tsx          # 自定义标题栏(窗口拖动)
│   │   ├── MainWindow.tsx        # 主窗口布局
│   │   ├── ClipboardList.tsx     # 剪贴板列表
│   │   ├── ClipboardCard.tsx     # 单条卡片(含图片预览)
│   │   ├── CategoryTabs.tsx      # 分类标签页
│   │   ├── QuickPastePanel.tsx   # 快速粘贴面板
│   │   ├── QuickReplyManager.tsx # 快捷回复管理
│   │   ├── SettingsPanel.tsx     # 设置面板
│   │   ├── TextEditor.tsx        # 文本编辑器
│   │   └── AboutPanel.tsx        # 关于面板
│   ├── hooks/                    # React Hooks
│   │   ├── useClipboardMonitor.ts # 剪贴板实时监控
│   │   └── useKeyboard.ts        # 键盘快捷键
│   ├── lib/                      # 工具库
│   │   └── tauri.ts              # Tauri API 封装层
│   ├── stores/                   # Zustand 状态管理
│   │   ├── clipboardStore.ts     # 剪贴板状态
│   │   └── settingsStore.ts      # 设置状态
│   ├── styles/                   # 全局样式
│   │   └── index.css             # TailwindCSS 入口
│   └── types/                    # TypeScript 类型
│       └── index.ts              # 核心类型定义
├── src-tauri/                    # Rust 后端源码
│   ├── src/
│   │   ├── main.rs               # 应用入口 + 窗口管理
│   │   ├── clipboard.rs          # 剪贴板监控(Win32 API)
│   │   ├── database.rs           # SQLite 数据库操作
│   │   ├── commands.rs           # Tauri 命令(前端调用)
│   │   ├── paste.rs              # 智能粘贴功能
│   │   ├── shortcuts.rs          # 全局快捷键管理
│   │   └── sync.rs               # 数据同步(预留)
│   ├── capabilities/
│   │   └── default.json          # Tauri 权限配置
│   ├── icons/                    # 应用图标(多尺寸)
│   ├── Cargo.toml                # Rust 依赖配置
│   └── tauri.conf.json           # Tauri 应用配置
├── public/                       # 静态资源
│   ├── logo.png                  # 应用 Logo
│   └── icon.png                  # 公共图标
├── scripts/                      # 构建脚本
│   ├── build-updater-latest-json.mjs
│   └── windows-release-smoke.ps1
├── package.json                  # Node.js 配置
├── vite.config.ts                # Vite 配置
├── tailwind.config.js            # TailwindCSS 配置
├── tsconfig.json                 # TypeScript 配置
├── LICENSE                       # MIT 许可证
└── README.md                     # 本文档

Development / 开发指南

Prerequisites / 环境要求

Tool / 工具 Version / 版本 Install / 安装命令
Node.js 18+ winget install OpenJS.NodeJS.LTS
Rust 1.70+ winget install Rustlang.Rust.MSVC
VS Build Tools 2022 winget install Microsoft.VisualStudio.2022.BuildTools
WebView2 Win10+ winget install Microsoft.EdgeWebView2Runtime

After installing VS Build Tools, select "Desktop development with C++" workload.

开发命令

# 安装依赖
npm install

# 启动开发服务器(热更新)
npm run tauri:dev

# 构建发布版本
npm run tauri:build

# 仅前端类型检查
npx tsc --noEmit

# 仅 Rust 检查
cargo check    # 在 src-tauri/ 目录下

# Windows 发布冒烟测试
npm run release:smoke:win

Tauri 权限说明

ClipMemo 使用 Tauri 2 的 capabilities 系统管理权限,配置文件位于 src-tauri/capabilities/default.json

权限 用途
core:window:allow-start-dragging 窗口拖动
core:window:allow-set-always-on-top 窗口置顶
fs:allow-read-file 读取图片文件(预览)
dialog:default 文件导出对话框
clipboard-manager:default 剪贴板读写
global-shortcut:default 全局快捷键
autostart:default 开机自启
updater:default 应用内更新
notification:default 系统通知

更新方式

应用内更新(推荐)

  1. 打开 设置 → 关于
  2. 点击 检查更新
  3. 发现新版本后点击 下载并安装更新
  4. 按安装器提示完成升级

手动更新

  1. 退出 ClipMemo(右键托盘图标 → 退出)
  2. Releases 下载新版安装包
  3. 运行安装包覆盖安装(数据自动保留)

维护者说明:发布时需上传 latest.json.sig 签名文件到 Release,详见 RELEASE.md


数据存储

数据 位置 格式
剪贴板历史 $APPDATA/ClipMemo/clipboard.db SQLite
应用设置 浏览器 localStorage JSON
图片文件 $APPDATA/ClipMemo/images/{日期}/ PNG/JPG
缩略图 同图片目录,_thumb 后缀 JPG

数据兼容性

ClipMemo 与 macOS 版使用相同的 SQLite 数据结构,支持:

  • 通过云盘(OneDrive、iCloud 等)同步 clipboard.db
  • 跨平台数据迁移
  • 导出为 TXT / Word 格式

常见问题

编译报错 "linker 'link.exe' not found"

未安装 Visual Studio Build Tools。安装后选择 "C++ 桌面开发" 工作负载:

winget install Microsoft.VisualStudio.2022.BuildTools

然后打开 Visual Studio Installer,勾选 "使用 C++ 的桌面开发"。

运行时白屏

WebView2 未安装(Windows 10 需要,Windows 11 已内置):

winget install Microsoft.EdgeWebView2Runtime
剪贴板监控不工作

可能被安全软件拦截。尝试:

  1. 以管理员身份运行
  2. 将 ClipMemo 添加到安全软件白名单
  3. 检查 Windows 剪贴板历史记录是否已开启(设置 → 剪贴板)
全局快捷键不生效

可能与其他应用快捷键冲突。在 设置 → 快捷键 中修改为其他组合键。

Tauri 版本不匹配警告

运行 cargo update 更新 Cargo.lock,确保 Rust crate 版本与 npm 包版本对齐:

cd src-tauri
cargo update

Contributing / 贡献指南

Issues and PRs welcome! / 欢迎提交 Issue 和 Pull Request!

  1. Fork this repo / Fork 本仓库
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Commit changes: git commit -m 'feat: add your feature' (see Conventional Commits)
  4. Push: git push origin feature/your-feature
  5. Open a Pull Request

许可证

本项目采用 MIT 许可证

MIT License

Copyright (c) 2026 Ivaloz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software...

联系方式 & 打赏

如果 ClipMemo 对你有帮助,可以请作者喝杯咖啡 ☕

微信打赏

自愿随意打赏,不影响功能使用


如果 ClipMemo 对你有帮助,请给一个 ⭐ Star 支持一下!

About

Windows 剪贴板管理工具 - 让每一次复制粘贴都有迹可循

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors