Add --no-banner argument to clean up the output (#1600)

Co-authored-by: Ed Sumerfield <esumerfield@stackct.com>
This commit is contained in:
Ed Sumerfield
2026-01-26 17:58:56 -05:00
committed by GitHub
parent 83dc5b5f12
commit 712a0789d6
2 changed files with 10 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
"task-master-ai": patch
---
Add --no-banner to suppress the startup banner.

View File

@@ -5405,7 +5405,8 @@ async function runCLI(argv = process.argv) {
// Display banner if not in a pipe (except for init/start/repl commands which have their own) // Display banner if not in a pipe (except for init/start/repl commands which have their own)
const isInitCommand = argv.includes('init'); const isInitCommand = argv.includes('init');
const isREPLCommand = argv.includes('tui') || argv.includes('repl'); const isREPLCommand = argv.includes('tui') || argv.includes('repl');
if (process.stdout.isTTY && !isInitCommand && !isREPLCommand) { const noBanner = argv.includes('--no-banner');
if (process.stdout.isTTY && !isInitCommand && !isREPLCommand && !noBanner) {
displayBanner(); displayBanner();
} }
@@ -5442,7 +5443,9 @@ async function runCLI(argv = process.argv) {
// NOTE: getConfig() might be called during setupCLI->registerCommands if commands need config // NOTE: getConfig() might be called during setupCLI->registerCommands if commands need config
// This means the ConfigurationError might be thrown here if configuration file is missing. // This means the ConfigurationError might be thrown here if configuration file is missing.
const programInstance = setupCLI(); const programInstance = setupCLI();
await programInstance.parseAsync(argv); // Filter out --no-banner since it's handled above and not a Commander option
const filteredArgv = argv.filter((arg) => arg !== '--no-banner');
await programInstance.parseAsync(filteredArgv);
// Check if migration has occurred and show FYI notice once // Check if migration has occurred and show FYI notice once
try { try {