Skip to content

Commit 0ac17fb

Browse files
authored
Merge pull request #19 from ragul28/release/v0.2.x
Release/v0.2.x
2 parents e1e4803 + 867e34c commit 0ac17fb

File tree

82 files changed

+365
-2049
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+365
-2049
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
build:
2-
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w"
2+
go build -ldflags="-s -w"
33

44
install:
55
go install

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ Simple key-value secret Vault inspired by Hasicorp Vault. Project tries to explo
66
* Industry standard aes256-gcm secret encryption.
77
* Easy cli interface.
88

9-
## Basic Usage
9+
## Usage guide
1010

11-
* Download pre-compiled binaries from [release page](https://github.com/ragul28/svault/releases).
11+
* Download pre-compiled binaries from [release page](https://github.com/ragul28/svault/releases/latest).
1212

1313
```sh
14-
tar -xvf svault_linux_arm64.tar.gz
14+
tar -xvf svault_x.x.x_darwin_amd64.tar.gz
1515
chmod +x svault
1616
sudo mv svault /usr/local/bin
1717
```
@@ -26,9 +26,30 @@ svault init
2626
export MASTER_KEY=<master_key>
2727

2828
svault store github_token xxxxxxxx
29+
svault list
2930
svault get github_token
3031
```
3132

33+
## Basic CLI usage
34+
```
35+
Usage:
36+
svault [command]
37+
38+
Available Commands:
39+
completion Generate the autocompletion script for the specified shell
40+
delete Delete secret from vault store
41+
get Get secret from vault store
42+
help Help about any command
43+
init Init vault secret engine
44+
list List stored secret from vault store (Flages: -f, --freshInit)
45+
status Get the status of the vault engine
46+
store Store secret to vault store
47+
48+
Flags:
49+
-h, --help help for get
50+
-m, --masterkey string Pass masterkey as flag
51+
```
52+
3253
## Build Process
3354

3455
Build using go environment.

cmd/kv.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ var getCmd = &cobra.Command{
4848
}
4949

5050
var deleteCmd = &cobra.Command{
51-
Use: "delete",
52-
Short: "Delete secret from vault store",
53-
Args: cobra.MaximumNArgs(1),
51+
Use: "delete",
52+
Aliases: []string{"rm"},
53+
Short: "Delete secret from vault store",
54+
Args: cobra.MaximumNArgs(1),
5455
RunE: func(cmd *cobra.Command, args []string) error {
5556
if len(args) < 1 {
5657
return errors.New("Missing argument key")
@@ -62,9 +63,10 @@ var deleteCmd = &cobra.Command{
6263
}
6364

6465
var listCmd = &cobra.Command{
65-
Use: "list",
66-
Short: "List stored secret from vault store",
67-
Args: cobra.NoArgs,
66+
Use: "list",
67+
Aliases: []string{"ls"},
68+
Short: "List stored secret from vault store",
69+
Args: cobra.NoArgs,
6870
Run: func(cmd *cobra.Command, args []string) {
6971
vault.ListVault()
7072
},

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ require (
1010
require (
1111
github.com/inconshreveable/mousetrap v1.1.0 // indirect
1212
github.com/spf13/pflag v1.0.5 // indirect
13-
golang.org/x/sys v0.11.0 // indirect
13+
golang.org/x/sys v0.13.0 // indirect
1414
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
88
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
99
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
1010
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
11-
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
12-
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
11+
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
12+
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1313
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
1414
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

vault/vault.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func ReadVault(encryptKey []byte, Key string) {
4242
err = json.Unmarshal(val, &vd)
4343
if err != nil {
4444
fmt.Printf("%s not found in svault!\n", Key)
45-
// log.Fatal(err)
45+
os.Exit(0)
4646
}
4747
if len(vd.EnctyptData) < 1 {
4848
fmt.Printf("%s not found in svault!\n", Key)

vendor/golang.org/x/sys/unix/mkerrors.sh

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/ptrace_darwin.go

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/ptrace_ios.go

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/syscall_aix.go

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/syscall_darwin.go

Lines changed: 0 additions & 186 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)