{"id":47664777,"url":"https://github.com/simonwinther/opencode-tmux.nvim","last_synced_at":"2026-04-02T11:52:32.556Z","repository":{"id":346472411,"uuid":"1191040300","full_name":"simonwinther/opencode-tmux.nvim","owner":"simonwinther","description":"A Neovim plugin that integrates OpenCode through a tmux pane, letting you send code and prompts directly from your editor, without using Neovim's terminal.","archived":false,"fork":false,"pushed_at":"2026-03-25T01:59:50.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-25T02:02:13.104Z","etag":null,"topics":["lua","neovim","opencode","tmux"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonwinther.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"simonwinther"}},"created_at":"2026-03-24T21:33:03.000Z","updated_at":"2026-03-25T01:59:53.000Z","dependencies_parsed_at":"2026-03-25T02:02:19.977Z","dependency_job_id":null,"html_url":"https://github.com/simonwinther/opencode-tmux.nvim","commit_stats":null,"previous_names":["simonwinther/opencode-tmux.nvim"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/simonwinther/opencode-tmux.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonwinther%2Fopencode-tmux.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonwinther%2Fopencode-tmux.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonwinther%2Fopencode-tmux.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonwinther%2Fopencode-tmux.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonwinther","download_url":"https://codeload.github.com/simonwinther/opencode-tmux.nvim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonwinther%2Fopencode-tmux.nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31305855,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T09:48:21.550Z","status":"ssl_error","status_checked_at":"2026-04-02T09:48:19.196Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","neovim","opencode","tmux"],"created_at":"2026-04-02T11:52:31.712Z","updated_at":"2026-04-02T11:52:32.552Z","avatar_url":"https://github.com/simonwinther.png","language":"Lua","funding_links":["https://github.com/sponsors/simonwinther"],"categories":[],"sub_categories":[],"readme":"# opencode-tmux\n\nNeovim plugin that talks to [OpenCode](https://github.com/anomalyco/opencode) through a tmux pane instead of embedding a terminal.\n\nInspired by [opencode.nvim](https://github.com/nickjvandyke/opencode.nvim) by Nick van Dyke. Great plugin, but it uses a Neovim terminal buffer and I couldn't stand that, so I made my own that uses tmux instead. If you want the same idea but with tmux, here you go.\n\n## Install\n\nWith [lazy.nvim](https://github.com/folke/lazy.nvim), use the latest stable release:\n\n```lua\n{\n  \"simonwinther/opencode-tmux.nvim\",\n  name = \"opencode-tmux\",\n  version = \"*\", -- use latest stable release (recommended)\n\n  keys = {\n    {\n      \"\u003cleader\u003eoo\",\n      function()\n        require(\"opencode-tmux\").tmux_toggle()\n      end,\n      mode = { \"n\", \"v\" },\n      desc = \"Toggle OpenCode pane\",\n    },\n    {\n      \"go\",\n      function()\n        require(\"opencode-tmux\").send()\n      end,\n      mode = { \"n\", \"v\" },\n      desc = \"Send to OpenCode\",\n    },\n    {\n      \"\u003cleader\u003eoB\",\n      function()\n        require(\"opencode-tmux\").send_buffer()\n      end,\n      desc = \"Send buffer with prompt\",\n    },\n    {\n      \"\u003cleader\u003eop\",\n      function()\n        require(\"opencode-tmux\").select_prompt()\n      end,\n      mode = { \"n\", \"v\" },\n      desc = \"Pick a prompt\",\n    },\n    {\n      \"\u003cleader\u003eoa\",\n      function()\n        require(\"opencode-tmux\").ask({ submit = true })\n      end,\n      mode = { \"n\", \"v\" },\n      desc = \"Ask OpenCode\",\n    },\n    {\n      \"\u003cleader\u003eos\",\n      function()\n        require(\"opencode-tmux\").submit_prompt()\n      end,\n      desc = \"Submit OpenCode prompt\",\n    },\n    {\n      \"\u003cleader\u003eoc\",\n      function()\n        require(\"opencode-tmux\").clear_prompt()\n      end,\n      desc = \"Clear OpenCode prompt\",\n    },\n  },\n\n  config = function()\n    require(\"opencode-tmux\").setup({\n      port = 4096,\n      split = \"h\",             -- \"h\" side-by-side, \"v\" stacked\n      size = 40,               -- pane size in %\n      compact_context = false, -- skip code block fences to save tokens\n      code_fence = \"backticks\", -- \"backticks\", \"xml\", or { open, close }\n    })\n  end,\n}\n```\n\nIf you want to hack on it locally, clone the repo and point lazy to it:\n\n```lua\n{\n  dir = \"~/dev/opencode-tmux\",\n  -- same config as above\n}\n```\n\n## What it does\n\n`\u003cleader\u003eoo` opens OpenCode in a tmux split with `--port 4096`. Everything else talks to it over HTTP.\n\n`go` appends the current line (or visual selection) to the OpenCode prompt with file path and line numbers. You can hit `go` on multiple lines to build up context before submitting from OpenCode.\n\n`\u003cleader\u003eop` opens a prompt picker (explain, review, fix, optimize, etc.). Placeholders like `@this`, `@buffer`, `@diagnostics`, `@diff` get resolved to actual editor content before sending.\n\n`\u003cleader\u003eoB` sends the whole buffer with a free-form prompt. `\u003cleader\u003eoa` is a blank free-form input.\n\n`\u003cleader\u003eos` submits whatever is currently in the OpenCode prompt. Handy when you've built up context with `go` and want to fire it off without switching panes.\n\n`\u003cleader\u003eoc` clears the current OpenCode prompt without submitting it. Useful when you've built up context with `go` and want to start over. \n\nSet `compact_context = true` in setup to skip code block fences when sending context. Same file + line header, just without the `` ```lang `` wrapper. Saves tokens on the input side.\n\n`code_fence` controls how code blocks are wrapped when sending context. Defaults to `\"backticks\"` (standard markdown triple backticks). Set it to `\"xml\"` for XML-style tags, or pass a table with your own `open` and `close` patterns. Use `%s` in the open pattern where the language should go.\n\n```lua\n-- xml tags: \u003ccode language=\"lua\"\u003e...\u003c/code\u003e\ncode_fence = \"xml\"\n\n-- custom format: use %s for the language identifier\ncode_fence = { open = \"\u003csource lang=%s\u003e\", close = \"\u003c/source\u003e\" }\n```\n\nSome models respond better to XML fencing than markdown backticks. If you're working with a model that prefers a different format, this lets you match it without changing anything else.\n\nWhen you quit Neovim, the OpenCode pane and process get cleaned up automatically.\n\n## Placeholders\n\n`@this` -- current line or visual selection\n`@buffer` -- entire buffer\n`@diagnostics` -- LSP diagnostics for the current buffer\n`@diff` -- `git diff` output\n\nThese are resolved client-side before sending to OpenCode.\n\n## Built-in prompts\n\nexplain, review, fix, optimize, document, implement, test, diagnostics, diff.\n\nAdd your own in setup:\n\n```lua\noc.setup({\n  prompts = {\n    refactor = { prompt = \"Refactor @this for clarity\", submit = true },\n  },\n})\n```\n\n## Requirements\n\n- Neovim 0.10+\n- tmux\n- [OpenCode](https://github.com/anomalyco/opencode) CLI\n- curl\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonwinther%2Fopencode-tmux.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonwinther%2Fopencode-tmux.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonwinther%2Fopencode-tmux.nvim/lists"}