Project

keg

0.0
No release in over 3 years
Low commit activity in last 3 years
Keg use the data formatted by TOML which is language that easy to read. Keg read a TOML file from the local database and outputs its useful format. You need to clone the repository has the TOML file in the local database (`$HOME/.keg/databases`) in advance.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
 Project Readme

Keg Circle CI

Keg is CLI tool that supports a data management.

Description

Keg use the data formatted by TOML which is language that easy to read. Keg read a TOML file from the local database and outputs its useful format. You need to clone the repository has the TOML file in the local database ($HOME/.keg/databases) in advance.

VS. glean

glean constructs a cache in local from a specific remote repository. In contrast, Keg mainly works with the database was constructed in local. Therefore, you need to pull manually when the repository has updated. However, it run at high speed by using the data in local.

Requirements

Ruby 2.0 higher

Installation

Add this line to your application's Gemfile:

gem 'keg'

Or install it yourself as:

$ gem install keg

Usage

Preparations:

Makes a TOML file:

# example.toml
name = 'example'
email = 'example@example.com'

Push this TOML file to git:

$ git add example.toml
$ git commit -m 'add example'
$ git push origin master

Constructs databases:

$ mkdir -p $HOME/.keg/databases
$ cd $HOME/.keg/databases 
$ git clone <your_repo> example_database

Demo:

Select a database from databases in local ($HOME/.keg/databases):

$ keg switch example_database   #=> switch database `example_database`

Format and show the TOML file which is requested in the database:

$ keg show example               # show $HOME/.keg/databases/example_database/example.toml
$ keg show --format=json example # show in json format
$ keg show --format=yaml example # show in yaml format

Show the current database:

$ keg current                    #=> example_database

Format and show all TOML files in the database:

$ keg show_all                   # show all TOML file in example_database
$ keg show_all --format=json     # show all in json format
$ keg show_all --format=yaml     # show all in yaml format

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/bm-sms/keg. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.