Add --no-interactive flag to disable REPL console#284
Open
NotMyself wants to merge 1 commit intostatiqdev:mainfrom
Open
Add --no-interactive flag to disable REPL console#284NotMyself wants to merge 1 commit intostatiqdev:mainfrom
NotMyself wants to merge 1 commit intostatiqdev:mainfrom
Conversation
Adds a --no-interactive CLI flag to PipelinesCommandSettings that disables the interactive REPL console. This enables running commands like `preview` in headless environments such as: - CI/CD pipelines - Docker containers without TTY - Background processes - IDE task runners (VS Code, Claude Code, etc.) When --no-interactive is set (or console is unavailable), the command will still watch for file changes and rebuild, but won't attempt to use console operations that require valid handles (cursor positioning, ReadKey, etc.). Also adds auto-detection via IsConsoleAvailable() that checks if console operations would succeed, falling back to non-interactive mode automatically when no console is present. Fixes statiqdev#283 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Author
|
Hi @daveaglick, I'm a Statiq.Web license holder actively building my site with the framework. While investigating this issue, I dug into the codebase and found it well-structured and approachable. I noticed there's a backlog of open PRs dating back over a year, including some dependabot security updates and .NET 8/9 upgrades. I'd be happy to help with maintenance if you're interested - reviewing PRs, triaging issues, keeping dependencies updated, etc. No pressure either way - just wanted to offer since I'm actively using the project and now have some context from this PR work. Best, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
--no-interactiveCLI flag that disables the interactive REPL console for commands that extendInteractiveCommand(likepreview). This enables running these commands in headless environments.Fixes #283
Changes
--no-interactiveflag toPipelinesCommandSettingsInteractiveCommand.ExecuteEngineAsync()to skip REPL when flag is setIsConsoleAvailable()helper for auto-detection of console availabilityUse Cases
This enables running
preview(and similar commands) in:Usage
Behavior
--no-interactiveBackward Compatibility
Test Plan
previewworks normally without the flag (interactive mode)preview --no-interactiveruns without REPL prompt--no-interactive🤖 Generated with Claude Code