diff --git a/.changeset/floppy-plants-marry.md b/.changeset/floppy-plants-marry.md new file mode 100644 index 00000000..401fed18 --- /dev/null +++ b/.changeset/floppy-plants-marry.md @@ -0,0 +1,9 @@ +--- +'task-master-ai': patch +--- + +Fix CLI --force flag for parse-prd command + +Previously, the --force flag was not respected when running `parse-prd`, causing the command to prompt for confirmation or fail even when --force was provided. This patch ensures that the flag is correctly passed and handled, allowing users to overwrite existing tasks.json files as intended. + +- Fixes #477 \ No newline at end of file diff --git a/.changeset/pre.json b/.changeset/pre.json index 72461b35..0d16f4e6 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -6,25 +6,7 @@ }, "changesets": [ "beige-doodles-type", - "beige-rats-accept", - "blue-spies-kick", - "cuddly-zebras-matter", - "curvy-candies-eat", - "easy-toys-wash", - "every-stars-sell", - "fine-monkeys-eat", - "fine-signs-add", - "gentle-views-jump", - "mighty-mirrors-watch", - "neat-donkeys-shave", - "nine-rocks-sink", - "ninety-ghosts-relax", - "ninety-wombats-pull", - "public-cooks-fetch", "red-oranges-attend", - "red-suns-wash", - "tricky-papayas-hang", - "violet-papayas-see", - "violet-parrots-march" + "red-suns-wash" ] } diff --git a/.changeset/slow-singers-swim.md b/.changeset/slow-singers-swim.md new file mode 100644 index 00000000..dadfda63 --- /dev/null +++ b/.changeset/slow-singers-swim.md @@ -0,0 +1,5 @@ +--- +'task-master-ai': patch +--- + +Fix for issue #409 LOG_LEVEL Pydantic validation error diff --git a/.changeset/wide-eyes-relax.md b/.changeset/wide-eyes-relax.md new file mode 100644 index 00000000..1684d1a5 --- /dev/null +++ b/.changeset/wide-eyes-relax.md @@ -0,0 +1,11 @@ +--- +'task-master-ai': patch +--- + +Fix duplicate output on CLI help screen + +- Prevent the Task Master CLI from printing the help screen more than once when using `-h` or `--help`. +- Removed redundant manual event handlers and guards for help output; now only the Commander `.helpInformation` override is used for custom help. +- Simplified logic so that help is only shown once for both "no arguments" and help flag flows. +- Ensures a clean, branded help experience with no repeated content. +- Fixes #339 diff --git a/.cursor/rules/dev_workflow.mdc b/.cursor/rules/dev_workflow.mdc index 4d430323..003251d8 100644 --- a/.cursor/rules/dev_workflow.mdc +++ b/.cursor/rules/dev_workflow.mdc @@ -116,7 +116,7 @@ Taskmaster configuration is managed through two main mechanisms: * For MCP/Cursor integration, configure these keys in the `env` section of `.cursor/mcp.json`. * Available keys/variables: See `assets/env.example` or the Configuration section in the command reference (previously linked to `taskmaster.mdc`). -**Important:** Non-API key settings (like model selections, `MAX_TOKENS`, `LOG_LEVEL`) are **no longer configured via environment variables**. Use the `task-master models` command (or `--setup` for interactive configuration) or the `models` MCP tool. +**Important:** Non-API key settings (like model selections, `MAX_TOKENS`, `TASKMASTER_LOG_LEVEL`) are **no longer configured via environment variables**. Use the `task-master models` command (or `--setup` for interactive configuration) or the `models` MCP tool. **If AI commands FAIL in MCP** verify that the API key for the selected provider is present in the `env` section of `.cursor/mcp.json`. **If AI commands FAIL in CLI** verify that the API key for the selected provider is present in the `.env` file in the root of the project. diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 0bab3820..430c1aab 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -2,9 +2,6 @@ name: Pre-Release (RC) on: workflow_dispatch: # Allows manual triggering from GitHub UI/API - push: - branches: - - 'next' concurrency: pre-release-${{ github.ref }} @@ -41,12 +38,10 @@ jobs: npx changeset pre enter rc - name: Version RC packages - run: | - git config user.name "GitHub Actions" - git config user.email "github-actions@example.com" - npx changeset version - git add . - git commit -m "chore: rc version bump" || echo "No changes to commit" + run: npx changeset version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Create Release Candidate Pull Request or Publish Release Candidate to npm uses: changesets/action@v1 @@ -55,3 +50,13 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Exit RC mode + run: npx changeset pre exit + + - name: Commit & Push changes + uses: actions-js/push@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} + message: 'chore: rc version bump' diff --git a/assets/.windsurfrules b/assets/.windsurfrules index c253460c..a5cf07aa 100644 --- a/assets/.windsurfrules +++ b/assets/.windsurfrules @@ -198,7 +198,7 @@ alwaysApply: true - **MAX_TOKENS** (Default: `"4000"`): Maximum tokens for responses (Example: `MAX_TOKENS=8000`) - **TEMPERATURE** (Default: `"0.7"`): Temperature for model responses (Example: `TEMPERATURE=0.5`) - **DEBUG** (Default: `"false"`): Enable debug logging (Example: `DEBUG=true`) - - **LOG_LEVEL** (Default: `"info"`): Console output level (Example: `LOG_LEVEL=debug`) + - **TASKMASTER_LOG_LEVEL** (Default: `"info"`): Console output level (Example: `TASKMASTER_LOG_LEVEL=debug`) - **DEFAULT_SUBTASKS** (Default: `"3"`): Default subtask count (Example: `DEFAULT_SUBTASKS=5`) - **DEFAULT_PRIORITY** (Default: `"medium"`): Default priority (Example: `DEFAULT_PRIORITY=high`) - **PROJECT_NAME** (Default: `"MCP SaaS MVP"`): Project name in metadata (Example: `PROJECT_NAME=My Awesome Project`) diff --git a/assets/scripts_README.md b/assets/scripts_README.md index 0d615389..1e76856f 100644 --- a/assets/scripts_README.md +++ b/assets/scripts_README.md @@ -31,7 +31,7 @@ Task Master configuration is now managed through two primary methods: - Create a `.env` file in your project root for CLI usage. - See `assets/env.example` for required key names. -**Important:** Settings like `MODEL`, `MAX_TOKENS`, `TEMPERATURE`, `LOG_LEVEL`, etc., are **no longer set via `.env`**. Use `task-master models --setup` instead. +**Important:** Settings like `MODEL`, `MAX_TOKENS`, `TEMPERATURE`, `TASKMASTER_LOG_LEVEL`, etc., are **no longer set via `.env`**. Use `task-master models --setup` instead. ## How It Works @@ -42,7 +42,7 @@ Task Master configuration is now managed through two primary methods: - Tasks can have `subtasks` for more detailed implementation steps. - Dependencies are displayed with status indicators (✅ for completed, ⏱️ for pending) to easily track progress. -2. **CLI Commands** +2. **CLI Commands** You can run the commands via: ```bash @@ -200,7 +200,7 @@ Notes: ## Logging -The script supports different logging levels controlled by the `LOG_LEVEL` environment variable: +The script supports different logging levels controlled by the `TASKMASTER_LOG_LEVEL` environment variable: - `debug`: Detailed information, typically useful for troubleshooting - `info`: Confirmation that things are working as expected (default) diff --git a/scripts/README.md b/scripts/README.md index 640703e4..1b83c635 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -32,7 +32,7 @@ The script can be configured through environment variables in a `.env` file at t - `PERPLEXITY_API_KEY`: Your Perplexity API key for research-backed subtask generation - `PERPLEXITY_MODEL`: Specify which Perplexity model to use (default: "sonar-medium-online") - `DEBUG`: Enable debug logging (default: false) -- `LOG_LEVEL`: Log level - debug, info, warn, error (default: info) +- `TASKMASTER_LOG_LEVEL`: Log level - debug, info, warn, error (default: info) - `DEFAULT_SUBTASKS`: Default number of subtasks when expanding (default: 3) - `DEFAULT_PRIORITY`: Default priority for generated tasks (default: medium) - `PROJECT_NAME`: Override default project name in tasks.json @@ -47,7 +47,7 @@ The script can be configured through environment variables in a `.env` file at t - Tasks can have `subtasks` for more detailed implementation steps. - Dependencies are displayed with status indicators (✅ for completed, ⏱️ for pending) to easily track progress. -2. **Script Commands** +2. **Script Commands** You can run the script via: ```bash @@ -225,7 +225,7 @@ To use the Perplexity integration: ## Logging -The script supports different logging levels controlled by the `LOG_LEVEL` environment variable: +The script supports different logging levels controlled by the `TASKMASTER_LOG_LEVEL` environment variable: - `debug`: Detailed information, typically useful for troubleshooting - `info`: Confirmation that things are working as expected (default) diff --git a/scripts/init.js b/scripts/init.js index 84c7d69e..e3ef14b2 100755 --- a/scripts/init.js +++ b/scripts/init.js @@ -40,10 +40,10 @@ const LOG_LEVELS = { success: 4 }; -// Get log level from environment or default to info -const LOG_LEVEL = process.env.LOG_LEVEL - ? LOG_LEVELS[process.env.LOG_LEVEL.toLowerCase()] - : LOG_LEVELS.info; +// Determine log level from environment variable or default to 'info' +const LOG_LEVEL = process.env.TASKMASTER_LOG_LEVEL + ? LOG_LEVELS[process.env.TASKMASTER_LOG_LEVEL.toLowerCase()] + : LOG_LEVELS.info; // Default to info // Create a color gradient for the banner const coolGradient = gradient(['#00b4d8', '#0077b6', '#03045e']); diff --git a/scripts/modules/commands.js b/scripts/modules/commands.js index dcff3028..7fff05b7 100644 --- a/scripts/modules/commands.js +++ b/scripts/modules/commands.js @@ -494,11 +494,6 @@ function registerCommands(programInstance) { process.exit(1); }); - // Default help - programInstance.on('--help', function () { - displayHelp(); - }); - // Add/remove brand rules command programInstance .command('rules [brands...]') @@ -665,7 +660,7 @@ function registerCommands(programInstance) { const outputPath = options.output; const force = options.force || false; const append = options.append || false; - let useForce = false; + let useForce = force; let useAppend = false; // Helper function to check if tasks.json exists and confirm overwrite @@ -759,7 +754,7 @@ function registerCommands(programInstance) { spinner = ora('Parsing PRD and generating tasks...').start(); await parsePRD(inputFile, outputPath, numTasks, { append: useAppend, - force: useForce + useForce }); spinner.succeed('Tasks generated successfully!'); } catch (error) { @@ -2530,14 +2525,7 @@ function setupCLI() { return 'unknown'; // Default fallback if package.json fails }) .helpOption('-h, --help', 'Display help') - .addHelpCommand(false) // Disable default help command - .on('--help', () => { - displayHelp(); // Use your custom help display instead - }) - .on('-h', () => { - displayHelp(); - process.exit(0); - }); + .addHelpCommand(false); // Disable default help command // Modify the help option to use your custom display programInstance.helpInformation = () => { diff --git a/tests/setup.js b/tests/setup.js index 8dedeacd..81e11109 100644 --- a/tests/setup.js +++ b/tests/setup.js @@ -9,7 +9,7 @@ process.env.MODEL = 'sonar-pro'; process.env.MAX_TOKENS = '64000'; process.env.TEMPERATURE = '0.2'; process.env.DEBUG = 'false'; -process.env.LOG_LEVEL = 'error'; // Set to error to reduce noise in tests +process.env.TASKMASTER_LOG_LEVEL = 'error'; // Set to error to reduce noise in tests process.env.DEFAULT_SUBTASKS = '5'; process.env.DEFAULT_PRIORITY = 'medium'; process.env.PROJECT_NAME = 'Test Project';