Skip to content

zezaeoh/gbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gbox - 📥 use github as storages 📤

Coverage Status Go Report Card

Installation

To download the latest release, run:

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

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:

brew tap zezaeoh/gbox
brew install gbox

Basic Usage

Add storage config

gbox storage add
$ 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

gbox storage list
$ gbox storage list
* gbox-test
* ✓ gbox-storage

active storage is checked

Set active storage

gbox storage set <name>
$ gbox storage set gbox-test
* Storage Configured: gbox-test

# check active storage
$ gbox storage list
* ✓ gbox-test
* gbox-storage

Set data

gbox set <name> <data>
$ gbox set test/my-secret supersupersecret
* Set: test/my-secret

Get data

gbox get <name>
$ gbox get test/my-secret
supersupersecret

Delete data

gbox delete <name>
$ gbox delete test/my-secret
* Delete: test/my-secret

List data

gbox list
$ gbox list
/
├─ test/
│  ├─ sample/
│  │  └─ whoami
│  ├─ test
│  └─ test2
└─ github/
   └─ token/
      ├─ zezaeoh
      └─ zezaeoh2