-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
584c608
commit 1f97ad3
Showing
10 changed files
with
234 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
`q-cli`は、[traQ](https://github.com/traQ)のWebhook機能を使ってtraQにテキストメッセージを送信するためのCLIツールです。 | ||
|
||
**このドキュメントはv0.3.0のものです。他のバージョンのドキュメントを確認したい場合は、GitHubの過去のリリースもしくは[「以前のバージョンのドキュメント」ページ](versions)を確認してください。** | ||
**このドキュメントはv0.4.0のものです。他のバージョンのドキュメントを確認したい場合は、GitHubの過去のリリースもしくは[「以前のバージョンのドキュメント」ページ](versions)を確認してください。** | ||
|
||
## 各コマンド | ||
|
||
|
@@ -25,7 +25,7 @@ Webhook IDとWebhookシークレットが必要になります。 | |
#### Go | ||
|
||
```sh | ||
go install github.com/ikura-hamu/q-cli@v0.3.0 | ||
go install github.com/ikura-hamu/q-cli@v0.4.0 | ||
``` | ||
|
||
`$GOPATH/bin`以下に`q-cli`という名前でインストールされます。 | ||
|
@@ -36,7 +36,7 @@ go install github.com/ikura-hamu/[email protected] | |
https://github.com/ikura-hamu/q-cli/releases | ||
|
||
```sh | ||
curl -OJL https://github.com/ikura-hamu/q-cli/releases/download/v0.3.0/q-cli_{OS}_{architecture}.(tar.gz|zip) | ||
curl -OJL https://github.com/ikura-hamu/q-cli/releases/download/v0.4.0/q-cli_{OS}_{architecture}.(tar.gz|zip) | ||
``` | ||
|
||
ダウンロードしたら解凍します。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## q config | ||
|
||
config prints the configuration file path and the current configuration of the CLI | ||
|
||
### Synopsis | ||
|
||
configコマンドは、設定ファイルのパスと現在のCLIの設定を表示します。webhook_secretなど、一部の設定はマスクされます。 | ||
|
||
``` | ||
q config [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for config | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
--config string 設定ファイルの場所を指定します。 (デフォルトは $HOME/.q-cli.yaml) | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [q](q.md) - traQ Webhook CLI | ||
|
||
###### Auto generated by spf13/cobra on 15-Dec-2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# `q-cli` | ||
|
||
`q-cli`は、[traQ](https://github.com/traQ)のWebhook機能を使ってtraQにテキストメッセージを送信するためのCLIツールです。 | ||
|
||
**このドキュメントはv0.4.0のものです。他のバージョンのドキュメントを確認したい場合は、GitHubの過去のリリースもしくは[「以前のバージョンのドキュメント」ページ](versions)を確認してください。** | ||
|
||
## 各コマンド | ||
|
||
- [`q`](q.md) | ||
- [`q init`](q_init.md) | ||
|
||
## Preparation | ||
|
||
traQのWebhookをSecure形式で作成してください。 | ||
traPで使用しているtraQインスタンスで使用する場合は、bot-consoleから作成できます。 | ||
Webhook IDとWebhookシークレットが必要になります。 | ||
|
||
## Installation | ||
|
||
1. [ダウンロード](#ダウンロード) | ||
2. [Webhookの設定](#webhookの設定) | ||
|
||
### ダウンロード | ||
|
||
#### Go | ||
|
||
```sh | ||
go install github.com/ikura-hamu/[email protected] | ||
``` | ||
|
||
`$GOPATH/bin`以下に`q-cli`という名前でインストールされます。 | ||
|
||
#### GitHub Release | ||
|
||
リリースページから該当するOS、バージョンのものを探してダウンロードしてください。 | ||
https://github.com/ikura-hamu/q-cli/releases | ||
|
||
```sh | ||
curl -OJL https://github.com/ikura-hamu/q-cli/releases/download/v0.4.0/q-cli_{OS}_{architecture}.(tar.gz|zip) | ||
``` | ||
|
||
ダウンロードしたら解凍します。 | ||
|
||
```sh | ||
tar -zxvf q-cli_{OS}_{architecture}.tar.gz | ||
``` | ||
|
||
や | ||
|
||
```sh | ||
unzip q-cli_{OS}_{architecture}.zip | ||
``` | ||
|
||
など、適切な方法で解凍してください。 | ||
|
||
解凍して出てくる`q`というファイルが実行ファイルです。パスが通る場所に移動させてください。`README.md`が一緒に解凍されますが、削除して問題ありません。 | ||
|
||
### webhookの設定 | ||
|
||
環境変数を用いるか、設定ファイルを配置します。 | ||
|
||
#### 環境変数の場合 | ||
|
||
`Q_WEBHOOK_HOST`: traQのドメイン | ||
`Q_WEBHOOK_ID`: traQのWebhook ID | ||
`Q_WEBHOOK_SECRET`: traQのWebhook シークレット | ||
|
||
#### 設定ファイルを使う場合 | ||
|
||
以下のような`~/.q-cli.yml`を用意します。 | ||
|
||
```json:.q-cli.yml | ||
webhook_host: "{traQのドメイン}" | ||
webhook_id: "{traQのWebhook ID}" | ||
webhook_secret: "{traQのWebhookシークレット}" | ||
channels: | ||
channel: "{チャンネルのUUID}" | ||
``` | ||
|
||
または、 | ||
|
||
```sh | ||
q init | ||
``` | ||
|
||
を実行することで、対話形式で設定を行えます。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
## q | ||
|
||
traQ Webhook CLI | ||
|
||
### Synopsis | ||
|
||
"q-cli" は、traQにWebhookを使ってメッセージを送信するためのCLIツールです。設定に基づいてWebhookを送信します。 | ||
設定は設定ファイルに記述するか、環境変数で指定することができます。 | ||
メッセージは標準入力からも受け取ることができます。 | ||
設定ファイルの場所は、何も指定しない場合、$HOME/.q-cli.yaml です。 | ||
|
||
``` | ||
q [message] [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
``` | ||
q print("Hello, world!") -c -l py | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-C, --channel string チャンネル名を指定して、デフォルト以外のチャンネルにメッセージを送信します。 | ||
チャンネル名は設定ファイルの channels に記述されたキーを指定します。 | ||
-c, --code コードブロック付きでメッセージを送信します。 | ||
--config string 設定ファイルの場所を指定します。 (デフォルトは $HOME/.q-cli.yaml) | ||
-h, --help help for q | ||
-l, --lang string コードブロックの言語を指定します。 | ||
-v, --version Print version information and quit | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [q config](q_config.md) - config prints the configuration file path and the current configuration of the CLI | ||
* [q init](q_init.md) - Initialize the configuration file | ||
|
||
###### Auto generated by spf13/cobra on 15-Dec-2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## q config | ||
|
||
config prints the configuration file path and the current configuration of the CLI | ||
|
||
### Synopsis | ||
|
||
configコマンドは、設定ファイルのパスと現在のCLIの設定を表示します。webhook_secretなど、一部の設定はマスクされます。 | ||
|
||
``` | ||
q config [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for config | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
--config string 設定ファイルの場所を指定します。 (デフォルトは $HOME/.q-cli.yaml) | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [q](q.md) - traQ Webhook CLI | ||
|
||
###### Auto generated by spf13/cobra on 15-Dec-2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
## q init | ||
|
||
Initialize the configuration file | ||
|
||
### Synopsis | ||
|
||
initコマンドは、設定ファイルの値を対話形式で設定することができます。 | ||
|
||
``` | ||
q init [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-f, --force 既存の設定ファイルを上書きします | ||
-h, --help help for init | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
--config string 設定ファイルの場所を指定します。 (デフォルトは $HOME/.q-cli.yaml) | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [q](q.md) - traQ Webhook CLI | ||
|
||
###### Auto generated by spf13/cobra on 15-Dec-2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 以前のバージョンのドキュメント | ||
|
||
|
||
- [v0.2.0](v0.2.0) | ||
|
||
- [v0.2.1](v0.2.1) | ||
|
||
- [v0.2.2](v0.2.2) | ||
|
||
- [v0.2.3](v0.2.3) | ||
|
||
- [v0.3.0](v0.3.0) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,5 @@ | |
|
||
- [v0.2.3](v0.2.3) | ||
|
||
- [v0.3.0](v0.3.0) | ||
|