input

Ask user to input and save it to the variable object

Example

{
  "op": "input",
  "title": "Enter your project name:",
  "defaultValue": "my-app",
  "value": "$projectName",
  "actions": [
    {
      "op": "add",
      "remoteSrc": "/templates/README.md",
      "targetSrc": "./README.md"
    }
  ]
}

Fields

FieldsTypeDescription
op'input'Specifies the type of operation. For InputOperation, this field must be 'input'.
titlestringThe message displayed to the user when prompting for input.
defaultValuestringThe default value used if the user does not provide any input.
valuestringThe name of the variable where the user's input will be stored.
actionsOperation[]An array of operations to execute after the input is received. These actions can utilize the variable defined by the user's input.