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
Then: No ExitPromptError, command completes with defaults
AC-2: Default Fallback
Stack → detected value or "generic"
Dev URL → stack-specific default
Confirmations → true (proceed)
AC-3: Clear Messaging
Output: "Non-interactive mode detected, using defaults..."
Show each default: 📦 Using stack: generic (default)
AC-4: CI Compatibility
Test environments: GitHub Actions, GitLab CI, CircleCI
Success criteria: Exit code 0, all files created
Implementation Steps
Phase 1: TTY Detection Utility
Create src/lib/tty.ts with isTTY(), isCI(), shouldUseInteractiveMode()
Create src/lib/tty.test.ts with unit tests
Phase 2: Update Init Command
3. Import TTY utility in src/commands/init.ts
4. Add helper logDefault(label, value) for consistent messaging
5. Wrap all 5 inquirer.prompt calls with TTY checks:
Proceed confirmation (L82-89)
Stack confirmation (L105-115)
Stack selection (L120-139)
Dev URL input (L152-159)
Installation confirmation (L177-184)
Phase 3: Add --interactive Flag
6. Add -i, --interactive option in bin/cli.ts
7. Update InitOptions interface
8. Allow forcing interactive mode when needed
Phase 4: Tests
9. Update src/commands/init.test.ts with TTY mocking scenarios
⚠️ Conflict Risk
In-flight work on #6 (Bun package manager) also modifies init.ts. Changes are orthogonal - TTY detection wraps prompts while #6 adds package manager detection. Proceed with care on merge.
🚀 Initializing Sequant...
⚡ Non-interactive mode detected (stdin is not a terminal (piped input detected))
Using defaults. Use --interactive to force prompts.
📋 Stack: generic
📦 Dev URL: http://localhost:3000 (default)
Activity
admarble commentedon Jan 10, 2026
📋 Implementation Plan
Acceptance Criteria Checklist
Verification Criteria
AC-1: Non-TTY Detection
process.stdout.isTTYisfalseorundefinedsequant initruns without--yesExitPromptError, command completes with defaultsAC-2: Default Fallback
true(proceed)AC-3: Clear Messaging
📦 Using stack: generic (default)AC-4: CI Compatibility
Implementation Steps
Phase 1: TTY Detection Utility
src/lib/tty.tswithisTTY(),isCI(),shouldUseInteractiveMode()src/lib/tty.test.tswith unit testsPhase 2: Update Init Command
3. Import TTY utility in
src/commands/init.ts4. Add helper
logDefault(label, value)for consistent messaging5. Wrap all 5
inquirer.promptcalls with TTY checks:Phase 3: Add --interactive Flag
6. Add
-i, --interactiveoption inbin/cli.ts7. Update
InitOptionsinterface8. Allow forcing interactive mode when needed
Phase 4: Tests
9. Update
src/commands/init.test.tswith TTY mocking scenariosIn-flight work on #6 (Bun package manager) also modifies
init.ts. Changes are orthogonal - TTY detection wraps prompts while #6 adds package manager detection. Proceed with care on merge.Recommended Workflow
Quality loop: disabled (focused CLI enhancement)
🤖 Generated by /spec workflow
feat(#8): Improve non-interactive mode and TTY detection
feat(#8): Improve non-interactive mode and TTY detection (#49)
admarble commentedon Jan 10, 2026
✅ Manual Test Results
Feature merged in PR #49 and verified working.
Test 1: Piped Input Detection
Result: ✅ Pass
Test 2: CI Environment Detection
Result: ✅ Pass - Non-interactive mode triggered, uses defaults
Test 3: --yes Flag (Explicit Intent)
Result: ✅ Pass - No "non-interactive" message (user explicitly chose defaults)
Summary
ExitPromptErrorExitPromptError--yesflag--interactiveAll acceptance criteria verified working in production. Closing issue.
🤖 Tested by Claude Code
chore: bump version to 1.2.0
feat(#8): Improve non-interactive mode and TTY detection