Smart clipboard that uses Gemini to extract structured data from what you copy, stores it in Snowflake.
Need Snowflake account (trial works), Gemini API key, Visual Studio, Python 3.8+.
- Create
.envin root folder:
SNOWFLAKE_CONNECTION_STRING="scheme=https;account=YOUR_ACCOUNT;user=YOUR_USER;password=YOUR_PASSWORD;role=ACCOUNTADMIN;warehouse=CTRL_MAGIC_WH;db=CTRL_MAGIC_DB;schema=CORE"
GEMINI_API_KEY="YOUR_KEY"
- Setup DB:
cd db-setup
pip install snowflake-connector-python python-dotenv
python setup.py
- Open
CtrlMagicWindowsApp.slnin Visual Studio. - Build the solution.
- Run the application.
- It will run silently in the system tray.
- Ctrl+C on text/files: Captures and processes content.
- Ctrl+M: Intelligent Paste.
App sits in system tray, processes clipboard on Ctrl+C. Smart paste (Ctrl+Shift+V) comming soon.
On startup, the app runs a self-test:
- Checks Snowflake connection (TODO).
- Sends a "Hello" prompt to Gemini and prints the JSON response to the Debug Console.
- Frontend: Windows Forms (hidden), Keyboard Hooks.
- AI: Gemini 2.0 Flash (via REST API).
- Backend: Snowflake (Hybrid Tables / Standard Tables).
- Background Service: Python service on Vultr VM for data cleanup.
A Python service that runs on a Vultr VM to automatically analyze and clean sensitive data from clipboard history using Snowflake Cortex LLM.
- Privacy Analysis: Uses Snowflake Cortex AI to detect PII, passwords, API keys, financial data.
- Confidence-Based Decisions: Configurable thresholds for auto-remove, flag for review, or retain.
- Audit Logging: All cleanup actions logged to
CLEANUP_AUDIT_LOGfor compliance. - Dry-Run Mode: Test analysis without deleting data.
ChromaDB is used by defult, for more advanced use cases A-MEM agentic LLM memory DB used from https://arxiv.org/abs/2502.12110.
-
Create a
.envfile invultr-background/:SNOWFLAKE_ACCOUNT=YOUR_ORG-YOUR_ACCOUNT SNOWFLAKE_USER=YOUR_USER SNOWFLAKE_PASSWORD=YOUR_PASSWORD SNOWFLAKE_WAREHOUSE=CTRL_MAGIC_WH SNOWFLAKE_DATABASE=CTRL_MAGIC_DB SNOWFLAKE_SCHEMA=CORE DRY_RUN=true
-
Install dependencies:
cd vultr-background pip install -r requirements.txt -
Run the schema setup in Snowflake:
snowsql -f sql/setup_schema.sql
# Run once (for testing)
python main.py --once
# Run as scheduled service (every 6 hours by default)
python main.py
# Check status
python main.py --status- Docker:
docker-compose up -d - Systemd: Use
systemd/data-cleanup.servicefor production Linux servers.