Skip to content

A personal AI agent that automatically reads prompts from the clipboard, sends them to an AI model provider, receives the response, minimalizes it , and copies it back to the clipboard.

Notifications You must be signed in to change notification settings

sablekunal/paperclip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PaperClip Logo
PaperClip

The invisible AI agent living in your clipboard.

Python 3.8+ License: MIT PRs Welcome

Stop Alt-Tab-ing. Just copy, wait, and paste code.


⚡ Why PaperClip?

Coding flows shouldn't be broken by browser tabs. PaperClip brings the power of LLMs directly to your clipboard. It runs silently in the background, watches for your commands, and swaps your prompt with code-only answers.

  • Zero UI: Acts as a ghost in your shell.
  • Privacy First: No clipboard history stored.
  • Resilient: Automatic failover if an API key dies.

🤖 How It Works

It's magic. No, really.

  1. Copy a command: agent.prompt write a quick sort in python
  2. Wait a second... (The agent talks to the AI) ⏳
  3. Paste! The text in your clipboard is now the code you asked for.
graph TD;
    A[User Copies Prompt] -->|Clipboard| B(PaperClip Agent);
    B -->|API Request| C{AI Provider};
    C -->|Response| B;
    B -->|Minimalize Code| D[Update Clipboard];
    D -->|Paste| E[User Code Editor];
Loading

🌟 Feature Highlights

Feature Description
Silent Agent 👻 Runs in the terminal, works with ANY app where you can copy/paste.
Smart Mode 🧠 agent.prompt for one-off tasks, agent.promptall for hands-free continuous prompting.
Failover 🛡️ Define multiple API keys. If one fails, it tries the next one instantly.
Clean Outputs 🧹 Automatically strips "Sure, here is the code..." fluff. You get just the code.
JSON Storage 💾 Check ./sessions for full logs if you need them. No database required.

🚀 Quick Start

1. Install Dependencies

pip install aiohttp pyperclip

2. Configure Providers

Edit providers.json to add your keys (OpenRouter, local APIs, etc).

3. Run the Agent

python bot.py

That's it. You are ready to roam.

⌨️ Commands Cheat Sheet

Type these instantly into any text field and copy them to trigger the agent.

Magic Command Action
agent.prompt <text> Sends <text> to the AI.
agent.prompt Activates trigger. The next thing you copy will be sent.
agent.promptall God Mode. Every single copy is sent to AI.
agent.promptone Disables God Mode. Back to manual triggers.
model.gem Switch priority to Gemini models.
model.openr Switch priority to OpenRouter models.

⚙️ Configuration

Your providers.json is the brain. Add as many models as you need:

[
  {
    "id": "primary_gpt",
    "name": "OpenRouter GPT-4o",
    "base_url": "https://api.openrouter.ai",
    "api_key": "sk-or-...",
    "model": "openai/gpt-4o-mini",
    "priority": 1,
    "enabled": true
  }
]

🗺️ Roadmap

  • Basic Clipboard Interception
  • Provider Failover
  • Code Minimalization
  • GUI Dashboard (Optional)
  • Local LLM Support (Ollama)
  • Voice Trigger Support

📜 License

Free to use, modify, and hack. Just don't upload your providers.json!

About

A personal AI agent that automatically reads prompts from the clipboard, sends them to an AI model provider, receives the response, minimalizes it , and copies it back to the clipboard.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages