Prompt the user for input with interactive questions
Schema
github.com/hofstadter.io/hof/flow/tasks/prompt
packagepromptimport (schema"github.com/hofstadter-io/hof/schema/prompt")// Same prompt from creators as a workflow taskPrompt: schema.Prompt & { @task(prompt.Prompt)}
github.com/hofstadter.io/hof/schemas/prompt
packagepromptimport ("github.com/hofstadter-io/hof/schema/common")Prompt: {// the value / schema to be filled in// partially filled is supported, questions will be skipped Input: {...}// the prompt questions Questions: [...Question]// the resulting value after prompt Output: {...}}Question: { Name: string Type: "input"|"multiline"|"password"|"confirm"|"select"|"multiselect"|"subgroup" Prompt: string// for (multi)select Options?: [...string] Default?: _ Required: bool|*false Validation?: _ Questions?: [...Question]}NamePrompt: { Name: "name" Type: "input" Prompt: "What is your CLI named" Required: true Validation: common.NameLabel}RepoPrompt: { Name: "repo" Type: "git" Prompt: "Git repository" Validation: common.NameLabel}