tkcli

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

README

Turnkey CLI

Building the CLI

We use GoReleaser to build and release our binaries.

To build locally:

$ goreleaser release --snapshot --rm-dist

To release:

$ git tag -a vx.y.z -m "New Release: x.y.z"
$ git push origin vx.y.z
$ goreleaser release

Installing the CLI

brew tap tkhq/taps
brew install tk

Usage

Create a new API key:

./build/tk gen --name rno
Creating /Users/rno/.tk/rno.public
Creating /Users/rno/.tk/rno.private

Sign a request:

./build/tk approve-request --method POST --path /api/v1/sign --body '{"payload": "hello from TKHQ"}' --key=rno
Raw signature: 3046022100a99781a6b1d7ff7c4ce3951ded09a7757c74f1c6d7c7e1a2e617ac2921d74674022100f75d167abe426eb8f89884afe5e864cb965c6370611566f50b46690209b3a95b
Approval header: X-Approved-By-035acbc8b7751b7703736ae16cb22112451372f7b77717bbecdfa8300d4038432: 3046022100a99781a6b1d7ff7c4ce3951ded09a7757c74f1c6d7c7e1a2e617ac2921d74674022100f75d167abe426eb8f89884afe5e864cb965c6370611566f50b46690209b3a95b
--------
To make this request with curl:
        curl -X POST -d {"payload": "hello from TKHQ"} -H'X-Approved-By-035acbc8b7751b7703736ae16cb22112451372f7b77717bbecdfa8300d4038432: 3046022100a99781a6b1d7ff7c4ce3951ded09a7757c74f1c6d7c7e1a2e617ac2921d74674022100f75d167abe426eb8f89884afe5e864cb965c6370611566f50b46690209b3a95b' -v 'https://api.turnkey.io/api/v1/sign'
--------

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
src module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL