0.0.11 • Published 3 years ago

linebotcli v0.0.11

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

line bot cli

LINE BOTの設定などをCLIでやれるツールを作ってみてるよ〜

インストールの仕方

$ npm i -g linebotcli

使い方

Webhook URLの変更

$ linebotcli webhook -t <LINE BOTのアクセストークン> -u <エンドポイントにしたいURL>

これでエンドポイントが変わるよ〜

ngrokでサーバーを起動してURLの変更

  • 基本
$ linebotcli ngrok <PORT> -t <LINE BOTのアクセストークン>

利用例

$ linebotcli ngrok 3000 -t xxxxxxxxxxxxxxxxx
  • パス指定

--pathor-pでパスを指定できます。指定しないと/webhookになります。

$ linebotcli ngrok <PORT> -t <LINE BOTのアクセストークン> -p <パス>

利用例

$ linebotcli ngrok 5000 -t xxxxxxxxxxxxxxxxx -p /webhook

linebotcli ngrokは、別途ngrokを内部でインストール(npx ngrokwrapper)して実行しています。

パッケージにngrokをそのままインクルードすると、Node.jsがインストールされているPCやフォルダのパーミッションによってエラーが発生する場合があるのでngrokを別インストールとしています。

こういった理由で、linebotcli ngrokのコマンドだけ利用できない環境があるかもしれません。

LINE Botの情報を取得

$ linebotcli info -t xxxxxxxxxxxxxxxxx

ライブコーディングで作ったよ

https://www.youtube.com/watch?v=DjopYxdjhjU

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago