@andywer/teleprompt
v0.1.0-alpha.15
Published
Command line client for teleprompt.io. Get interactive input from authenticated users in headless environments.
Downloads
49
Maintainers
Readme
Teleprompt client
Command line client for teleprompt.io. Enables you to get interactive input from authenticated users in headless environments like build jobs.
Use it to prompt a maintainer for a password, two factor authentication code, production certificate file or similar in CI. All data is end-to-end encrypted using X25519 asymmetric encryption.
Works in all Continuous Integration tools, like Travis CI, Circle CI, GitHub actions, GitLab CI, AppVeyor and others.
Installation
npm install --save-dev telepromptUsage
Usage
teleprompt --prompt <name>:<type>[:<title>] [--prompt …]
or
teleprompt [--config <path>] [--prompt <name> [--prompt …]]
Options
--api-key <key> Use this API key to authenticate
--config, -c <path> Read prompt descriptions from a TOML or JSON file
--disable-encryption Disable end-to-end encryption
--help Show this usage help text
--link <url> Add a custom backlink to this prompt
--only <name> Prompt for this value only, write raw value to stdout
--output-format <format> Output formatting, can be "json" (default), "cli", "raw"
--prompt, -p Request a value from the user
<name>:<type>[:<title>] Type can be "password", "text", "otp", "file" or "select"
If type is "select",
--title <title> Set a title for this prompt
--version Show the current version
If --api-key is not set the API key will be read from the .teleprompt.key file.
If --config is not set the teleprompt.{json,toml} file will be loaded if present.
Set --api-key or --config to "-" to read from stdin.API key
To obtain an API key, login to teleprompt.io with your GitHub account and create a new project. A new API key will be created that you can save to a .teleprompt.key file (don't forget to .gitignore!) or set up as a secret environment variable in your build environment and pass to teleprompt using --api-key $KEY.
Configuration
Create a file called teleprompt.toml or .teleprompt.toml if you don't want to pass all the configuration using command line options or if your want to use dropdown inputs.
Here is a sample teleprompt.toml:
# the following project settings are all optional
title = "Authorize my thing"
link = "https://ci.example.org/build/\${BUILDREF}"
disableEncryption = false
[[prompts]]
name = "username"
type = "text"
[[prompts]]
name = "password"
type = "password"
[[prompts]]
name = "target"
type = "select"
[[prompts.choices]]
title = "Production" # optional
value = "production"
[[prompts.choices]]
title = "Staging" # optional
value = "staging"License
MIT
