Socket
Socket
Sign inDemoInstall

linebotcli

Package Overview
Dependencies
3
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    linebotcli

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


Version published
Weekly downloads
1
Maintainers
1
Install size
549 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 03 Jul 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc