Modify & Customize Copybuffer
Extend and personalize Copybuffer to fit your workflow.
Configuration
Configuration is stored at ~/.copybuffer/config.json. You can view and modify settings using CLI commands.
View current configuration:
copybuffer configSet configuration values:
# Set max history size
copybuffer config-set maxHistorySize 2000
# Set data directory
copybuffer config-set dataDir /path/to/data
# Configure hotkeys
copybuffer config-set hotkeys.toggleHistory "F11"Example config.json:
{
"dataDir": "~/.copybuffer",
"maxHistorySize": 1000,
"autoSave": true,
"hotkeys": {
"toggleHistory": "F9",
"search": "F10"
},
"gist": {
"enabled": false,
"token": "",
"gistId": ""
}
}Data Storage
All clipboard data is stored in JSON format at ~/.copybuffer/:
- 📄
config.json- Configuration settings - 📄
history.json- Clipboard history
History Entry Format:
{
"id": "unique-uuid",
"content": "clipboard content",
"timestamp": 1234567890123,
"type": "text",
"source": "optional-source",
"tags": ["optional", "tags"]
}Development
🔨
Build & Watch
# Build
npm run build
# Watch mode
npm run watch✨
Code Quality
# Lint
npm run lint
# Format
npm run format📦
API Usage
Use Copybuffer programmatically in your Node.js applications:
import { clipboardMonitor, searchManager, storageManager } from 'copybuffer';
// Start monitoring
clipboardMonitor.start();
// Search clipboard
const results = searchManager.search({
query: 'test',
limit: 10
});Contributing
This project is for personal use, but feel free to fork and modify for your own needs!