UrbitEx.Terminal (UrbitEx v0.6.4) View Source
Module with functions to interact with herm
, the Urbit virtual terminal.
Subscription to herm will trigger an SSE pipeline outputting the return of every statement.
Error messages are not shown in that channel, instead there is a separate SSE pipeline called slog
.
You can access that by running the slog/1
function.
Link to this section Summary
Functions
Send an arrow keystroke to the terminal.
Takes a Session Struct, a Channel struct and the arrow to send, in atom form (:up
, :down
, :left
or :right
)
Returns an {:ok, %HTTPoison.Response{}} tuple.
Send a backspace to the terminal. Takes a Session Struct and a Channel struct. Returns an {:ok, %HTTPoison.Response{}} tuple.
Send a delete keystroke (deleting the key next to the cursor) to the terminal. Takes a Session Struct and a Channel struct. Returns an {:ok, %HTTPoison.Response{}} tuple.
Sends a |hi
to an Urbit ship. Useful command to troubleshoot network connections (akin to ping in Unix).
Takes a Session Struct, a Channel struct and the Urbit @p to ping.
Returns an {:ok, %HTTPoison.Response{}} tuple.
Send an keystroke with the "control" key pressed, to the terminal. Takes a Session Struct, a Channel struct and the key to send. For what it's worth, a tab is equivalent to CTRL+ "i". It gives a lists of functions in the hoon standard library. Returns an {:ok, %HTTPoison.Response{}} tuple.
Send an enter key stroke to the terminal, running the command in the prompt. Takes a Session Struct and a Channel struct. Returns an {:ok, %HTTPoison.Response{}} tuple.
Sends a string to the terminal. Note this only types the string in, it does not enter the command. Takes a Session Struct, a Channel struct and the string to send. Returns an {:ok, %HTTPoison.Response{}} tuple.
Opens a SSE pipeline to receive unprompted Terminal logs and error messages.
Subscribes to herm
in order to receive SSE events from it.
Takes a Session struct and a Channel struct.
Returns :ok
Link to this section Functions
Send an arrow keystroke to the terminal.
Takes a Session Struct, a Channel struct and the arrow to send, in atom form (:up
, :down
, :left
or :right
)
Returns an {:ok, %HTTPoison.Response{}} tuple.
Send a backspace to the terminal. Takes a Session Struct and a Channel struct. Returns an {:ok, %HTTPoison.Response{}} tuple.
Send a delete keystroke (deleting the key next to the cursor) to the terminal. Takes a Session Struct and a Channel struct. Returns an {:ok, %HTTPoison.Response{}} tuple.
Sends a |hi
to an Urbit ship. Useful command to troubleshoot network connections (akin to ping in Unix).
Takes a Session Struct, a Channel struct and the Urbit @p to ping.
Returns an {:ok, %HTTPoison.Response{}} tuple.
Send an keystroke with the "control" key pressed, to the terminal. Takes a Session Struct, a Channel struct and the key to send. For what it's worth, a tab is equivalent to CTRL+ "i". It gives a lists of functions in the hoon standard library. Returns an {:ok, %HTTPoison.Response{}} tuple.
Send an enter key stroke to the terminal, running the command in the prompt. Takes a Session Struct and a Channel struct. Returns an {:ok, %HTTPoison.Response{}} tuple.
Sends a string to the terminal. Note this only types the string in, it does not enter the command. Takes a Session Struct, a Channel struct and the string to send. Returns an {:ok, %HTTPoison.Response{}} tuple.
Opens a SSE pipeline to receive unprompted Terminal logs and error messages.
Subscribes to herm
in order to receive SSE events from it.
Takes a Session struct and a Channel struct.
Returns :ok