Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emdneto/otsgo
A simple CLI and API client for One-Time Secret
https://github.com/emdneto/otsgo
golang onetimesecret ots secrets
Last synced: 1 day ago
JSON representation
A simple CLI and API client for One-Time Secret
- Host: GitHub
- URL: https://github.com/emdneto/otsgo
- Owner: emdneto
- License: apache-2.0
- Created: 2021-12-22T12:35:19.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-08T01:32:17.000Z (8 months ago)
- Last Synced: 2024-06-20T22:36:42.379Z (5 months ago)
- Topics: golang, onetimesecret, ots, secrets
- Language: Go
- Homepage: https://webi.sh/ots
- Size: 90.8 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OTS Go client
otsgo is a simple CLI and API client for [One-Time Secret](https://onetimesecret.com/) written in Go.
## Features
* Get system status
* Authentication
* Share, generate, get and burn Secrets as well as retrieve it's metadata# Quickstart
## Getting otsgo from Webinstall
```
curl -sS https://webi.sh/ots | sh
```## Getting otsgo from go install
```
$ go install github.com/emdneto/otsgo@latest
```## Getting otsgo from binary
You may download otsgo binary from the [latest releases on Github](https://github.com/emdneto/otsgo/releases/latest).# Using otsgo CLI
## Overview
```
$ ots -h
A simple CLI and API client for One-Time SecretUsage:
ots [flags]
ots [command]Available Commands:
burn Burn a secret that has not been read yet
completion generate the autocompletion script for the specified shell
get Get secret, metadata or recent
help Help about any command
login Perform basic http auth and store credentials
share Share or generate a random secret
status Current status of the systemFlags:
--config string config file (default is $HOME/.otsgo.yaml)
-h, --help help for ots
-t, --toggle Help message for toggle
-v, --version Displays current versionUse "ots [command] --help" for more information about a command.
```### Show OTS status
```
$ ots statusSTATUS TIMESTAMP
nominal 1709507672
```## Share Secrets
```
$ ots share -h
Share or generate a random secretUsage:
ots share [flags]Flags:
-f, --from-stdin Read from stdin
-g, --generate Generate a short, unique secret. This is useful for temporary passwords, one-time pads, salts, etc.
-h, --help help for share
-p, --passphrase string a string that the recipient must know to view the secret. This value is also used to encrypt the secret and is bcrypted before being stored so we only have this value in transit.
-r, --recipient string an email address. We will send a friendly email containing the secret link (NOT the secret itself).
-s, --secret string the secret value which is encrypted before being stored. There is a maximum length based on your plan that is enforced (1k-10k)
-t, --ttl int the maximum amount of time, in seconds, that the secret should survive (i.e. time-to-live). Once this time expires, the secret will be deleted and not recoverable. (default 604800)
```### Share a generated secret
```
$ ots share -g
```### Share custom secret with ttl and passphrase
```
$ ots share -s hellosecret -t 300 -p hello
```### Share secret from file
```
$ cat <