{"id":13509097,"url":"https://github.com/koki-develop/clive","last_synced_at":"2025-05-16T05:06:03.296Z","repository":{"id":62616836,"uuid":"560164357","full_name":"koki-develop/clive","owner":"koki-develop","description":"⚡ Automates terminal operations.","archived":false,"fork":false,"pushed_at":"2025-05-08T12:24:08.000Z","size":6019,"stargazers_count":358,"open_issues_count":16,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-08T13:31:32.765Z","etag":null,"topics":["cli","golang","terminal"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koki-develop.png","metadata":{"files":{"readme":"README.ja.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-10-31T21:49:17.000Z","updated_at":"2025-04-28T22:46:32.000Z","dependencies_parsed_at":"2023-02-18T08:45:57.683Z","dependency_job_id":"afb1082a-3b24-4370-96f7-a1f9d4313f96","html_url":"https://github.com/koki-develop/clive","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koki-develop%2Fclive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koki-develop%2Fclive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koki-develop%2Fclive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koki-develop%2Fclive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koki-develop","download_url":"https://codeload.github.com/koki-develop/clive/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471061,"owners_count":22076585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","golang","terminal"],"created_at":"2024-08-01T02:01:02.882Z","updated_at":"2025-05-16T05:05:58.277Z","avatar_url":"https://github.com/koki-develop.png","language":"Go","readme":"\u003cp align='center'\u003e\n\u003cimg src=\"./assets/logo_light.svg#gh-light-mode-only\" /\u003e\n\u003cimg src=\"./assets/logo_dark.svg#gh-dark-mode-only\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nAutomates terminal operations.\n\u003c/p\u003e\n\n\u003cp align='center'\u003e\n\u003ca href=\"https://github.com/koki-develop/clive/releases/latest\"\u003e\u003cimg alt=\"GitHub release (latest by date)\" src=\"https://img.shields.io/github/v/release/koki-develop/clive?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/koki-develop/clive/releases/latest\"\u003e\u003cimg alt=\"GitHub all releases\" src=\"https://img.shields.io/github/downloads/koki-develop/clive/total?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"./LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/koki-develop/clive?style=flat\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/koki-develop/clive/actions/workflows/ci.yml\"\u003e\u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/koki-develop/clive/ci.yml?branch=main\u0026logo=github\u0026style=flat\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://codeclimate.com/github/koki-develop/clive/maintainability\"\u003e\u003cimg alt=\"Code Climate maintainability\" src=\"https://img.shields.io/codeclimate/maintainability/koki-develop/clive?logo=codeclimate\u0026style=flat\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://goreportcard.com/report/github.com/koki-develop/clive\"\u003e\u003cimg alt=\"Go Report Card\" src=\"https://goreportcard.com/badge/github.com/koki-develop/clive\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://codecov.io/github/koki-develop/clive\"\u003e\u003cimg alt=\"Codecov\" src=\"https://img.shields.io/codecov/c/github/koki-develop/clive?logo=codecov\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n![](./examples/demo/demo.gif)\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"./README.md\"\u003eEnglish\u003c/a\u003e | 日本語\n\u003c/p\u003e\n\n# cLive\n\n- [前提条件](#information_source-前提条件)\n- [インストール](#zap-インストール)\n- [基本的な使い方](#beginner-基本的な使い方)\n- [コマンド](#rocket-コマンド)\n  - [`init`](#clive-init)\n  - [`start`](#clive-start)\n  - [`validate`](#clive-validate)\n  - [`completion`](#clive-completion)\n- [設定](#gear-設定)\n  - [`actions`](#actions)\n  - [`settings`](#settings)\n- [サンプル](#book-サンプル)\n- [ライセンス](#memo-ライセンス)\n\n## :information_source: 前提条件\n\ncLive は事前に [ttyd](https://tsl0922.github.io/ttyd/) ( バージョン `1.7.4` 以上 ) がインストールされている必要があります。  \n例えば homebrew を使用している場合、 `brew install` でインストールすることができます。\n\n```sh\n$ brew install ttyd\n```\n\nそれ以外のインストール方法については [ttyd のドキュメント](https://github.com/tsl0922/ttyd#installation)を参照してください。\n\n## :zap: インストール\n\n\u003e [!NOTE]\n\u003e cLive を使用するには前提条件があります。詳しくは [`前提条件`](#information_source-前提条件) を参照してください。\n\n### Homebrew\n\n```sh\n$ brew install clive\n```\n\n### Homebrew Tap\n\n```sh\n$ brew install koki-develop/tap/clive\n```\n\n### `go install`\n\n```sh\n$ go install github.com/koki-develop/clive@latest\n```\n\n### Releases\n\n[Releases ページ](https://github.com/koki-develop/clive/releases/latest)からバイナリをダウンロードしてください。\n\n## :beginner: 基本的な使い方\n\nまず `clive init` を実行します。\n\n```sh\n$ clive init\nCreated ./clive.yml\n```\n\nすると、 `clive.yml` という名前で次のような内容のファイルが作成されます。\n\n```yaml\n# documentation: https://github.com/koki-develop/clive#settings\nsettings:\n  loginCommand: [\"bash\", \"--login\"]\n  fontSize: 22\n  defaultSpeed: 10\n\n# documentation: https://github.com/koki-develop/clive#actions\nactions:\n  - pause\n  - type: echo 'Welcome to cLive!'\n  - key: enter\n```\n\n最後に `clive start` を実行するとブラウザが立ち上がり、 cLive が開始されます。\n\n```sh\n$ clive start\n```\n\n## :rocket: コマンド\n\n- [`init`](#clive-init) - 設定ファイルを作成します。\n- [`start`](#clive-start) - 設定ファイルを読み込み、 cLive を開始します。\n- [`validate`](#clive-validate) - 設定ファイルの構文を検証します。\n- [`completion`](#clive-completion) - 指定されたシェルの自動補完スクリプトを生成します。\n\n### `clive init`\n\n設定ファイルを作成します。\n\n```sh\n$ clive init\n```\n\n| フラグ           | デフォルト    | 説明             |\n| ---------------- | ------------- | ---------------- |\n| `-c`, `--config` | `./clive.yml` | 設定ファイル名。 |\n\n### `clive start`\n\n設定ファイルを読み込み、 cLive を開始します。\n設定ファイルについては[`設定`](#gear-設定)を参照してください。\n\n```sh\n$ clive start\n```\n\n| フラグ           | デフォルト    | 説明             |\n| ---------------- | ------------- | ---------------- |\n| `-c`, `--config` | `./clive.yml` | 設定ファイル名。 |\n\n### `clive validate`\n\n設定ファイルを検証します。\n\n```sh\n$ clive validate\n```\n\n| Flag             | Default       | Description      |\n| ---------------- | ------------- | ---------------- |\n| `-c`, `--config` | `./clive.yml` | 設定ファイル名。 |\n\n### `clive completion`\n\n指定されたシェルの自動補完スクリプトを生成します。  \n生成されたスクリプトの使い方についてはヘルプを参照してください。\n\n```sh\n$ clive completion \u003cshell\u003e\n\n# e.g.\n$ clive completion bash\n$ clive completion bash --help\n```\n\nサポートしているシェル:\n\n- bash\n- fish\n- powershell\n- zsh\n\n## :gear: 設定\n\n設定ファイルは `actions` と `settings` で構成されます。\n\n- [`actions`](#actions) - 実行するアクションのリスト。\n- [`settings`](#settings) - 基本的な設定 (フォントサイズ、デフォルトの速度など) 。\n\n### `actions`\n\n実行するアクションです。  \n有効なアクション:\n\n- [`type`](#type) - 文字を入力します。\n- [`key`](#key) - 特殊キーを入力します。\n- [`ctrl`](#ctrl) - Ctrl キーを他のキーと一緒に入力します。\n- [`sleep`](#sleep) - 指定した時間スリープします。\n- [`pause`](#pause) - アクションを一時停止します。\n- [`screenshot`](#screenshot) - スクリーンショットを撮影します。\n\n#### `type`\n\n文字を入力します。\n\n| フィールド | 必須    | デフォルト | 説明                           |\n| ---------- | ------- | ---------- | ------------------------------ |\n| `type`     | **Yes** | N/A        | 入力する文字。                 |\n| `count`    | No      | `1`        | アクションを繰り返す回数。     |\n| `speed`    | No      | `10`       | キーを入力する間隔 (ミリ秒) 。 |\n\n```yaml\n# e.g.\nactions:\n  - type: echo 'Hello World'\n    count: 10 # Optional\n    speed: 100 # Optional\n```\n\n#### `key`\n\n特殊キーを入力します。  \n使用できるキー:\n\n- `esc`\n- `backspace`\n- `tab`\n- `enter`\n- `left`\n- `up`\n- `right`\n- `down`\n- `space`\n\n| フィールド | 必須    | デフォルト | 説明                           |\n| ---------- | ------- | ---------- | ------------------------------ |\n| `key`      | **Yes** | N/A        | 入力するキー。                 |\n| `count`    | No      | `1`        | アクションを繰り返す回数。     |\n| `speed`    | No      | `10`       | キーを入力する間隔 (ミリ秒) 。 |\n\n```yaml\n# e.g.\nactions:\n  - key: enter\n    count: 10 # Optional\n    speed: 100 # Optional\n```\n\n#### `ctrl`\n\nCtrl キーを他のキーと一緒に入力する。\n\n| フィールド | 必須    | デフォルト | 説明                            |\n| ---------- | ------- | ---------- | ------------------------------- |\n| `ctrl`     | **Yes** | N/A        | Ctrl キーと一緒に入力するキー。 |\n| `count`    | No      | `1`        | アクションを繰り返す回数。      |\n| `speed`    | No      | `10`       | キーを入力する間隔 (ミリ秒) 。  |\n\n```yaml\n# e.g.\nactions:\n  - ctrl: c # Ctrl+c\n    count: 10 # Optional\n    speed: 100 # Optional\n```\n\n#### `sleep`\n\n指定した時間スリープします。\n\n| フィールド | 必須    | デフォルト | 説明                         |\n| ---------- | ------- | ---------- | ---------------------------- |\n| `sleep`    | **Yes** | N/A        | スリープする時間 (ミリ秒) 。 |\n\n```yaml\n# e.g.\nactions:\n  - sleep: 3000 # 3 秒間スリープする\n```\n\n#### `pause`\n\nアクションを一時停止します。  \nエンターキーを入力して再開します。\n\n```yaml\n# e.g.\nactions:\n  - pause\n```\n\n#### `screenshot`\n\nスクリーンショットを撮影します。  \n撮影したスクリーンショットは `screenshots/` に保存されます.  \nスクリーンショットを保存するディレクトリは [`settings.screenshotsDir`](#screenshotsdir) で変更することができます。\n\n| Field        | Required | Default                               | Description                      |\n| ------------ | -------- | ------------------------------------- | -------------------------------- |\n| `screenshot` | No       | `\u003cACTION_INDEX\u003e_\u003cyyyymmddHHMMSS\u003e.png` | スクリーンショットのファイル名。 |\n\n```yaml\n# e.g.\nactions:\n  - screenshot\n  - screenshot: foobar.png # Optional\n```\n\n### `settings`\n\n基本的な設定です。  \n設定できる項目:\n\n- [`loginCommand`](#logincommand) - ログインコマンドと引数。\n- [`fontSize`](#fontsize) - フォントサイズ。\n- [`fontFamily`](#fontfamily) - フォントファミリー。\n- [`defaultSpeed`](#defaultspeed) - デフォルトの入力速度。\n- [`skipPauseBeforeQuit`](#skippausebeforequit) - 終了前の一時停止をスキップするかどうか。\n- [`screenshotsDir`](#screenshotsdir) - スクリーンショットを保存するディレクトリ。\n- [`browserBin`](#browserbin) - ブラウザの実行可能なバイナリへのパス。\n- [`headless`](#headless) - ブラウザをヘッドレスモードで動作させるかどうか。\n- [`width`](#width) - ウィンドウの幅。\n- [`height`](#height) - ウィンドウの高さ。\n\n#### `loginCommand`\n\nシェルへのログインコマンドと引数を設定します。  \nデフォルト: `[\"bash\", \"--login\"]`.\n\n```yaml\n# e.g.\nsettings:\n  loginCommand: [\"zsh\", \"--login\"]\n```\n\n#### `fontSize`\n\nフォントサイズを設定します。  \nデフォルト: `22`\n\n```yaml\n# e.g.\nsettings:\n  fontSize: 36\n```\n\n#### `fontFamily`\n\nフォントファミリーを設定します。\n\n```yaml\n# e.g.\nsettings:\n  fontFamily: monospace\n```\n\n#### `defaultSpeed`\n\nデフォルトの入力速度を設定します (ミリ秒) 。  \nデフォルト: `10`\n\n```yaml\n# e.g.\nsettings:\n  defaultSpeed: 100\n```\n\n#### `skipPauseBeforeQuit`\n\n終了前の一時停止をスキップするかどうか。  \nデフォルト: `false`\n\n```yaml\n# e.g.\nsettings:\n  skipPauseBeforeQuit: true\n```\n\n#### `screenshotsDir`\n\nスクリーンショットを保存するディレクトリ。  \nデフォルト: `screenshots`\n\n```yaml\n# e.g.\nsettings:\n  screenshotsDir: path/to/pictures\n```\n\n#### `browserBin`\n\nブラウザの実行可能なバイナリへのパスを設定します。  \nサポートしているブラウザについては [go-rod のドキュメント](https://github.com/go-rod/go-rod.github.io/blob/master/compatibility.md#supported-browsers) を参照してください。\n\n```yaml\n# e.g.\nsettings:\n  browserBin: /Applications/Sidekick.app/Contents/MacOS/Sidekick # Sidekick を使う\n```\n\n#### `headless`\n\nブラウザをヘッドレスモードで動作させるかどうか。  \nデフォルト: `false`\n\n```yaml\n# e.g.\nsettings:\n  headless: true\n```\n\n#### `width`\n\nウィンドウの幅。\n\n```yaml\n# e.g.\nsettings:\n  width: 1600\n```\n\n#### `height`\n\nウィンドウの高さ。\n\n```yaml\n# e.g.\nsettings:\n  height: 800\n```\n\n## :book: サンプル\n\nそれ以外のサンプルについては [`examples/`](./examples/) ディレクトリを参照してください。\n\n## :coffee: Buy me a coffee\n\nもしこのプロジェクトが気に入ったら、是非コーヒーをおごってください。\n\n\u003ca href=\"https://www.buymeacoffee.com/koki.sato\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" width=\"217px\" height=\"60px\"\u003e\u003c/a\u003e\n\n## :memo: ライセンス\n\n[MIT License](./LICENSE)\n","funding_links":["https://www.buymeacoffee.com/koki.sato"],"categories":["Go","Applications","cli"],"sub_categories":["System Management"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoki-develop%2Fclive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoki-develop%2Fclive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoki-develop%2Fclive/lists"}