Automates terminal operations.

cLive requires ttyd (version 1.7.4 or higher) to be installed.
For example, if you are using homebrew, you can install it with brew install.
$ brew install ttyd
See the ttyd documentation for more information.
[!NOTE] There are prerequisites for using cLive. See
Prerequisitefor details.
$ brew install koki-develop/tap/clive
$ brew install clive
go install$ go install github.com/koki-develop/clive@latest
Download the binary from the releases page.
First, run clive init.
$ clive init
Created ./clive.yml
A file named clive.yml will then be created with the following contents:
# documentation: https://github.com/koki-develop/clive#settings
settings:
loginCommand: ["bash", "--login"]
fontSize: 22
defaultSpeed: 10
# documentation: https://github.com/koki-develop/clive#actions
actions:
- pause
- type: echo 'Welcome to cLive!'
- key: enter
Finally, run clive start to launch the browser and start cLive.
$ clive start
Available commands:
init - Create a config file.start - Start cLive actions.validate - Validate a config file.completion - Generate the autocompletion script for the specified shell.clive initCreate a config file.
$ clive init
| Flag | Default | Description |
|---|---|---|
-c, --config | ./clive.yml | Config file name. |
clive startStart cLive actions.
See Configuration for the config file.
$ clive start
| Flag | Default | Description |
|---|---|---|
-c, --config | ./clive.yml | Config file name. |
clive validateValidate a config file.
$ clive validate
| Flag | Default | Description |
|---|---|---|
-c, --config | ./clive.yml | Config file name. |
clive completionGenerate the autocompletion script for clive for the specified shell.
See each sub-command's help for details on how to use the generated script.
$ clive completion <shell>
# e.g.
$ clive completion bash
$ clive completion bash --help
Available shells:
The config file consists of actions and settings.
settingsBasic settings.
Available settings:
loginCommand - Login command and args.fontSize - Font size.fontFamily - Font family.defaultSpeed - Default interval between key typing.skipPauseBeforeQuit - Whether to skip pausing before quitting.screenshotsDir - Directory to save screenshots.browserBin - Path to an executable browser binary.headless - Whether to run the browser in headless mode.width - Window width.height - Window height.loginCommandLogin command and args.
Default: ["bash", "--login"].
# e.g.
settings:
loginCommand: ["zsh", "--login"]
fontSizeFont size.
Default: 22
# e.g.
settings:
fontSize: 36
fontFamilyFont family.
# e.g.
settings:
fontFamily: monospace
defaultSpeedDefault interval between key typing.
Default: 10
# e.g.
settings:
defaultSpeed: 100
skipPauseBeforeQuitWhether to skip pausing before quitting.
Default: false
# e.g.
settings:
skipPauseBeforeQuit: true
screenshotsDirDirectory to save screenshots.
Default: screenshots
# e.g.
settings:
screenshotsDir: path/to/pictures
browserBinPath to an executable browser binary.
See the go-rod documentation for supported browsers.
# e.g.
settings:
browserBin: /Applications/Vivaldi.app/Contents/MacOS/Vivaldi # use Vivaldi
headlessWhether to run the browser in headless mode.
Default: false
# e.g.
settings:
headless: true
widthWindow width.
# e.g.
settings:
width: 1600
heightWindow height.
# e.g.
settings:
height: 800
actionsActions to run.
Available actions:
type - Type characters.key - Enter special keys.ctrl - Press the Ctrl key with other keys.sleep - Sleep for a specified number of milliseconds.pause - Pause actions.screenshot - Take a screenshot.typeType characters.
| Field | Required | Default | Description |
|---|---|---|---|
type | Yes | N/A | Characters to type. |
count | No | 1 | Number of times to repeat the action. |
speed | No | 10 | Interval between key typing (milliseconds). |
# e.g.
actions:
- type: echo 'Hello World'
count: 10 # Optional
speed: 100 # Optional
keyEnter special keys.
Available keys:
escbackspacetabenterleftuprightdownspace| Field | Required | Default | Description |
|---|---|---|---|
key | Yes | N/A | Special key to type. |
count | No | 1 | Number of times to repeat the action. |
speed | No | 10 | Interval between key typing (milliseconds). |
# e.g.
actions:
- key: enter
count: 10 # Optional
speed: 100 # Optional
ctrlPress the Ctrl key with other keys.
| Field | Required | Default | Description |
|---|---|---|---|
ctrl | Yes | N/A | Characters to enter with the ctrl key. |
count | No | 1 | Number of times to repeat the action. |
speed | No | 10 | Interval between key typing (milliseconds). |
# e.g.
actions:
- ctrl: c # Ctrl+c
count: 10 # Optional
speed: 100 # Optional
sleepSleep for a specified number of milliseconds.
| Field | Required | Default | Description |
|---|---|---|---|
sleep | Yes | N/A | Time to sleep (milliseconds). |
# e.g.
actions:
- sleep: 3000 # Sleep for 3 seconds.
pausePause actions.
Press enter to continue.
# e.g.
actions:
- pause
screenshotTake a screenshot.
Screenshots are saved in screenshots/.
The directory to save the screenshots can be changed in settings.screenshotsDir.
| Field | Required | Default | Description |
|---|---|---|---|
screenshot | No | <ACTION_INDEX>_<yyyymmddHHMMSS>.png | File name of the screenshot. |
# e.g.
actions:
- screenshot
- screenshot: foobar.png # Optional
For more examples see the examples/ directory.
If you like this project, please consider buying me a coffee.
Go
99.6%
Automates terminal operations.

cLive requires ttyd (version 1.7.4 or higher) to be installed.
For example, if you are using homebrew, you can install it with brew install.
$ brew install ttyd
See the ttyd documentation for more information.
[!NOTE] There are prerequisites for using cLive. See
Prerequisitefor details.
$ brew install koki-develop/tap/clive
$ brew install clive
go install$ go install github.com/koki-develop/clive@latest
Download the binary from the releases page.
First, run clive init.
$ clive init
Created ./clive.yml
A file named clive.yml will then be created with the following contents:
# documentation: https://github.com/koki-develop/clive#settings
settings:
loginCommand: ["bash", "--login"]
fontSize: 22
defaultSpeed: 10
# documentation: https://github.com/koki-develop/clive#actions
actions:
- pause
- type: echo 'Welcome to cLive!'
- key: enter
Finally, run clive start to launch the browser and start cLive.
$ clive start
Available commands:
init - Create a config file.start - Start cLive actions.validate - Validate a config file.completion - Generate the autocompletion script for the specified shell.clive initCreate a config file.
$ clive init
| Flag | Default | Description |
|---|---|---|
-c, --config | ./clive.yml | Config file name. |
clive startStart cLive actions.
See Configuration for the config file.
$ clive start
| Flag | Default | Description |
|---|---|---|
-c, --config | ./clive.yml | Config file name. |
clive validateValidate a config file.
$ clive validate
| Flag | Default | Description |
|---|---|---|
-c, --config | ./clive.yml | Config file name. |
clive completionGenerate the autocompletion script for clive for the specified shell.
See each sub-command's help for details on how to use the generated script.
$ clive completion <shell>
# e.g.
$ clive completion bash
$ clive completion bash --help
Available shells:
The config file consists of actions and settings.
settingsBasic settings.
Available settings:
loginCommand - Login command and args.fontSize - Font size.fontFamily - Font family.defaultSpeed - Default interval between key typing.skipPauseBeforeQuit - Whether to skip pausing before quitting.screenshotsDir - Directory to save screenshots.browserBin - Path to an executable browser binary.headless - Whether to run the browser in headless mode.width - Window width.height - Window height.loginCommandLogin command and args.
Default: ["bash", "--login"].
# e.g.
settings:
loginCommand: ["zsh", "--login"]
fontSizeFont size.
Default: 22
# e.g.
settings:
fontSize: 36
fontFamilyFont family.
# e.g.
settings:
fontFamily: monospace
defaultSpeedDefault interval between key typing.
Default: 10
# e.g.
settings:
defaultSpeed: 100
skipPauseBeforeQuitWhether to skip pausing before quitting.
Default: false
# e.g.
settings:
skipPauseBeforeQuit: true
screenshotsDirDirectory to save screenshots.
Default: screenshots
# e.g.
settings:
screenshotsDir: path/to/pictures
browserBinPath to an executable browser binary.
See the go-rod documentation for supported browsers.
# e.g.
settings:
browserBin: /Applications/Vivaldi.app/Contents/MacOS/Vivaldi # use Vivaldi
headlessWhether to run the browser in headless mode.
Default: false
# e.g.
settings:
headless: true
widthWindow width.
# e.g.
settings:
width: 1600
heightWindow height.
# e.g.
settings:
height: 800
actionsActions to run.
Available actions:
type - Type characters.key - Enter special keys.ctrl - Press the Ctrl key with other keys.sleep - Sleep for a specified number of milliseconds.pause - Pause actions.screenshot - Take a screenshot.typeType characters.
| Field | Required | Default | Description |
|---|---|---|---|
type | Yes | N/A | Characters to type. |
count | No | 1 | Number of times to repeat the action. |
speed | No | 10 | Interval between key typing (milliseconds). |
# e.g.
actions:
- type: echo 'Hello World'
count: 10 # Optional
speed: 100 # Optional
keyEnter special keys.
Available keys:
escbackspacetabenterleftuprightdownspace| Field | Required | Default | Description |
|---|---|---|---|
key | Yes | N/A | Special key to type. |
count | No | 1 | Number of times to repeat the action. |
speed | No | 10 | Interval between key typing (milliseconds). |
# e.g.
actions:
- key: enter
count: 10 # Optional
speed: 100 # Optional
ctrlPress the Ctrl key with other keys.
| Field | Required | Default | Description |
|---|---|---|---|
ctrl | Yes | N/A | Characters to enter with the ctrl key. |
count | No | 1 | Number of times to repeat the action. |
speed | No | 10 | Interval between key typing (milliseconds). |
# e.g.
actions:
- ctrl: c # Ctrl+c
count: 10 # Optional
speed: 100 # Optional
sleepSleep for a specified number of milliseconds.
| Field | Required | Default | Description |
|---|---|---|---|
sleep | Yes | N/A | Time to sleep (milliseconds). |
# e.g.
actions:
- sleep: 3000 # Sleep for 3 seconds.
pausePause actions.
Press enter to continue.
# e.g.
actions:
- pause
screenshotTake a screenshot.
Screenshots are saved in screenshots/.
The directory to save the screenshots can be changed in settings.screenshotsDir.
| Field | Required | Default | Description |
|---|---|---|---|
screenshot | No | <ACTION_INDEX>_<yyyymmddHHMMSS>.png | File name of the screenshot. |
# e.g.
actions:
- screenshot
- screenshot: foobar.png # Optional
For more examples see the examples/ directory.
If you like this project, please consider buying me a coffee.
Go
99.6%