Skip to content
    ↑↓ select↵ openesc close
    English中文
    fedeya

    Paste As File

    v0.1.1UI & Themes
    opencode-paste-as-file

    Paste clipboard content into opencode as a file reference.

    GitHub stars

    1

    Monthly installs

    18

    5 in 7 days

    Composite scoreSCORE

    25.6

    Multi-signal model

    Last commit

    3 months ago

    2026-05-21

    Install and configure

    opencode.json

    Writes to this project's opencode.json — applies to this repository only.

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["opencode-paste-as-file@0.1.1"]
    }

    opencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.

    Paste clipboard text into opencode as a file reference.

    The plugin reads your clipboard, writes it to .opencode/pasted/, and appends an @file reference to the current prompt.

    Install

    Add the TUI plugin to your tui.json:

    {
      "$schema": "https://opencode.ai/tui.json",
      "plugin": [
        [
          "opencode-paste-as-file",
          {
            "keybinds": ["<leader>v"],
            "dir": ".opencode/pasted"
          }
        ]
      ]
    }
    

    Restart opencode after changing plugin config.

    Usage

    Run Paste as file from the command palette, or use the configured keybinding.

    With the default opencode leader key, <leader>v is:

    ctrl+x v
    

    The inserted prompt text looks like:

    @.opencode/pasted/paste-2026-05-20T12-00-00-000Z.txt
    

    Options

    type Options = {
      dir?: string
      keybinds?: string[]
    }
    
    • dir: directory where pasted files are written. Defaults to .opencode/pasted.
    • keybinds: TUI keybindings for the action. Defaults to ["<leader>v"].

    Clipboard Support

    • macOS: pbpaste
    • Windows: PowerShell Get-Clipboard
    • Linux: tries wl-paste, then xclip, then xsel

    Git Ignore

    Add this to your project .gitignore:

    .opencode/pasted/