Skip to main content

Module stdio

Module stdio 

Source
Expand description

Standard I/O (stdin/stdout/stderr) server implementation.

Platform: Unix/Linux/macOS only. NetGet itself becomes the child process behind a pipe (someprogram | netget ... | otherprogram): it reads from its own stdin, hands each chunk to the LLM as a stdio_input_received event, and the model decides what to emit on stdout/stderr.

§Coexistence (the subtlety)

This protocol takes over the process’s real stdin/stdout, so it is fundamentally incompatible with two run modes and refuses to start under either:

  • the interactive TUI — ratatui owns the terminal; detected via stdin being a TTY.
  • --mcp stdio — JSON-RPC owns stdin/stdout; detected via the process argv.

It is intended for headless / one-shot piped use (prog | netget --non-interactive '...' | prog) or under --mcp-http, where stdin is a pipe and tracing logs go to stderr. Only one stdio server may run per process (an AtomicBool claim). See CLAUDE.md for the caveat that the non-interactive status stream currently shares stdout.

Modules§

actions
Standard I/O (stdin/stdout/stderr) protocol actions implementation.

Structs§

StdioServer
Standard I/O server.