{"slug": "show-hn-opencode2-hud", "title": "Show HN: OpenCode2 HUD", "summary": "Developer ndom91 released OpenCode2 HUD, a native TUI plugin for OpenCode 2 that displays a persistent status HUD below the text input, showing project path, branch, context usage, running shell commands, tool activity, and subagent status. The plugin, installable via the plugins array in ~/.config/opencode/cli.json, optionally queries OpenAI's endpoint for Codex 5-hour and weekly usage limits, disabled by default for privacy. It requires Node.js 24+ and is MIT-licensed, with the OpenCode 2 plugin API noted as beta.", "body_md": "OpenCode 2 plugin that displays a persistent status HUD below the text input in the TUI. It is a native TUI plugin, not an assistant-message renderer, so it does not add HUD content to a session transcript.\n\nAdd it to the `plugins`\n\narray in `~/.config/opencode/cli.json`\n\n, for example:\n\n```\n{\n  \"plugins\": [\n    \"@ndom91/opencode-hud\"\n  ]\n}\n```\n\nOpenCode downloads and loads the package. Restart OpenCode after changing the configuration.\n\nWarning\n\nTo show `5h`\n\nand `weekly`\n\nCodex subscription usage, the HUD plugin queries the OpenAI endpoint through\nyour system's Codex authorization. This is disabled by default. See [PRIVACY.md](/ndom91/opencode-hud/blob/main/PRIVACY.md) before\nenabling it with the `codexUsage`\n\npackage option. This is the same mechanism as used by\n[CodexBar](https://github.com/steipete/CodexBar/) and others.\n\nThe default HUD can show the following native TUI data:\n\n- Project path, branch, dirty state, and local change summary.\n- Session context usage, including an amber\n`compaction likely soon`\n\nwarning at 80% usage and the active compaction state. - Up to two running shell commands and the four most recent tool activities.\n- The most recent failed tool for 15 seconds. A new user turn clears the failure row.\n- Up to three running subagents, including elapsed time and their own context percentage.\n- Optional Codex 5-hour and weekly usage limits.\n\nThe default HUD shows all available status rows. Disable individual groups with\npackage options in `~/.config/opencode/cli.json`\n\n:\n\n```\n{\n  \"plugins\": [\n    {\n      \"package\": \"@ndom91/opencode-hud\",\n      \"options\": {\n        \"agents\": false,\n        \"codexUsage\": true,\n        \"compaction\": false,\n        \"context\": true,\n        \"git\": true,\n        \"shell\": true,\n        \"tools\": true\n      }\n    }\n  ]\n}\n```\n\n| Option | Controls |\n|---|---|\n`agents` |\nRunning subagents, elapsed time, and context usage |\n`codexUsage` |\nDisabled by default. Set to `true` to show Codex 5-hour and weekly usage limits. |\n`compaction` |\nActive compaction state and the 80% context warning |\n`context` |\nCurrent session context usage |\n`git` |\nBranch, dirty state, and change summary |\n`shell` |\nRunning shell commands |\n`tools` |\nRecent tool activity and brief tool-failure row |\n\nRequirements:\n\n`opencode2`\n\n- Node.js 24+\n\nInstall dependencies and validate the project:\n\n```\npnpm install\npnpm format\npnpm typecheck\npnpm test\n```\n\nStart OpenCode from this repository:\n\n```\nopencode2 .\n```\n\nOpenCode discovers `.opencode/plugins/tui/status.tsx`\n\nautomatically. Start or\nopen a session to see the HUD under the prompt.\n\nNote\n\nThe OpenCode 2 plugin API is beta and liable to change. Please check [NOTES.md](/ndom91/opencode-hud/blob/main/NOTES.md) and validate\nagainst the installed `@opencode-ai/plugin`\n\nruntime types if making changes.\n\nMIT", "url": "https://wpnews.pro/news/show-hn-opencode2-hud", "canonical_source": "https://github.com/ndom91/opencode-hud", "published_at": "2026-08-30 16:42:03+00:00", "updated_at": "2026-08-30 16:51:51.333080+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["ndom91", "OpenCode 2", "OpenCode2 HUD", "Codex", "OpenAI", "CodexBar"], "alternates": {"html": "https://wpnews.pro/news/show-hn-opencode2-hud", "markdown": "https://wpnews.pro/news/show-hn-opencode2-hud.md", "text": "https://wpnews.pro/news/show-hn-opencode2-hud.txt", "jsonld": "https://wpnews.pro/news/show-hn-opencode2-hud.jsonld"}}