diff --git a/readme.md b/readme.md index 1192b5d..25663bc 100644 --- a/readme.md +++ b/readme.md @@ -6,6 +6,8 @@ - Send whatsapp via http API, [docs/openapi.yml](./docs/openapi.yaml) for more details - Compress image before send - Compress video before send +- Change OS name become your app (this is the app name when connect via mobile) + - `--os=Chrome` or `--os=MyApplication` - Basic Auth - `--basic-auth=kemal:secret`, or you can simplify - `-b=kemal:secret` @@ -15,7 +17,9 @@ - Auto reply message - `--autoreply="Don't reply this message"` - Webhook for received message - - `--webhook="http://yourwebhook.site/handler"` + - `--webhook="http://yourwebhook.site/handler"`, or you can simplify + - `-w="http://yourwebhook.site/handler"` +- For more command `./main --help` ### Required (without docker) diff --git a/src/cmd/root.go b/src/cmd/root.go index 3f4c767..1a6ba6b 100644 --- a/src/cmd/root.go +++ b/src/cmd/root.go @@ -35,6 +35,7 @@ func init() { rootCmd.CompletionOptions.DisableDefaultCmd = true rootCmd.PersistentFlags().StringVarP(&config.AppPort, "port", "p", config.AppPort, "change port number with --port | example: --port=8080") rootCmd.PersistentFlags().BoolVarP(&config.AppDebug, "debug", "d", config.AppDebug, "hide or displaying log with --debug | example: --debug=true") + rootCmd.PersistentFlags().StringVarP(&config.AppOs, "os", "", config.AppOs, `os name --os | example: --os="Chrome"`) rootCmd.PersistentFlags().StringVarP(&config.AppBasicAuthCredential, "basic-auth", "b", config.AppBasicAuthCredential, "basic auth credential | yourUsername:yourPassword") rootCmd.PersistentFlags().StringVarP(&config.WhatsappAutoReplyMessage, "autoreply", "", config.WhatsappAutoReplyMessage, `auto reply when received message --autoreply | example: --autoreply="Don't reply this message"`) rootCmd.PersistentFlags().StringVarP(&config.WhatsappAutoReplyWebhook, "webhook", "w", config.WhatsappAutoReplyMessage, `auto reply when received message --webhook | example: --webhook="https://yourcallback.com/callback"`)