/
main.go
57 lines (52 loc) · 1.1 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package main
import (
"os"
"github.com/oleiade/trousseau/internal/trousseau"
"github.com/urfave/cli"
)
func main() {
app := cli.NewApp()
app.Name = "trousseau"
app.Author = "oleiade"
app.Email = "tcrevon@gmail.com"
app.Usage = "Create, manage and share an encrypted data store"
app.Version = trousseau.TROUSSEAU_VERSION
app.Commands = []cli.Command{
CreateCommand(),
SetCommand(),
GetCommand(),
RenameCommand(),
DelCommand(),
KeysCommand(),
ShowCommand(),
ExportCommand(),
ImportCommand(),
PushCommand(),
PullCommand(),
ListRecipientsCommand(),
AddRecipientCommand(),
RemoveRecipientCommand(),
MetaCommand(),
UpgradeCommand(),
}
app.Flags = []cli.Flag{
cli.BoolFlag{
Name: "verbose",
Usage: "Set trousseau in verbose mode",
},
cli.StringFlag{
Name: "store, s",
Usage: "Path to the trousseau data store to use",
},
cli.StringFlag{
Name: "gnupg-home",
Usage: "Provide an alternate gnupg home",
},
cli.BoolFlag{
Name: "ask-passphrase",
Usage: "Have trousseu prompt user for passphrase",
},
}
app.Before = Before
app.Run(os.Args)
}