#!/usr/bin/env python3
"""
engram-paste.py: Simple pyperclip wrapper for quick memory capture.
(From previous prompt - pyperclip script.)
"""

import sys

import pyperclip

if __name__ == "__main__":
    if len(sys.argv) > 1:
        # Copy args to clipboard for engram capture
        text = " ".join(sys.argv[1:])
        pyperclip.copy(text)
        print(f"Copied '{text[:100]}...' to clipboard.")
    else:
        # Paste from clipboard
        text = pyperclip.paste()
        print(text)
