Module: Rexec

Defined in:
lib/rexec.rb,
lib/rexec/error.rb,
lib/rexec/client.rb,
lib/rexec/version.rb,
lib/rexec/terminal.rb,
lib/rexec/container.rb,
lib/rexec/file_service.rb

Overview

Rexec Ruby SDK - Official SDK for Rexec Terminal as a Service.

Examples:

Basic usage

client = Rexec::Client.new("https://your-instance.com", "your-token")

container = client.containers.create(image: "ubuntu:24.04")
puts "Created: #{container.id}"

terminal = client.terminal.connect(container.id)
terminal.write("echo hello\n")
terminal.on_data { |data| puts data }

client.containers.delete(container.id)

Defined Under Namespace

Classes: APIError, AuthError, Client, ConnectionError, Container, ContainerService, Error, FileInfo, FileService, NotFoundError, Terminal, TerminalClosedError, TerminalService

Constant Summary collapse

VERSION =
"1.0.1"

Class Method Summary collapse

Class Method Details

.new(base_url, token, **options) ⇒ Rexec::Client

Create a new Rexec client.

Parameters:

  • base_url (String)

    Base URL of your Rexec instance

  • token (String)

    API token for authentication

Returns:



31
32
33
# File 'lib/rexec.rb', line 31

def new(base_url, token, **options)
  Client.new(base_url, token, **options)
end