https://github.com/zezaeoh/gbox
:inbox_tray: use github as storage :outbox_tray:
https://github.com/zezaeoh/gbox
cli gbox go golang secret-management storage
Last synced: 6 months ago
JSON representation
:inbox_tray: use github as storage :outbox_tray:
- Host: GitHub
- URL: https://github.com/zezaeoh/gbox
- Owner: zezaeoh
- License: mit
- Created: 2022-03-20T04:50:06.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-09T08:04:14.000Z (about 4 years ago)
- Last Synced: 2024-06-19T17:50:58.368Z (about 2 years ago)
- Topics: cli, gbox, go, golang, secret-management, storage
- Language: Go
- Homepage:
- Size: 49.8 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `gbox` - :inbox_tray: use github as storages :outbox_tray:
[](https://coveralls.io/github/zezaeoh/gbox?branch=main) [](https://goreportcard.com/report/github.com/zezaeoh/gbox)
## Installation
To download the latest release, run:
```bash
curl --silent --location "https://github.com/zezaeoh/gbox/releases/latest/download/gbox_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/gbox /usr/local/bin
```
For ARM system, please change ARCH (e.g. armv6, armv7 or arm64) accordingly
```bash
curl --silent --location "https://github.com/zezaeoh/gbox/releases/latest/download/gbox_$(uname -s)_arm64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/gbox /usr/local/bin
```
macOS users can use [Homebrew](https://brew.sh):
```bash
brew tap zezaeoh/gbox
brew install gbox
```
## Basic Usage
### Add storage config
```bash
gbox storage add
```
```bash
$ gbox storage add
? Name of storage gbox-test
? Kind of storage github
? Repository URL https://github.com/zezaeoh/gbox-test
? Repository Branch main
? Authentication method none
* Successfully add github storage config: gbox-test
```
after simple survey, storage config will be store in your local path `~/.config/gbox/`
if you want to add private repository, you should add github token to your storage config
### List storage configs
```bash
gbox storage list
```
```bash
$ gbox storage list
* gbox-test
* ✓ gbox-storage
```
active storage is checked
### Set active storage
```bash
gbox storage set
```
```bash
$ gbox storage set gbox-test
* Storage Configured: gbox-test
# check active storage
$ gbox storage list
* ✓ gbox-test
* gbox-storage
```
### Set data
```bash
gbox set
```
```bash
$ gbox set test/my-secret supersupersecret
* Set: test/my-secret
```
### Get data
```bash
gbox get
```
```bash
$ gbox get test/my-secret
supersupersecret
```
### Delete data
```bash
gbox delete
```
```bash
$ gbox delete test/my-secret
* Delete: test/my-secret
```
### List data
```bash
gbox list
```
```bash
$ gbox list
/
├─ test/
│ ├─ sample/
│ │ └─ whoami
│ ├─ test
│ └─ test2
└─ github/
└─ token/
├─ zezaeoh
└─ zezaeoh2
```