Interactive prompts
In a terminal, vulcan project init, vulcan package add, vulcan project sync and vulcan agent setup ask with menus. You pick with the keyboard; you type only where there is nothing to pick from.
The menus are drawn when stdin and stdout are both a terminal and TERM is not dumb. In any other case (a pipe, a redirect, CI, TERM=dumb) the commands ask the plain, line-based questions they always asked, and with no terminal at all they take flags or stop with a clear error. They never wait for a key that cannot come.
Keys
| Menu | Keys |
|---|---|
| Select (one choice) | Up / Down move, Enter chooses |
| Checkbox (any number) | Up / Down move, Space ticks, a ticks all, Enter confirms |
| Text | type, Enter accepts; a default is shown and taken on Enter |
| Confirm | Y / N or Left / Right, Enter accepts |
| Any menu | Esc or Ctrl-C cancels: the command stops and writes nothing |
What is a menu
- Which coding agents (
sync,agents setup) - Checkbox. What this machine chose before is ticked; with no earlier choice, what was detected. The hints saydetectedandchosen before. Nothing ticked meansnone. - What to create (
add) - Select.apporlib; only the kinds the preset offers. - The preset (
add,init --presetwith no value) - Select of the presets the project recorded (addonly), then the official ones it has not used, thenAnother preset....Another preset...opens a text input for a package name orfile:<path>. The official list is the one atlas answerspresetsfrom. - The shared or library folder (
add) - Select of the folders that exist, plusNew folder....New folder...opens a text input. - The side folder of an app (
add) - Not asked. Apps of one side share the folder the config holds. - The backend app to proxy
/apito (add, frontend) - Select of the backend apps, plusnone. - A new project, app or library name - Text. The earlier choice is the default; a name is never made up. A name that is not one is refused where it is typed.
- The package scope of a new app (
init,add --app) - Text, optional. Like@acme; empty keeps the bare name. Asked only where menus are drawn; a script gives--scope. - Before anything is written - A summary, then a confirm.
initandadd.Nostops withaborted: nothing was written.
Scripts, pipes and a pty
Scripts pass flags (--agents, --project, --app, --lib, --preset and the folder flags): nothing is asked, with or without a terminal.
A menu reads key presses, not lines. Piping answers into a command that runs under a pseudo-terminal (script -qec 'vulcan package add' /dev/null, expect) hands it lines ending in LF, and a menu takes only CR (what Enter sends) as Enter. The command stops at once with this menu reads key presses, not lines and the way out (flags, or TERM=dumb), exit code 1. To drive a command through a pty with piped lines, set TERM=dumb: the plain line questions run.
printf 'my-product
services
core-api
libs
' | TERM=dumb script -qec 'bun node_modules/.bin/vulcan project init --preset ignis' /dev/nullTo press keys in a test, send CR for Enter (), the arrow sequences and a space, and send each key once the menu is on screen.
Colour
The menus honour NO_COLOR and FORCE_COLOR: with NO_COLOR set they print no colour sequences.
Library
The menus are drawn by @clack/prompts, pinned to one exact version and typed. VULCAN wraps it in src/ui, so no command imports it directly.