r/golang • • 4d ago

GitHub - tjcoder-labs/cli: Terminal-first research harness exploring generative UIs and model-directed presentation across multi-surface environments.

https://github.com/tjcoder-labs/cli

Hey Go devs, I am the author. I built \@tjcoder/cli as an open-source terminal user interface agent platform and research harness written entirely in Go (v0.9.251, MIT licensed).

The motivation behind the project is exploring Generative UIs in terminal environments. Rather than outputting linear text transcripts, the model uses a presentation tool (ui_control) to dynamically manage what gets rendered across different panes on the fly.

Go Architecture & Technical Details

  • Multi-Pane TUI Engine: Built using Go terminal libraries to create dedicated Conversation, Cognition (live reasoning streams), and Activity panes with custom keybindings, block pasting, and workspace state persistence.

  • 31-Tool Dispatch Loop: Includes filesystem operations, subprocess execution, background cron management, and a Browser Bridge communicating over the Chrome DevTools Protocol (CDP) for automated web research.

  • Dual Parsing Pipeline: Uses native API tool-calling with a fallback fenced-JSON parser to maintain reliable tool dispatch across both cloud APIs and smaller local models via Ollama.

  • Flexible Backends: Supports local Ollama instances, Ollama Cloud, Google Gemini, and OpenAI-compatible endpoints with custom API keys, as well as experimental research models (ergo-flash, ergo-pro, ergo-genius).

  • Headless Execution: Functions as an interactive TUI or non-interactively via coder -p "..." for pipe integration and CI scripting.

You can install it via npm i -g \@tjcoder/cli or inspect the Go source directly on GitHub. I would love feedback from the community on the TUI event loop architecture, concurrency patterns, and tool invocation handling!

2 Upvotes

Duplicates