I’ve been building a terminal-first AI pair-programmer that tries to make every tool call transparent and auditable. It’s a Rust app with a Ratatui UI split into three panes (chat, tool activity, input). The agent loop streams LLM output, queues write-capable Lua scripts for manual approval, and records every run as JSONL logs under .selenai/logs.
Key bits:
Single tool, real guardrails – the LLM only gets a sandboxed Lua VM with explicit helpers (rust.read_file, rust.list_dir, rust.http_request, gated rust.write_file, etc.). Writes stay disabled unless you opt in and then approve each script via /tool run.
Transparent workflow – the chat pane shows the conversation, tool pane shows every invocation + result, and streaming keeps everything responsive. CTRL shortcuts for scrolling, clearing logs, copy mode, etc., so it feels like a normal TUI app.
Pluggable LLMs – there’s a stub client for offline hacking and an OpenAI streaming client behind a trait. Adding more providers should just be another module under src/llm/.
Session history – every exit writes a timestamped log directory with full transcript, tool log, and metadata about whether Lua writes were allowed. Makes demoing, debugging, and sharing repros way easier.
Lua ergonomics – plain io.* APIs and a tiny require(“rust”) module, so the model can write idiomatic scripts without shelling out. There’s even a /lua command if you want to run a snippet manually.
Repo (MIT): https://github.com/Almclean/selenai
Would love feedback on:
Other providers or local models you’d like to see behind the LLM trait.
Additional sandbox helpers that feel safe but unlock useful workflows.
Ideas for replaying those saved sessions (web viewer? CLI diff?).
If you try it, cargo run, type, and you’ll see the ASCII banner + chat panes. Hit me with issues or PRs—there’s a CONTRIBUTING.md in the works and plenty of roadmap items (log viewer, theming, Lua helper packs) if you’re interested.
Comments URL: https://news.ycombinator.com/item?id=45941579
Points: 1
# Comments: 0
Source: github.com