You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Register the top-level setup command in the CLI #1604
Users need a first-class propr setup command that discovers the environment, launches the interactive wizard when possible, and falls back to the sequential wizard when requested or required.
Requirements
Add createSetupCommand().
Register it in commands/index.ts and packages/cli/src/index.ts.
Add help text explaining that setup is safe to re-run.
Support --root, --no-tui, and --skip-remote-image-check.
Use Ink when stdin/stdout are TTY and no fallback flag is provided.
Implementation Specification
Create packages/cli/src/commands/setupCommand.ts; update command barrel and CLI entrypoint.
Acceptance Criteria
propr setup --help shows the command and options.
propr setup --no-tui uses the sequential fallback.
propr setup attempts Ink first and falls back to sequential if Ink cannot render.
The command action stays thin: resolve root, select renderer, and handle errors. All setup logic lives in the engine so command registration does not become hard to maintain. We register setup near other control-plane commands because it is the recommended guided path over check, init stack, and start.
File: packages/cli/src/commands/setupCommand.ts (new file)
Why this file: This file exposes setup as a Commander command and chooses between the Ink and sequential renderers.
import{Command}from'commander';import{resolveSetupRoot}from'./setup/state.js';import{runSequentialSetup}from'./setup/sequential.js';importtype{SetupRunOptions}from'./setup/types.js';functioncanUseTui(options: {noTui?: boolean}): boolean{return!options.noTui&&Boolean(process.stdin.isTTY&&process.stdout.isTTY)&&process.env.NO_COLOR===undefined;}functionisTuiFallbackError(error: unknown): boolean{constmessage=errorinstanceofError ? error.message : String(error);return/rawmode|setRawMode|stdin.*tty|notatty|ink|setupcancelled/i.test(message);}exportfunctioncreateSetupCommand(): Command{returnnewCommand('setup').description('Run the guided ProPR setup wizard').option('--root <dir>','Stack root directory where .env/data/logs/repos live').option('--no-tui','Use the sequential text wizard instead of the Ink TUI').option('--skip-remote-image-check','Skip registry freshness checks during setup').addHelpText('after',`Setup combines environment checks, stack initialization, selective image pulls,agent authentication guidance, GitHub setup, stack startup, whitelist setup,optional repository setup, and Web UI access.The command is safe to re-run: it preserves existing stack data and does notrewrite .env wholesale. Use it later to adjust basic setup choices.Examples: $ propr setup $ propr setup --root /srv/propr $ propr setup --no-tui`).action(async(options: {root?: string;noTui?: boolean;skipRemoteImageCheck?: boolean})=>{try{constrootDir=awaitresolveSetupRoot(options.root);construnOptions: SetupRunOptions={root: rootDir,noTui: options.noTui,skipRemoteImageCheck: options.skipRemoteImageCheck,};if(canUseTui(options)){try{const{ renderSetupWizard }=awaitimport('../tui/app.js');constfinalState=awaitrenderSetupWizard(rootDir,runOptions);constwebStep=finalState.steps.find((step)=>step.id==='web-ui');if(webStep?.detail)console.log(webStep.detail);return;}catch(error){if(!isTuiFallbackError(error))throwerror;// Fall back instead of failing because many otherwise-interactive// SSH terminals cannot support Ink raw mode reliably.console.log('Interactive TUI is not available; falling back to the sequential setup wizard.');}}constfinalState=awaitrunSequentialSetup(rootDir,runOptions);constwebStep=finalState.steps.find((step)=>step.id==='web-ui');if(webStep?.detail)console.log(webStep.detail);}catch(error){console.error(`Error running setup: ${(errorasError).message}`);process.exit(1);}});}
File: packages/cli/src/commands/index.ts
Why this file: The command barrel is the integration surface used by the CLI entrypoint. Exporting setup here matches existing command registration patterns.
--- a/packages/cli/src/commands/index.ts+++ b/packages/cli/src/commands/index.ts
@@
export { createInitCommand } from './initCommands.js';
+export { createSetupCommand } from './setupCommand.js';
File: packages/cli/src/index.ts
Why this file: The CLI entrypoint must import and register the new top-level command so users can run propr setup.
Activity
propr-dev commentedon Jun 22, 2026
Suggested Implementation:
Implementation Approach
The command action stays thin: resolve root, select renderer, and handle errors. All setup logic lives in the engine so command registration does not become hard to maintain. We register setup near other control-plane commands because it is the recommended guided path over
check,init stack, andstart.File:
packages/cli/src/commands/setupCommand.ts(new file)Why this file: This file exposes setup as a Commander command and chooses between the Ink and sequential renderers.
File:
packages/cli/src/commands/index.tsWhy this file: The command barrel is the integration surface used by the CLI entrypoint. Exporting setup here matches existing command registration patterns.
File:
packages/cli/src/index.tsWhy this file: The CLI entrypoint must import and register the new top-level command so users can run
propr setup.propr-dev commentedon Jun 22, 2026
🤖 AI processing has started for this issue using claude agent with claude-opus-4-8 model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
claudeclaude-opus-4-81604/claude-opus-4-8-register-the-top-level-se-20260622-1041-vh91599-epic-build-comprehensive-b5cissue-1604-20260622-1041-claude-opus-4-8-vh9🔍 Track Task Execution
All acceptance criteria are met. Let me give a final summary.
All acceptance criteria are met. Let me give a final summary.