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

Overview

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]
You might also like...
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 🖥️ 🌌 💻

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

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

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

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:

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

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

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

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

Owner
Venky
Venky
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

Manifold 5.2k Dec 3, 2022
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

Peter Mattis 1 Nov 20, 2021
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,

Anthony HAMON 49 Sep 26, 2022
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

Masashi Shibata 4.7k Dec 2, 2022
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

Athul Cyriac Ajay 168 Dec 3, 2022
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

Rory Quinn 8 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,

Jason Walton 14 Nov 22, 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

Saif Shahriar 0 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 ??

null 16 Nov 13, 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

null 0 Nov 22, 2021