• Stars
    star
    313
  • Rank 132,949 (Top 3 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 2 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⚡ Automates terminal operations.

Automates terminal operations.

GitHub release (latest by date) GitHub all releases GitHub Workflow Status Code Climate maintainability Go Report Card Codecov

English | æ—ĨæœŦčĒž

cLive

ℹī¸ Prerequisite

cLive requires ttyd (version 1.7.0 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.

⚡ Installation

Note There are prerequisites for using cLive. See Prerequisite for details.

Homebrew

$ brew install clive

Homebrew Tap

$ brew install koki-develop/tap/clive

go install

$ go install github.com/koki-develop/clive@latest

Releases

Download the binary from the releases page.

🔰 Getting Started

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

🚀 Commands

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 init

Create a config file.

$ clive init
Flag Default Description
-c, --config ./clive.yml Config file name.

clive start

Start cLive actions. See Configuration for the config file.

$ clive start
Flag Default Description
-c, --config ./clive.yml Config file name.

clive validate

Validate a config file.

$ clive validate
Flag Default Description
-c, --config ./clive.yml Config file name.

clive completion

Generate 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:

  • bash
  • fish
  • powershell
  • zsh

⚙ī¸ Configuration

The config file consists of actions and settings.

  • actions - Actions to run.
  • settings - Basic settings (font size, default speed, etc.) .

actions

Actions 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.

type

Type 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

key

Enter special keys.
Available keys:

  • esc
  • backspace
  • tab
  • enter
  • left
  • up
  • right
  • down
  • space
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

ctrl

Press 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

sleep

Sleep 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.

pause

Pause actions.
Press enter to continue.

# e.g.
actions:
  - pause

screenshot

Take 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

settings

Basic settings.
Available settings:

loginCommand

Login command and args.
Default: ["bash", "--login"].

# e.g.
settings:
  loginCommand: ["zsh", "--login"]

fontSize

Font size.
Default: 22

# e.g.
settings:
  fontSize: 36

fontFamily

Font family.

# e.g.
settings:
  fontFamily: monospace

defaultSpeed

Default interval between key typing.
Default: 10

# e.g.
settings:
  defaultSpeed: 100

skipPauseBeforeQuit

Whether to skip pausing before quitting.
Default: false

# e.g.
settings:
  skipPauseBeforeQuit: true

screenshotsDir

Directory to save screenshots.
Default: screenshots

# e.g.
settings:
  screenshotsDir: path/to/pictures

browserBin

Path to an executable browser binary.
See the go-rod documentation for supported browsers.

# e.g.
settings:
  browserBin: /Applications/Sidekick.app/Contents/MacOS/Sidekick # use Sidekick

headless

Whether to run the browser in headless mode.
Default: false

# e.g.
settings:
  headless: true

width

Window width.

# e.g.
settings:
  width: 1600

height

Window height.

# e.g.
settings:
  height: 800

📖 Examples

For more examples see the examples/ directory.

📝 License

MIT License

More Repositories

1

gat

🐱 cat alternative written in Go.
Go
209
star
2

qiita-lgtm-ranking

Qiita ぎいいねナãƒŗキãƒŗã‚°č¨˜äē‹ã‚’毎æ—Ĩč‡Ēå‹•æ›´æ–°ã™ã‚‹ã‚ˇã‚šãƒ†ãƒ ã€‚
Go
70
star
3

sheep

🐑 Sleep with Sheep.
Go
58
star
4

gh-grass

🍀 Grow github grass to console.
Go
43
star
5

go-fzf

🔍 Fuzzy Finder CLI and Library.
Go
42
star
6

badge-generator

🏅 ã‚ˇãƒŗプãƒĢãĒバッジį”Ÿæˆã‚ĩãƒŧビ゚。
TypeScript
33
star
7

qiita-ranking

👑 Qiita ぎナãƒŗキãƒŗã‚°č¨˜äē‹ã‚’č‡Ēå‹•æ›´æ–°ã™ã‚‹ã‚ˇã‚šãƒ†ãƒ ã€‚
Go
31
star
8

xbar-plugin-github

An xbar plugin to display GitHub Pull Requests and notifications.
JavaScript
30
star
9

gogogo

バックエãƒŗドãƒģフロãƒŗトエãƒŗドãƒģイãƒŗフナãƒģ CI/CD を Go で書いたã‚ĩãƒŗプãƒĢ Web ã‚ĸプãƒĒã‚ąãƒŧã‚ˇãƒ§ãƒŗ。
Go
20
star
10

typingo

⌨ī¸ Typing game written in Go
Go
18
star
11

lgtmgen

đŸ–ŧī¸ LGTM Generator
Go
17
star
12

lgtm-generator

TypeScript
15
star
13

docker-tags

đŸŗ Command line tool to get a list of tags for docker images.
Go
13
star
14

mingo

Go also wants to be minified.
Go
13
star
15

gotrash

🗑ī¸ rm alternative written in Go.
Go
11
star
16

askai

🤖 AI is with you.
Go
11
star
17

kansai

💭 kansAI is a CLI tool for converting text to Kansai dialect.
Go
8
star
18

slp

💤 sleep command with rich progress bar.
Go
5
star
19

gh-q

📂 gh extension to manage GitHub repositories like `ghq`
Go
4
star
20

hub-purge-action

🧹 Action to clear GitHub image caches.
JavaScript
4
star
21

xbar-plugins

xbar ぎプナグイãƒŗ。č‡Ē分į”¨ã€‚
Go
3
star
22

cloudfront-oac-with-terraform-example

CloudFront から S3 へぎã‚ĸクã‚ģã‚šåˆļåžĄãĢ OAC を刊į”¨ã™ã‚‹ Terraform ぎã‚ĩãƒŗプãƒĢã‚ŗãƒŧド
HCL
3
star
23

bsky-tech-trending-bot

æŠ€čĄ“ãĢé–ĸするトãƒŦãƒŗドニãƒĨãƒŧã‚šã‚’æĩã™ Bluesky ボット。
TypeScript
3
star
24

gh-actions-oidc-example

GitHub Actions で OIDC をäŊŋį”¨ã™ã‚‹ã‚ĩãƒŗプãƒĢã‚ŗãƒŧド
HCL
3
star
25

ego

đŸ“Ŗ echo alternative written in Go.
Go
2
star
26

v-spinner

🌀 A library for V to display customizable spinners on the command line.
V
2
star
27

xvert

↔ī¸ Convert between JSON, YAML, TOML, and various other formats.
Ruby
2
star
28

thredot-roadmap

thredot.org roadmap
2
star
29

aws-masking

đŸ•ļī¸ Enhance your security by auto-hiding sensitive information on AWS Management Console.
TypeScript
2
star
30

tailwindcss-tooltip-example

Tailwind CSS でツãƒŧãƒĢチップをäŊœæˆã™ã‚‹ã‚ĩãƒŗプãƒĢã‚ŗãƒŧド。
TypeScript
2
star
31

alexa-skill-gpt

Alexa Skill Powered by GPT
JavaScript
2
star
32

homebrew-tap

my homebrew tap đŸē
Ruby
1
star
33

koki-develop.github.io

Koki Sato
TypeScript
1
star
34

aws-monitoring

AWS ãƒĒã‚Ŋãƒŧ゚ぎãƒĸニã‚ŋãƒĒãƒŗグé–ĸé€ŖäŊœæˆį”¨ Terraform ã‚ŗãƒŧド。
HCL
1
star
35

todoist-cli

CLI Client for Todoist.
Go
1
star
36

koki-develop

1
star
37

ogp-messenger

OGP į”ģåƒã§ãƒĄãƒƒã‚ģãƒŧジをį™ēäŋĄã§ãã‚‹ãƒ„ãƒŧãƒĢ。
TypeScript
1
star
38

checkip

📍 Simple REST API that returns the client's IP address.
HCL
1
star
39

todoist-go

Go client library for Todoist REST API.
Go
1
star
40

tf-import-example

HCL
1
star
41

ecr-retag-image-example

ecr-retag-image-example
Shell
1
star
42

hello-cli

Hello, CLI
Go
1
star
43

terraform-on-codebuild-example

AWS CodeBuild 上で terraform ã‚’åŽŸčĄŒã™ã‚‹ã‚ĩãƒŗプãƒĢã‚ŗãƒŧド。
HCL
1
star
44

go-cli-template

Go CLI Application Template
Go
1
star
45

chipichapa

Go
1
star
46

my-feeds

č‡Ē分į”¨
TypeScript
1
star
47

litetodo

Go
1
star
48

ollamit

A command-line tool to generate commit messages with ollama.
Go
1
star
49

ts-action-template

This is a template for creating GitHub Actions in TypeScript.
TypeScript
1
star
50

terraform-provider-js

(WIP) Next-generation AltJS
Go
1
star