Development
The CLI is written in Kotlin and cross compilable into Java. We choose Kotlin because we plan to release library in most languages that's compilable from C such as Python, Rust, Golang etc.
Jar¶
# build jar
./gradlew build
# give permission to run the jar
chmod +x ./lib/build/libs/lib-cli.jar
# use jar as keyper CLI
java -jar ./lib/build/libs/lib-cli.jar key -h
# or wrap it into keyper
alias keyper="java -jar ./lib/build/libs/lib-cli.jar"
# try
keyper -h
# Usage: keyper [<options>] <command> [<args>]...
# Keyper is a suite of key manage APIs to simplify key creation, management, encryption/decryption in
# standardized and secured way. For more information, visit: https://jarrid.xyz
# Options:
# -h, --help Show this message and exit
# Commands:
# key Key module allow you to create, update, delete and list keys. For more information, visit:
# https://jarrid.xyz
# deploy Deploy module implements Terraform Cloud Development Kit underneath. It scans existing key
# configs generated by key module and programmatically construct terraform provider, modules and
# resources accordingly. For more information, visit: https://jarrid.xyz
# data Data module to encrypt and decrypt data. For more information, visit: https://jarrid.xyz
Docker¶
We've also built a docker image where we've packaged everything you need for you and you can use it as a CLI directly.
If you'd like to build and test it out locally:
Otherwise, to run CLI commands:
Note, if you get permission denied, try to log out from ghcr.io first:
Run the packaged CLI directly from docker:
# create key
docker run -it --rm --name keyper-cli \
-v ./configs:/home/keyper/configs \
-v ./cdktf.out:/home/keyper/cdktf.out \
ghcr.io/jarrid-xyz/keyper:v0.0.4 resource create -t key
# run plan
docker run -it --rm --name keyper-cli \
-v ./configs:/home/keyper/configs \
-v ./cdktf.out:/home/keyper/cdktf.out \
-v ./.cdktf-sa-key.json:/home/keyper/gcp.json \
-v ./app.local.yaml:/home/keyper/app.local.yaml
ghcr.io/jarrid-xyz/keyper:v0.0.4 deploy plan
Published Docker Image¶
If you don't wish to build your own, you can pull our latest docker images are published on GitHub{:target=_ blank}.