zezaeoh / gbox

:inbox_tray: use github as storage :outbox_tray:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

:inbox_tray: use github as storage :outbox_tray:

License:MIT License


Languages

Language:Go 99.6%Language:Makefile 0.4%