Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ghkv

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ghkv

  • 0.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Ghkv

ghkv is a gem (and corresponding CLI tool) to allow for quick and dirty persistence when you really can't be bothered spining up a Redis instance.

Gem

require 'ghkv'

# token will be read from ENV['GHKV_TOKEN'] if not passed in
kv = Ghkv::Ghkv.new repo: 'consumer-data/github_build_notifier', token: '<some hex>'
kv['key'] = { "some" => "hash" }
kv['key'] # => { "some" => "hash" }
kv.keys # => ["some"]
# kv.delete 'key'
kv.save

If your repo is hosted on GitHub enterprise, you can pass in an api_url parameter (e.g. https://git.example.com/api/v3) or put it in ENV['GHKV_API_URL'].

CLI

Tip: Put the following in your ~/.bash_profile for quicker usage:

# ~/.bash_profile
export GHKV_TOKEN=somehexvalue
$ ghkv
Usage:
    ghkv [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
    SUBCOMMAND                    subcommand
    [ARG] ...                     subcommand arguments

Subcommands:
    get                           Get value from KV and print to stdout
    set                           Pass in value to store in KV by parameter or from stdin
    list                          List all keys in KV, one per line
    delete                        Delete key from KV

Options:
    --repo REPO                   Qualified (user/repo) repo name
    --token TOKEN                 GitHub API token (default: $GHKV_TOKEN)
    --api API                     Base URL for enterprise GitHub (default: $GHKV_API_URL)
    -h, --help                    print help

FAQs

Package last updated on 17 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc