How cooped-labs/restash works
Restash is an Electron app for saving reusable clipboard items and pasting them into other apps. The documented main flow is: summon the cursor numpad, choose a saved item, then restore focus to the prior app and paste. Other major capabilities include clipboard memory, stashes, environments, agent templates, multi-file items, and QR decoding. The excerpts show platform adapters and QR decoding; main.js was not sampled, so internal orchestration and persistence details are represented only where the README supports them.
Main entry points: main.js Electron runtime · index.js Platform selector · renderer.js App interface · platform OS adapters
Components 17
User interaction
- App interface
renderer.js - Electron runtime
main.js
Saved items
- Saved items
main.js - Clipboard memory
main.js - Stashes
main.js - Agent templates
main.js - Multi-file items
main.js
Environments
- Environment capture
main.js - Chrome profiles
platform/chrome.js
Platform services
- Platform selector
platform/index.js - OS adapters
platform - Hotkey settings
platform/accelerators.js - Platform capabilities
platform/capabilities.js
QR scanning
- QR capture and decode
platform/qr.js
Other components
- User
- Target app
- Desktop screen
Connections 17
- User → App interface: summons
README.md - App interface → Electron runtime: selects item
- Electron runtime → Saved items: reads and writes
README.md - Electron runtime → Clipboard memory: captures copies
README.md - Electron runtime → Platform selector: uses platform services
- Platform selector → OS adapters: selects implementation
platform/index.js - Electron runtime → Target app: pastes into
README.md - User → Stashes: organizes items
README.md - User → Agent templates: saves templates
README.md - Electron runtime → Multi-file items: pastes file sets
README.md - User → Environment capture: captures environment
README.md - Environment capture → OS adapters: lists windows
- Environment capture → Chrome profiles: uses profiles
- User → QR capture and decode: scans region
README.md - Desktop screen → QR capture and decode: provides capture
platform/qr.js - Platform selector → Hotkey settings: exports defaults
platform/index.js - Platform selector → Platform capabilities: exports session info
platform/index.js