2021-10-24 04:29:45 +03:00
|
|
|
// Package cmd provides the ntfy CLI application
|
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/urfave/cli/v2"
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
2022-01-23 09:00:38 +03:00
|
|
|
const (
|
2022-01-23 23:30:30 +03:00
|
|
|
categoryClient = "Client commands"
|
|
|
|
categoryServer = "Server commands"
|
2022-01-23 09:00:38 +03:00
|
|
|
)
|
|
|
|
|
2022-05-09 18:03:40 +03:00
|
|
|
var commands = make([]*cli.Command, 0)
|
|
|
|
|
2021-10-24 04:29:45 +03:00
|
|
|
// New creates a new CLI application
|
|
|
|
func New() *cli.App {
|
|
|
|
return &cli.App{
|
|
|
|
Name: "ntfy",
|
|
|
|
Usage: "Simple pub-sub notification service",
|
|
|
|
UsageText: "ntfy [OPTION..]",
|
|
|
|
HideVersion: true,
|
|
|
|
UseShortOptionHandling: true,
|
|
|
|
Reader: os.Stdin,
|
|
|
|
Writer: os.Stdout,
|
|
|
|
ErrWriter: os.Stderr,
|
2022-05-09 18:03:40 +03:00
|
|
|
Commands: commands,
|
2021-10-24 04:29:45 +03:00
|
|
|
}
|
|
|
|
}
|