Skip to content

aryanp05/opticode

Repository files navigation

OptiCode

OptiCode

OptiCode is a macOS menu-bar–style agent (no Dock icon) that gives you nine numbered clipboard slots, a password-protected secrets vault, and global keyboard chords so you can capture, recall, and paste content without leaving the app you are in.

It runs in the background, listens through an Accessibility-approved event tap, and stores clipboard slot data under Application Support. The vault encrypts entries on disk and can require Touch ID, Apple Watch, or your Mac login password when you open it (once per panel session).


⚡ Keyboard Shortcuts

All interactions happen through fast Option (⌥) key chords.

You have about 1.5 seconds after the first key to press the second key. Keep ⌥ held through the sequence.

Clipboard — Save

Action Keys
Start “copy to slot” chord ⌥ C
Save selection to slot n (1–9) ⌥ C, then n
Save current system clipboard to slot n ⌥ C, then ⇧ n

Clipboard — Paste

Action Keys
Start “paste from slot” chord ⌥ V
Paste from slot n (1–9) into the front app ⌥ V, then n

Vault

Action Keys
Open vault — Add tab ⌥ C, then 0
Open vault — List tab ⌥ V, then 0

Closing the vault panel locks the cached crypto key until the next successful unlock.

Clipboard Panel

Action Keys
Open clipboard overview (all 9 slots) ⌥ C V

📋 Clipboard System

OptiCode gives you nine persistent clipboard slots (1–9) so you never lose copied content again.

  • Save text or images into slots
  • Instantly paste into any app
  • Persistent across restarts

Clipboard panel

🖼️ Image Support

Clipboard slots are not just text — they also support images with previews, making it easy to store UI snippets, screenshots, and other visual assets.

Clipboard panel with image


🔐 Secrets Vault

A built-in encrypted vault for storing sensitive data like:

  • API keys
  • Tokens
  • Passwords
  • Secure notes

OptiCode uses AES-GCM encryption, with key material stored securely in the macOS Keychain.

Vault List View

Browse your stored secrets with search, masked values, and quick actions.

Vault list view

Add New Entry

Quickly add a new secret through a simple key-value interface.

Vault add view


🧠 How It Works

  • Runs as an LSUIElement app, so it stays out of the Dock

  • Uses a CGEvent tap for global keyboard shortcut detection

  • Uses the normal NSApplication event loop so floating panels remain interactive

  • Stores clipboard slots and vault data under:

    ~/Library/Application Support/OptiCode/


✨ Features

  • Nine clipboard slots (1–9) for persistent copy/paste workflows
  • Clipboard overview panel with previews, copy, and clear actions
  • Image thumbnail support for bitmap clipboard content
  • Encrypted secrets vault with search, show/hide, copy, and remove actions
  • Keychain-backed key storage with optional Local Authentication
  • Menu-bar–style accessory app with no Dock icon
  • Persistent local storage across app restarts

🛠 Requirements

  • macOS with a Swift toolchain capable of building the project
  • Framework support for Cocoa, SwiftUI, CryptoKit, LocalAuthentication, and Security
  • Accessibility permission for OptiCode, since the app uses a CGEvent tap
  • Appropriate codesigning entitlements for biometric or secure unlock behavior

🚀 Building

From the opticode directory:

./scripts/compile

This compiles the Swift sources, signs the app bundle where configured, and produces opticode.app.


🔒 Privacy & Security

  • Clipboard snapshots may contain sensitive content and are stored locally under Application Support
  • Vault data is encrypted on disk
  • The wrapping key is stored in the macOS Keychain
  • Local Authentication can be required before unlocking the vault
  • Review your Keychain account strings, entitlements, and encryption policy before shipping to others

📄 License

Add your license here (for example: MIT, Apache-2.0, or All rights reserved).

About

Low level agent that introduces 10 new clipboards for Mac, allowing you to store 11 total things at once and paste them as needed

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors