app.go 667 B

1234567891011121314151617181920212223242526272829
  1. // Package cmd provides the ntfy CLI application
  2. package cmd
  3. import (
  4. "github.com/urfave/cli/v2"
  5. "os"
  6. )
  7. const (
  8. categoryClient = "Client commands"
  9. categoryServer = "Server commands"
  10. )
  11. var commands = make([]*cli.Command, 0)
  12. // New creates a new CLI application
  13. func New() *cli.App {
  14. return &cli.App{
  15. Name: "ntfy",
  16. Usage: "Simple pub-sub notification service",
  17. UsageText: "ntfy [OPTION..]",
  18. HideVersion: true,
  19. UseShortOptionHandling: true,
  20. Reader: os.Stdin,
  21. Writer: os.Stdout,
  22. ErrWriter: os.Stderr,
  23. Commands: commands,
  24. }
  25. }