A command line tool to prompt for a value to be included in another command line.

readval is a command line tool which is designed for one specific purpose—to prompt for a value to be included in another command line. readval prints the prompt on the TTY, reads the input also from the TTY, and echoes the entered input to stdout.

Usage

$ readval -h
usage: ./readval [OPTIONS] prompt...
Prints prompts, reads input from TTY, and echoes it back on stdout.

  -s, --silent          Do not echo input

Examples

$ readval prompt </dev/null | od -c
prompt: foo
0000000   f   o   o  \n
0000004

Or a more "real" example:

$ echo "foo=bar" \
  | curl -s -XPOST -d @- "https://httpbin.org/post?user=$( readval Enter username )&pass=$( readval -s Enter password )" \
  | jq .
Enter username: testuser
Enter password:
{
  "args": {
    "pass": "testpass",
    "user": "testuser"
  },
  "data": "",
  "files": {},
  "form": {
    "foo": "bar"
  },
...

Installation

go install github.com/venkytv/[email protected]
Similar Resources

Portal is a quick and easy command-line file transfer utility from any computer to another 🖥️ 🌌 💻

Portal is a quick and easy command-line file transfer utility from any computer to another 🖥️ 🌌 💻

Portal is a quick and easy command-line file transfer utility from any computer to another 🖥️ 🌌 💻

Dec 27, 2022

An open-source GitLab command line tool bringing GitLab's cool features to your command line

An open-source GitLab command line tool bringing GitLab's cool features to your command line

GLab is an open source GitLab CLI tool bringing GitLab to your terminal next to where you are already working with git and your code without switching

Dec 30, 2022

Yet another emojify command written in Go 🍜

Yet another emojify command written in Go 🍜

go-emojify Yet another emojify command written in Go 🍜 Installation $ go get github.com/yusukebe/go-emojify/cmd/go-emojify Usage $ go-emojify "I lov

Nov 7, 2021

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.

Table of contents Introduction Reference Contributing Introduction Overview git-xargs is a command-line tool (CLI) for making updates across multiple

Dec 31, 2022

git-xargs is a command-line tool (CLI) for making updates across multiple GitHub repositories with a single command

git-xargs is a command-line tool (CLI) for making updates across multiple GitHub repositories with a single command

git-xargs is a command-line tool (CLI) for making updates across multiple GitHub repositories with a single command. You give git-xargs:

Feb 5, 2022

A command line tool for simplified docker volume command built with go

dockervol A command line tool for simplified docker volume command built with go. Features: Remove anonymous volume (beta) Remove volume by matching n

Dec 18, 2021

fofax is a fofa query tool written in go, positioned as a command-line tool and characterized by simplicity and speed.

fofax is a fofa query tool written in go, positioned as a command-line tool and characterized by simplicity and speed.

fofaX 0x00 Introduction fofax is a fofa query tool written in go, positioned as

Jan 8, 2023

Another CLI framework for Go. It works on my machine.

Another CLI framework for Go. It works on my machine.

Command line interface framework Go framework for rapid command line application development

Dec 30, 2022

Another Go shellcode loader designed to work with Cobalt Strike raw binary payload.

Another Go shellcode loader designed to work with Cobalt Strike raw binary payload.

Bankai Another Go shellcode loader designed to work with Cobalt Strike raw binary payload. I created this project to mainly educate myself learning Go

Dec 29, 2022
Interactive prompt for command-line applications
Interactive prompt for command-line applications

promptui Interactive prompt for command-line applications. We built Promptui because we wanted to make it easy and fun to explore cloud services with

Jan 8, 2023
Pure Go command line prompt with history, kill-ring, and tab completion

Prompt Prompt is a command line prompt editor with history, kill-ring, and tab completion. It was inspired by linenoise and derivatives which eschew u

Nov 20, 2021
Strumt is a library to create prompt chain
Strumt is a library to create prompt chain

Strumt Strumt is a library to create prompt chain. It provides multiline prompt, input validation, retry on error, ability to create typesafe prompt,

Sep 26, 2022
Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.
Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.

go-prompt A library for building powerful interactive prompts inspired by python-prompt-toolkit, making it easier to build cross-platform command line

Jan 3, 2023
Shelby is a fast ⚡️ , lightweight ☁️ , minimal✨, shell prompt written in Go.
Shelby is a fast ⚡️ , lightweight ☁️ , minimal✨,  shell prompt written in Go.

Shelby is a fast ⚡️ ,lightweight ☁️ ,minimal ✨ , shell prompt written in Pure Go. Installation Follow the steps below(Linux and macOS), and Post Insta

Dec 3, 2022
Interactive prompt to set and push a semver tag
Interactive prompt to set and push a semver tag

cutver For when you know what version to tag, and you want to cut a release in the annotated tag format. Installation go install github.com/roryq/cutv

Nov 15, 2022
The extremely customizable and themeable shell prompt.

kitch-prompt Kitch-prompt is a cross-platform tool for displaying a shell prompt, which can be extensively customized both in terms of what is shown,

Dec 28, 2022
A simple CLI based rock-paper-scissors game created in GO with interactive shell prompt.

rock-paper-scissors A simple CLI (Command Line Interface) based rock-paper-scissors game with interactive shell prompt. Language Download Grab a binar

Oct 9, 2022
A crunchyroll api integration in go with included cli

crunchyroll-go A Go library & cli for the undocumented crunchyroll api. You surely need a crunchyroll premium account to get full (api) access. CLI ??

Dec 18, 2022
A command line tool that builds and (re)starts your web application everytime you save a Go or template fileA command line tool that builds and (re)starts your web application everytime you save a Go or template file

# Fresh Fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file. If the web framework yo

Nov 22, 2021