{"id":49759132,"url":"https://github.com/maou-shonen/opencode-zellij","last_synced_at":"2026-05-14T15:01:20.811Z","repository":{"id":356352971,"uuid":"1232117359","full_name":"maou-shonen/opencode-zellij","owner":"maou-shonen","description":"OpenCode plugin for Zellij-backed panes and workflow integrations","archived":false,"fork":false,"pushed_at":"2026-05-13T12:12:53.000Z","size":208,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-13T14:39:22.631Z","etag":null,"topics":["opencode","opencode-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/maou-shonen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-07T15:51:57.000Z","updated_at":"2026-05-13T12:12:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/maou-shonen/opencode-zellij","commit_stats":null,"previous_names":["maou-shonen/opencode-zellij"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/maou-shonen/opencode-zellij","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maou-shonen%2Fopencode-zellij","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maou-shonen%2Fopencode-zellij/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maou-shonen%2Fopencode-zellij/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maou-shonen%2Fopencode-zellij/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maou-shonen","download_url":"https://codeload.github.com/maou-shonen/opencode-zellij/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maou-shonen%2Fopencode-zellij/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33030380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["opencode","opencode-plugin"],"created_at":"2026-05-11T02:56:03.439Z","updated_at":"2026-05-14T15:01:20.768Z","avatar_url":"https://github.com/maou-shonen.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# opencode-zellij\n\n[![npm version](https://img.shields.io/npm/v/opencode-zellij.svg)](https://www.npmjs.com/package/opencode-zellij)\n[![CI](https://github.com/maou-shonen/opencode-zellij/actions/workflows/ci.yml/badge.svg)](https://github.com/maou-shonen/opencode-zellij/actions/workflows/ci.yml)\n\n[正體中文](README.zh.md)\n\nGive OpenCode a way to use visible Zellij panes for work that should not disappear into a one-shot tool call.\n\nUse OpenCode's built-in `bash` for normal commands. Use this plugin when the process should stay alive, remain visible, or need later input.\n\n## Installation\n\nAdd the npm package name to your OpenCode config:\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugin\": [\n    \"opencode-zellij\"\n  ]\n}\n```\n\nOpenCode installs npm plugins automatically at startup. Zellij must also be installed and available on your `PATH`.\n\n## Good fits\n\n- dev servers and watchers\n- REPLs and interactive CLIs\n- SSH or remote sessions\n- commands that ask follow-up questions\n- privileged commands that need human review\n\n## Ask OpenCode like this\n\n```text\nStart the dev server in a visible Zellij pane and wait until it is ready.\n```\n\n```text\nCheck the server pane for errors.\n```\n\n```text\nSend Enter to the interactive pane and show me the latest output.\n```\n\n```text\nOpen a human-reviewed pane for the sudo install step.\n```\n\n```text\nClose the dev server pane.\n```\n\n## Tools\n\n| Tool | Use |\n| --- | --- |\n| `zellij_pty_spawn` | Start a visible Zellij pane. |\n| `zellij_pty_read` | Read recent pane output. |\n| `zellij_pty_write` | Send input to an interactive pane. |\n| `zellij_pty_list` | Show panes known to the plugin. |\n| `zellij_pty_kill` | Close a pane created by the plugin. |\n| `zellij_pty_request_sudo` | Ask the user to review and run privileged commands in Zellij. |\n\n## Human-only work\n\n`zellij_pty_request_sudo` opens a review pane, shows what will run, and waits for the user to type `YES`. The agent cannot type into that pane, so passwords and credentials stay in Zellij instead of entering prompts or tool arguments.\n\n## Configuration\n\nOptional sidecar config files are loaded from `~/.config/opencode/opencode-zellij.config.jsonc` and from `.opencode/opencode-zellij.config.jsonc` in the current project. Project config overrides user config.\n\n```jsonc\n{\n  \"$schema\": \"https://raw.githubusercontent.com/maou-shonen/opencode-zellij/main/opencode-zellij.schema.json\",\n  \"autoUpdate\": true,\n  \"pty\": {\n    \"enabled\": true,\n    \"sudoPane\": \"allow\" // allow, deny, or hide\n  },\n  \"tabTitle\": { \"enabled\": true }\n}\n```\n\nSet `autoUpdate`, `pty.enabled`, or `tabTitle.enabled` to `false` to turn those features off.\n\n## Dynamic tab title\n\nWhen OpenCode runs inside Zellij, the plugin updates the current tab title to show the project, branch, and current OpenCode state:\n\n```text\n🟢 opencode-zellij 🌱 main        # ready\n⚡ opencode-zellij 🌱 main        # agent running\n💬 opencode-zellij 🌱 main        # waiting for user input\n```\n\nThe title is updated best-effort from OpenCode session, question, permission, and branch events.\n\n## Pane cleanup watchdog\n\nWhen the plugin creates a pane, it also starts a small detached Node.js watchdog process for that OpenCode plugin instance. The watchdog keeps a per-instance registry under `$XDG_RUNTIME_DIR/opencode-zellij-*` (or the system temp directory), watches the owning OpenCode process, and closes plugin-created panes if OpenCode exits before normal plugin cleanup can run, such as when leaving with Ctrl-D.\n\nThe watchdog exits automatically after the owner process exits and cleanup is complete. Registries are isolated per OpenCode process and plugin instance.\n\n## Notes\n\n- This is not a sandbox.\n- Session records are in-memory only; restarting OpenCode loses them.\n- Output is rendered Zellij output, not raw PTY bytes.\n- Exit code capture is best-effort for commands started by the plugin.\n- When dynamic tab title is enabled, it may overwrite manual Zellij tab renames on the next OpenCode state change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaou-shonen%2Fopencode-zellij","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaou-shonen%2Fopencode-zellij","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaou-shonen%2Fopencode-zellij/lists"}