termcast
Record and replay interactive terminal sessions
Installation
dagger install github.com/shykes/daggerverse/termcast@v0.3.0
Entrypoint
Return Type
Termcast !
Arguments
Name | Type | Description |
---|---|---|
width | Integer | No description provided |
height | Integer | No description provided |
key | Secret | No description provided |
container | Container | No description provided |
shell | [String ! ] | No description provided |
prompt | String | No description provided |
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
func (m *myModule) example() *Termcast {
return dag.
Termcast()
}
@function
def example() -> dag.Termcast:
return (
dag.termcast()
)
@func()
example(): Termcast {
return dag
.termcast()
}
Types
Termcast 🔗
height() 🔗
Return Type
Integer !
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
height
func (m *myModule) example(ctx context.Context) int {
return dag.
Termcast().
Height(ctx)
}
@function
async def example() -> int:
return await (
dag.termcast()
.height()
)
@func()
async example(): Promise<number> {
return dag
.termcast()
.height()
}
width() 🔗
Return Type
Integer !
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
width
func (m *myModule) example(ctx context.Context) int {
return dag.
Termcast().
Width(ctx)
}
@function
async def example() -> int:
return await (
dag.termcast()
.width()
)
@func()
async example(): Promise<number> {
return dag
.termcast()
.width()
}
clock() 🔗
Time elapsed since beginning of the session, in milliseconds
Return Type
Integer !
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
clock
func (m *myModule) example(ctx context.Context) int {
return dag.
Termcast().
Clock(ctx)
}
@function
async def example() -> int:
return await (
dag.termcast()
.clock()
)
@func()
async example(): Promise<number> {
return dag
.termcast()
.clock()
}
container() 🔗
The containerized environment where commands are executed See Exec()
Return Type
Container !
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
container
func (m *myModule) example() *Container {
return dag.
Termcast().
Container()
}
@function
def example() -> dagger.Container:
return (
dag.termcast()
.container()
)
@func()
example(): Container {
return dag
.termcast()
.container()
}
print() 🔗
Return Type
Termcast !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
data | String ! | - | No description provided |
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
print --data string
func (m *myModule) example(data string) *Termcast {
return dag.
Termcast().
Print(data)
}
@function
def example(data: str) -> dag.Termcast:
return (
dag.termcast()
.print(data)
)
@func()
example(data: string): Termcast {
return dag
.termcast()
.print(data)
}
append() 🔗
Return Type
Termcast !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
other | Termcast ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'
func (m *myModule) example(other *Termcast) *Termcast {
return dag.
Termcast().
Append(other)
}
@function
def example(other: dag.Termcast) -> dag.Termcast:
return (
dag.termcast()
.append(other)
)
@func()
example(other: Termcast): Termcast {
return dag
.termcast()
.append(other)
}
waitRandom() 🔗
Return Type
Termcast !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
min | Integer ! | - | No description provided |
max | Integer ! | - | No description provided |
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
wait-random --min integer --max integer
func (m *myModule) example(min int, max int) *Termcast {
return dag.
Termcast().
WaitRandom(min, max)
}
@function
def example(min: int, max: int) -> dag.Termcast:
return (
dag.termcast()
.wait_random(min, max)
)
@func()
example(min: number, max: number): Termcast {
return dag
.termcast()
.waitRandom(min, max)
}
wait() 🔗
Return Type
Termcast !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
ms | Integer ! | - | No description provided |
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
wait --ms integer
func (m *myModule) example(ms int) *Termcast {
return dag.
Termcast().
Wait(ms)
}
@function
def example(ms: int) -> dag.Termcast:
return (
dag.termcast()
.wait(ms)
)
@func()
example(ms: number): Termcast {
return dag
.termcast()
.wait(ms)
}
exec() 🔗
Record the execution of a (real) command in an interactive shell
Return Type
Termcast !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
cmd | String ! | - | No description provided |
delay | Integer ! | 100 | No description provided |
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
exec --cmd string --delay integer
func (m *myModule) example(cmd string, delay int) *Termcast {
return dag.
Termcast().
Exec(cmd, delay)
}
@function
def example(cmd: str, delay: int) -> dag.Termcast:
return (
dag.termcast()
.exec(cmd, delay)
)
@func()
example(cmd: string, delay: number): Termcast {
return dag
.termcast()
.exec(cmd, delay)
}
keystrokes() 🔗
Simulate a human typing text
Return Type
Termcast !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
data | String ! | - | No description provided |
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
keystrokes --data string
func (m *myModule) example(data string) *Termcast {
return dag.
Termcast().
Keystrokes(data)
}
@function
def example(data: str) -> dag.Termcast:
return (
dag.termcast()
.keystrokes(data)
)
@func()
example(data: string): Termcast {
return dag
.termcast()
.keystrokes(data)
}
keystroke() 🔗
+private Simulate a human entering a single keystroke
Return Type
Termcast !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
data | String ! | - | No description provided |
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
keystroke --data string
func (m *myModule) example(data string) *Termcast {
return dag.
Termcast().
Keystroke(data)
}
@function
def example(data: str) -> dag.Termcast:
return (
dag.termcast()
.keystroke(data)
)
@func()
example(data: string): Termcast {
return dag
.termcast()
.keystroke(data)
}
enter() 🔗
Simulate pressing the enter key
Return Type
Termcast !
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
enter
func (m *myModule) example() *Termcast {
return dag.
Termcast().
Enter()
}
@function
def example() -> dag.Termcast:
return (
dag.termcast()
.enter()
)
@func()
example(): Termcast {
return dag
.termcast()
.enter()
}
backspace() 🔗
Simulate pressing the backspace key
Return Type
Termcast !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
repeat | Integer ! | 1 | No description provided |
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
backspace --repeat integer
func (m *myModule) example(repeat int) *Termcast {
return dag.
Termcast().
Backspace(repeat)
}
@function
def example(repeat: int) -> dag.Termcast:
return (
dag.termcast()
.backspace(repeat)
)
@func()
example(repeat: number): Termcast {
return dag
.termcast()
.backspace(repeat)
}
encode() 🔗
Return Type
String !
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
encode
func (m *myModule) example(ctx context.Context) string {
return dag.
Termcast().
Encode(ctx)
}
@function
async def example() -> str:
return await (
dag.termcast()
.encode()
)
@func()
async example(): Promise<string> {
return dag
.termcast()
.encode()
}
castfile() 🔗
Return Type
File !
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
castfile
func (m *myModule) example() *File {
return dag.
Termcast().
Castfile()
}
@function
def example() -> dagger.File:
return (
dag.termcast()
.castfile()
)
@func()
example(): File {
return dag
.termcast()
.castfile()
}
play() 🔗
Return Type
Terminal !
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
play
func (m *myModule) example() *Terminal {
return dag.
Termcast().
Play()
}
@function
def example() -> dag.Terminal:
return (
dag.termcast()
.play()
)
@func()
example(): Terminal {
return dag
.termcast()
.play()
}
demo() 🔗
Return Type
Termcast !
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
demo
func (m *myModule) example() *Termcast {
return dag.
Termcast().
Demo()
}
@function
def example() -> dag.Termcast:
return (
dag.termcast()
.demo()
)
@func()
example(): Termcast {
return dag
.termcast()
.demo()
}
gif() 🔗
Return Type
File !
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
gif
func (m *myModule) example() *File {
return dag.
Termcast().
Gif()
}
@function
def example() -> dagger.File:
return (
dag.termcast()
.gif()
)
@func()
example(): File {
return dag
.termcast()
.gif()
}
decode() 🔗
Return Type
Termcast !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
data | String ! | - | No description provided |
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
decode --data string
func (m *myModule) example(data string) *Termcast {
return dag.
Termcast().
Decode(data)
}
@function
def example(data: str) -> dag.Termcast:
return (
dag.termcast()
.decode(data)
)
@func()
example(data: string): Termcast {
return dag
.termcast()
.decode(data)
}
imagine() 🔗
Return Type
Termcast !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
prompt | String ! | "surprise me! an epic interactive session with a shell, language repl or database repl of your choice. the more exotic the better. Not python!" | No description provided |
Example
dagger -m github.com/shykes/daggerverse/termcast@c0de67835ea8a65556db2638cf3f71babd810196 call \
imagine --prompt string
func (m *myModule) example(prompt string) *Termcast {
return dag.
Termcast().
Imagine(prompt)
}
@function
def example(prompt: str) -> dag.Termcast:
return (
dag.termcast()
.imagine(prompt)
)
@func()
example(prompt: string): Termcast {
return dag
.termcast()
.imagine(prompt)
}