https://github.com/fedeya/opencode-paste-as-file
Paste large clipboard content into opencode as file references
https://github.com/fedeya/opencode-paste-as-file
clipboard opencode opencode-plugin plugin
Last synced: 14 days ago
JSON representation
Paste large clipboard content into opencode as file references
- Host: GitHub
- URL: https://github.com/fedeya/opencode-paste-as-file
- Owner: fedeya
- License: mit
- Created: 2026-05-21T01:16:59.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-21T01:50:37.000Z (about 2 months ago)
- Last Synced: 2026-06-13T05:23:56.723Z (about 1 month ago)
- Topics: clipboard, opencode, opencode-plugin, plugin
- Language: TypeScript
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# opencode-paste-as-file
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`:
```json
{
"$schema": "https://opencode.ai/tui.json",
"plugin": [
[
"opencode-paste-as-file",
{
"keybinds": ["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, `v` is:
```text
ctrl+x v
```
The inserted prompt text looks like:
```text
@.opencode/pasted/paste-2026-05-20T12-00-00-000Z.txt
```
## Options
```ts
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 `["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`:
```gitignore
.opencode/pasted/
```