Console
The nyssr.net console is a small command interface for inspecting and controlling a node. It separates command interpretation from the terminal that displays input and output.
Two cooperating components
The console has two parts:
- Console service: receives text, finds the matching command handler, and returns response text
- CLI display target: reads terminal input and prints responses to standard output
Command handlers are targets. They register commands and help texts with the console service. When a command arrives, the service forwards it to the appropriate handler.
Connect to a remote node
The display target does not have to run on the same node as the console service. With:
connect [NodeId]
the local display can connect to a remote node's console service. Commands can then be issued as if the remote node were local.
This is useful when the node runs in a container or behind a firewall and its own terminal is not directly accessible.
Key idea: The console UI is only a client. Command execution can happen on another node in the network.
Why the separation matters
Keeping input, command routing, and output separate provides several benefits:
- Commands can be added as independent handlers
- Help text stays close to the command implementation
- A local terminal can operate a remote node
- Console output can be produced by services on another node
- The same message-based mechanism works inside and outside the node
Typical workflow
- Start a node with its console service
- Use the local CLI display to inspect available commands
- Connect to a remote node when necessary
- Run the command through its registered handler
- Read the response in the local terminal