Skip to content

moshcode TUI shell + /agents <engine> passthrough sessions - #4

Merged
ralyodio merged 1 commit into
mainfrom
feat/agents-tui
Jul 10, 2026
Merged

moshcode TUI shell + /agents <engine> passthrough sessions#4
ralyodio merged 1 commit into
mainfrom
feat/agents-tui

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

What

Adds the two things missing from the CLI: running moshcode with no args now opens a metal TUI, and you can open a session on any engine with full stdin/stdout/stderr passthrough via /agents <engine>.

$ moshcode
  ███╗   ███╗ ██████╗ ███████╗██╗  ██╗
  ...
  engines  — open one with /agents <name>
   ● opencode  installed
   ● claude    installed
   ● codex     installed
   ○ gemini    not installed — /install gemini
   ○ aider     not installed — /install aider

mosh ▸ /agents claude      ← hands the terminal to claude; exit it to come back

Shell commands

command what
/agents list engines + install status
/agents <engine> open a passthrough session (claude · codex · gemini · aider · opencode)
/install <engine> install an engine
/run <file.mosh> run moshscript
/help · /quit help / leave (Ctrl-D)

A bare engine name is a shortcut; moshcode <engine> [args…] opens a session directly.

Details

  • moshcode stays a conductor — sessions are spawn(bin, args, { stdio: 'inherit' }), so the engine's own TUI/prompts/colors pass straight through; control returns to the pit on exit.
  • Adds gemini + aider to the registry (alongside opencode/claude/codex).
  • New src/engines.mjs helpers: resolveEngine, isInstalled, engineStatus, openSession. New src/ui.mjs (banner/palette) and src/tui.mjs (the shell). Existing run/install/commands/interpreter untouched.

Verified (local)

  • moshcode agents lists all 5 with install status
  • moshcode opencode --version1.14.18 (real passthrough, exit 0)
  • bare moshcode → TUI banner + engine list + mosh ▸ prompt; /agents, /quit work
  • existing moshcode run examples/alive.mosh --max 2 still works

🤖 Generated with Claude Code

Running `moshcode` with no args now opens a metal TUI (banner + live engine
list + prompt). From there:
  /agents            list engines
  /agents <engine>   open a session with full stdin/stdout/stderr passthrough —
                     the engine's own CLI owns the terminal; exit it to return
  /install <engine>  install an engine
  /run <file.mosh>   run moshscript
A bare engine name is a shortcut, and `moshcode <engine> [args…]` opens a
session directly from the shell.

- src/engines.mjs: add gemini + aider; add resolveEngine / isInstalled /
  engineStatus / openSession (stdio-inherit passthrough)
- src/ui.mjs: metal banner + acid-lime palette
- src/tui.mjs: the interactive shell
- bin/moshcode.mjs: no-arg → TUI; `moshcode <engine>` direct passthrough;
  `moshcode agents` shows install status

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@ralyodio
ralyodio merged commit d81d7dc into main Jul 10, 2026
1 check passed
@ralyodio
ralyodio deleted the feat/agents-tui branch July 10, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant