Shell-free access to the installed T3 command line interface, using Exile.

run/2 collects bounded output; stream/3 delivers {:t3_cli, runner, {:data, binary}}, then either {:t3_cli, runner, {:exit, result}} or {:t3_cli, runner, {:error, error}}. Long-running servers can use stream/3 with an appropriate finite timeout. Cancelling kills the directly invoked executable; detached grandchildren are not managed. Requires Linux or macOS and a C toolchain to build Exile's native code. Pipes support stdin and EOF; arbitrary inherited descriptors (such as --bootstrap-fd) and terminal/PTY-only interaction are not provided. CLI capabilities vary by installed version. No command is executed by construction.

cli = T3.CLI.new()
T3.CLI.run(cli, ["thread", "send", thread_id, "-"], input: "Review these changes")

{:ok, runner} = T3.CLI.stream(cli, ["thread", "send", thread_id, "-"])
:ok = T3.CLI.write(runner, "Review these changes")
:ok = T3.CLI.close_stdin(runner)
# Receive {:t3_cli, runner, {:data, bytes}}, then {:exit, result} / {:error, error}.

Summary

Functions

Run the t3 app command family. Requires support in the installed T3 version.

Run the t3 auth command family. Requires support in the installed T3 version.

Run the t3 browser command family. Requires support in the installed T3 version.

Stop a streaming invocation.

Close stdin while continuing to read output (EOF for commands reading -).

Discover commands actually advertised by this installed version's help.

Run the t3 connect command family. Requires support in the installed T3 version.

Run the t3 doctor command family. Requires support in the installed T3 version.

Known command families; commands/2 discovers the installed executable's actual support.

Read top-level or subcommand help without invoking the operation.

Configure the executable, working directory, environment, deadline and output limit.

Return the OS process ID, or an error with code :process_exited if it already exited.

Run the t3 pair command family. Requires support in the installed T3 version.

Run the t3 project command family. Requires support in the installed T3 version.

Run T3 with literal arguments. Optional :input iodata is written then stdin closes; default input is empty.

Run the t3 serve command family. Requires support in the installed T3 version.

Run the t3 service command family. Requires support in the installed T3 version.

Run the t3 start command family. Requires support in the installed T3 version.

Start a linked runner; :owner defaults to caller. Stdin stays open unless :input is supplied.

Run the t3 theme command family. Requires support in the installed T3 version.

Run the t3 thread command family. Requires support in the installed T3 version.

Run the t3 trace command family. Requires support in the installed T3 version.

Run the t3 triage command family. Requires support in the installed T3 version.

Run the t3 uninstall command family. Requires support in the installed T3 version.

Run the t3 update command family. Requires support in the installed T3 version.

Read version output without modifying T3.

Write iodata to the streaming command's stdin.

Types

t()

@type t() :: %T3.CLI{
  cwd: term(),
  env: term(),
  executable: term(),
  max_output_bytes: term(),
  timeout: term()
}

Functions

app(client, arguments \\ [])

Run the t3 app command family. Requires support in the installed T3 version.

auth(client, arguments \\ [])

Run the t3 auth command family. Requires support in the installed T3 version.

browser(client, arguments \\ [])

Run the t3 browser command family. Requires support in the installed T3 version.

cancel(pid)

Stop a streaming invocation.

close_stdin(pid)

Close stdin while continuing to read output (EOF for commands reading -).

commands(client \\ new(), command \\ [])

Discover commands actually advertised by this installed version's help.

connect(client, arguments \\ [])

Run the t3 connect command family. Requires support in the installed T3 version.

doctor(client, arguments \\ [])

Run the t3 doctor command family. Requires support in the installed T3 version.

families()

Known command families; commands/2 discovers the installed executable's actual support.

help(client \\ new(), command \\ [])

Read top-level or subcommand help without invoking the operation.

new(opts \\ [])

Configure the executable, working directory, environment, deadline and output limit.

os_pid(pid)

Return the OS process ID, or an error with code :process_exited if it already exited.

pair(client, arguments \\ [])

Run the t3 pair command family. Requires support in the installed T3 version.

project(client, arguments \\ [])

Run the t3 project command family. Requires support in the installed T3 version.

run(client, args, opts \\ [])

Run T3 with literal arguments. Optional :input iodata is written then stdin closes; default input is empty.

serve(client, arguments \\ [])

Run the t3 serve command family. Requires support in the installed T3 version.

service(client, arguments \\ [])

Run the t3 service command family. Requires support in the installed T3 version.

start(client, arguments \\ [])

Run the t3 start command family. Requires support in the installed T3 version.

stream(client, args, opts \\ [])

Start a linked runner; :owner defaults to caller. Stdin stays open unless :input is supplied.

theme(client, arguments \\ [])

Run the t3 theme command family. Requires support in the installed T3 version.

thread(client, arguments \\ [])

Run the t3 thread command family. Requires support in the installed T3 version.

trace(client, arguments \\ [])

Run the t3 trace command family. Requires support in the installed T3 version.

triage(client, arguments \\ [])

Run the t3 triage command family. Requires support in the installed T3 version.

uninstall(client, arguments \\ [])

Run the t3 uninstall command family. Requires support in the installed T3 version.

update(client, arguments \\ [])

Run the t3 update command family. Requires support in the installed T3 version.

version(client \\ new())

Read version output without modifying T3.

write(pid, data)

Write iodata to the streaming command's stdin.