An Electron-based clipboard manager that applies JavaScript transformation operations to the current clipboard content. It’s lightweight, customizable, and designed for developers who frequently need to reformat or transform copied text.
- Call up an input menu with a keyboard shortcut or tray icon.
- Apply custom transformation operations to clipboard content.
- Define your own operators via JSON + JavaScript scripts.
- Extendable and developer-friendly.
- Open the input menu with the shortcut Ctrl + Shift + Space or by clicking the tray icon.
- Select the desired operation and press Enter.
- The clipboard content is instantly updated, and the menu closes automatically.
Operators are defined in a JSON file, for example:
{
"operator": "Escape path",
"aliases": ["escape"],
"description": "Convert any path like C:\\Users\\me to C:\\\\Users\\\\me",
"icon": "folder_code",
"script": "escape_path.js"
},
{
"operator": "Toggle wslpath",
"aliases": ["wsl"],
"description": "Toggle WSL Linux <=> Windows paths",
"icon": "rule_folder",
"script": "toggle_wslpath.js"
}Each operator points to a JavaScript file with a standardized structure:
export async function run(rawData) {
const transformedData = yourFunction(rawData);
return transformedData;
}For example:
// escape_path.js
export async function run(rawData) {
return rawData.replaceAll('\\', '\\\\');
}# Clone the repository
git clone {TODO}
cd clipboard-operator
# Install dependencies
npm install
# Run the app
npm start# Start in development mode with hot reload
npm run dev
# Build the app for distribution
npm run buildRequirements:
- Load the json with all the operators from the main
- Pass the json operators to front end
- On front end, trigger a enter or select to operate
- Load the script from the operator
- Get the current clipboard
- Preform the operation
- Same the result into clipboard
- Make the get of the jsons to be everytime it shows the window (for hot reload)
- Remove the script from the cache so we can hot reload it
- Add lint
- script/validation on script.run(input) (security issue: Arbitrary Execution)
- Error handling in messages
- Error handling when the script has some error
- Show processing for slow runners
- Show terminal output on the window
- Add Unit Tests
- Implement Logging System
- Add User Feedback Mechanisms
- Create Proper Build Pipeline
- Add Auto-updater
Found a bug? Open an issue and include:
- Steps to reproduce
- Expected behaviour
- Actual behaviour
- System information (OS, Node, Electron version)
Q: Can I define my own operators?
A: Yes! Just add them to the operators JSON and create a script with a run function.
Q: Does it work on Linux/Mac?
A: Yes, Electron apps are cross-platform. Tested primarily on Windows for now.
Contributions are welcome!
- Fork the repository
- Create your feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -m 'Add feature') - Push to the branch (
git push origin feature/my-feature) - Open a Pull Request
MIT License – feel free to use, modify, and distribute.
