DEV Community

Cover image for AI-Driven Task Management Tool Powered by TaskMaster AI Core 🧩
Raja Rakotonirina
Raja Rakotonirina

Posted on

AI-Driven Task Management Tool Powered by TaskMaster AI Core 🧩

taskmaster-cli 🧩

TaskMaster CLI is an interactive command-line interface designed to simplify the management of complex projects using TaskMaster AI.

About TaskMaster AI

TaskMaster AI is an advanced AI agent orchestrator for complex project management, especially in software development. It prevents context loss often seen in traditional AI tools during large-scale projects by maintaining long-term context. TaskMaster AI automates PRD creation, task breakdown, and planning, guiding AI agents to implement tasks coherently. It supports multiple AI providers (OpenAI, Anthropic, Google Gemini, etc.) and features a multi-role configuration (main, research, fallback) to optimize AI resource allocation.

Why TaskMaster CLI?

TaskMaster CLI was created to streamline the use of TaskMaster AI with an intuitive and interactive interface. It aims to:

  • Simplify Usage: Hide the complexity of underlying commands behind a user-friendly interactive interface.
  • Preserve Core Logic: Operate as a wrapper without altering the core system of TaskMaster AI.
  • Automate Workflows: Optimize common operations to reduce manual intervention.
  • Enhance Flexibility: Provide new features for managing tasks, dependencies, and processing order.

Github: taskmaster-cli
Demo: πŸš€ New Tool for Taskmaster AI Users – Meet Taskmaster CLI!


πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js: v22.8.0 or higher
  • TaskMaster AI Core: You can install it via the interactive CLI setup or manually. The minimum required version is v0.23.0 or higher.

Installation

Install TaskMaster CLI globally on your system:

npm install -g @raja-rakoto/taskmaster-cli
Enter fullscreen mode Exit fullscreen mode

Configuration

TaskMaster CLI requires API keys to communicate with various AI providers.

  1. Create a .env file in the root of your project by copying/renaming the .env.example file:
  2. Open the .env file and add your API keys.

    # API Keys (Required to enable respective provider)
    ANTHROPIC_API_KEY="your_anthropic_api_key_here"       # Required: Format: sk-ant-api03-...
    PERPLEXITY_API_KEY="your_perplexity_api_key_here"     # Optional: Format: pplx-...
    OPENAI_API_KEY="your_openai_api_key_here"             # Optional, for OpenAI/OpenRouter models. Format: sk-proj-...
    GOOGLE_API_KEY="your_google_api_key_here"             # Optional, for Google Gemini models.
    GEMINI_API_KEY="your_gemini_api_key_here"
    MISTRAL_API_KEY="your_mistral_key_here"               # Optional, for Mistral AI models.
    XAI_API_KEY="YOUR_XAI_KEY_HERE"                       # Optional, for xAI AI models.
    AZURE_OPENAI_API_KEY="your_azure_key_here"            # Optional, for Azure OpenAI models (requires endpoint in .taskmaster/config.json).
    OLLAMA_API_KEY="your_ollama_api_key_here"             # Optional: For remote Ollama servers that require authentication.
    GITHUB_API_KEY="your_github_api_key_here"             # Optional: For GitHub import/export features. Format: ghp_... or github_pat_...
    OPENROUTER_API_KEY="your_openrouter_api_key_here"     # Optional: For OpenRouter models. Format: sk-proj-...
    

Standard Workflow

  1. Initialize a new project using the dedicated command.
  2. Configure your AI models (main, research, fallback) and response language.
  3. Generate tasks automatically from a PRD file (text or Markdown).
  4. Generate the associated task files.
  5. Break down main tasks into subtasks for better granularity.
  6. Manage project progress through the interactive CLI, including CRUD operations, dependency management, complexity analysis, reporting, and more.

https://github.com/user-attachments/assets/685afcc9-b6c9-406c-8485-7151a27dbe35

https://github.com/user-attachments/assets/99d46178-a93c-441d-82e7-2ec1dd508dc5

https://github.com/user-attachments/assets/bf553b97-a11b-4cfc-9337-9877e954c0c7

https://github.com/user-attachments/assets/44337fb8-a5a9-4709-9a65-1dc0bdd86181

https://github.com/user-attachments/assets/aa7334d6-7653-476d-8b65-f222f8273845

https://github.com/user-attachments/assets/fdb884c1-1f56-468e-985b-3977158dcb9e


✨ Features

TaskMaster CLI provides a comprehensive set of features to manage your entire project lifecycle.

Functional Scope

  • Initialization & Configuration:
    • Global package installation.
    • Create new TaskMaster projects.
    • Define main, research, and fallback AI models.
    • Set the response language.
  • Task Generation & Decomposition:
    • Generate tasks from a PRD (txt, markdown).
    • Generate task files.
    • Automatically decompose tasks into subtasks.
  • Task Management (CRUD):
    • View: Tree display, status filtering, detailed view, and show next task.
    • Add: Add tasks/subtasks via AI prompts or from a PRD.
    • Update: Modify tasks/subtasks, manage statuses, and convert between tasks and subtasks.
    • Delete: Remove tasks, subtasks, and dependencies.
  • Dependency Management:
    • Add dependencies to tasks.
    • Automatic validation and correction of inconsistencies.
  • Analysis, Reporting & Documentation:
    • Complexity evaluation.
    • Report generation.
    • Synchronization with documentation.
  • Backup, Restore & Cleanup:
    • Save and restore the state of all tasks and configurations.
    • Massively clean up data (tasks, subtasks, dependencies).

Command Tree

TMAI-CLI
β”œβ”€β”€ πŸš€ Initialization and Configuration
β”‚   β”œβ”€β”€ πŸ“¦ 1 - Install/Upgrade TMAI
β”‚   β”œβ”€β”€ ✨ 2 - Initialize TMAI | Update/Fix rules
β”‚   β”œβ”€β”€ πŸ”§ 3 - Configure AI models (interactive)
β”‚   β”œβ”€β”€ ⏩ Configure AI models (quickly)
β”‚   └── 🌐 4 - Set response language
β”‚
β”œβ”€β”€ πŸ“„ Generation and Decomposition
β”‚   β”œβ”€β”€ πŸ““ 1 - Generate tasks from PRD (AI)
β”‚   β”œβ”€β”€ πŸ“„ 2 - Generate task files from tasks.json
β”‚   └── 🏭 3 - Decompose all tasks (AI)
β”‚
β”œβ”€β”€ βœ… Task Management (CRUD) 
β”‚   β”œβ”€β”€ πŸ”— List and Navigation
β”‚   β”‚   β”œβ”€β”€ πŸ“‹ List tasks
β”‚   β”‚   β”œβ”€β”€ πŸ”Ž Show task details
β”‚   β”‚   └── ➑️ Show next task
β”‚   β”‚
β”‚   β”œβ”€β”€ βž• Add tasks
β”‚   β”‚   β”œβ”€β”€ βž• Add task (AI)
β”‚   β”‚   β”œβ”€β”€ βž• Add tasks from PRD (AI)
β”‚   β”‚   β”œβ”€β”€ βž• Add subtask (AI)
β”‚   β”‚   └── βž• Add subtask (manual)
β”‚   β”‚
β”‚   β”œβ”€β”€ ✏️ Update tasks
β”‚   β”‚   β”œβ”€β”€ ✏️ Update task (AI)
β”‚   β”‚   β”œβ”€β”€ ✏️ Update multiple tasks (AI)
β”‚   β”‚   β”œβ”€β”€ ✏️ Update subtask (AI)
β”‚   β”‚   β”œβ”€β”€ ✏️ Update task/subtask status
β”‚   β”‚   β”œβ”€β”€ ✏️ Convert task to subtask
β”‚   β”‚   └── ✏️ Convert subtask to task
β”‚   β”‚
β”‚   └── πŸ—‘οΈ Delete tasks
β”‚       β”œβ”€β”€ πŸ—‘οΈ Delete task (with subtasks)
β”‚       β”œβ”€β”€ πŸ—‘οΈ Delete a subtask
β”‚       β”œβ”€β”€ πŸ—‘οΈ Delete all subtasks from a task
β”‚       β”œβ”€β”€ πŸ—‘οΈ Delete all dependencies (safe)
β”‚       └── πŸ—‘οΈ Delete all dependencies (unsafe)
β”‚
β”œβ”€β”€ πŸ”— Dependencies
β”‚   β”œβ”€β”€ πŸ“Ž Add dependency
β”‚   β”œβ”€β”€ βœ… Validate dependencies
β”‚   └── πŸ”§ Fix dependencies
β”‚
β”œβ”€β”€ πŸ“Š Analysis, Report, Documentation
β”‚   β”œβ”€β”€ πŸ“Š Analyze task complexity
β”‚   β”œβ”€β”€ πŸ“„ Show complexity report
β”‚   └── πŸ“š Sync tasks with README.md
β”‚
β”œβ”€β”€ πŸ’Ύ Backup, Restore and Clear
β”‚   β”œβ”€β”€ πŸ’Ύ Backup tasks
β”‚   β”œβ”€β”€ πŸ”„ Restore tasks
β”‚   β”œβ”€β”€ 🧹 Clear all dependencies
β”‚   β”œβ”€β”€ 🧹 Clear all subtasks (only)
β”‚   └── 🧹 Clear all tasks + related files
β”‚
└── πŸšͺ Exit
Enter fullscreen mode Exit fullscreen mode

πŸ—ΊοΈ Roadmap

  • [ ] Automatic dependency regeneration.
  • [ ] Ensure accuracy and consistency in tag application.

❀️ Acknowledgements & Contributing

This project would not have been possible without the TaskMaster AI team, as it is built entirely on their exceptional ecosystem.
We welcome contributions to improve the project! Whether you want to contribute to TaskMaster AI Core or TaskMaster CLI, feel free to make pull requests, report issues, or suggest new features.

For Developers

The following scripts are available for developing the CLI itself.

Start

  • πŸ“œ start - Run your application with bun.
  • πŸ“œ start:smol - Run your application with bun and a flag which configures the JavaScriptCore heap size to be smaller and grow slower.
  • πŸ“œ start:bin - Run your standalone binary app.

Clean

  • πŸ“œ clean - Remove coverage data, prod, build.

Development

  • πŸ“œ dev - Launch your application in development mode with bun.
  • πŸ“œ dev:watch - Interactive watch mode to automatically transpile source files with bun in development.
  • πŸ“œ dev:hot - Hot reloading of source files with bun in development.
  • πŸ“œ dev:smol:watch - Interactive watch mode to automatically transpile source files with bun in development, while using --smol flag.
  • πŸ“œ dev:smol:hot - Hot reloading source files with bun in development, while using --smol flag.

Build

  • πŸ“œ build - Transpile and bundle source files with bun.
  • πŸ“œ build:watch - Interactive watch mode to automatically transpile source files with bun.
  • πŸ“œ build:bin - bun's bundler implements a --compile flag for generating a standalone binary from a TypeScript or JavaScript file, use this in your production environment to ensure optimal execution of your app.

Testing

  • πŸ“œ test - Run bun test.
  • πŸ“œ test:watch - Interactive watch mode to automatically re-run tests with bun.

Linting and Formatting

  • πŸ“œ biome:start - Starts the Biome daemon server. You can specify a custom configuration file path using the --config-path option.
  • πŸ“œ biome:stop - Stops the Biome daemon server.
  • πŸ“œ biome:fix - Runs a source code check and applies automatic fixes (linter & formatter) according to the defined rules.
  • πŸ“œ biome:unsafe - Works like biome:fix, but may apply more invasive or risky changes.

Backup and Dependency Management

  • πŸ“œ backup - Backup files with Grunt.
  • πŸ“œ pkg-check - Check useless dependencies with depcheck.
  • πŸ“œ pkg-upgrade - Upgrade outdated dependencies (interactive mode) with npm-check-updates.

Versioning

  • πŸ“œ versioning - Start ungit server.

NPM Commands

  • πŸ“œ npm-version:major - Increments the major version number of your project using npm.
  • πŸ“œ npm-version:minor - Increments the minor version number of your project using npm.
  • πŸ“œ npm-version:patch - Increments the version patch number of your project using npm.
  • πŸ“œ npm-login - Login to a registry user account.
  • πŸ“œ npm-publish - Publish your npm package with public access.
  • πŸ“œ npm-unpublish - Forcefully unpublish the cli package from npm.
  • πŸ“œ npm-reset:registry - Delete the custom npm registry.
  • πŸ“œ npm-check:registry - Get the currently configured registry for npm.
  • πŸ“œ npm-proxy:start - Start a Verdaccio server with a local npm proxy.
  • πŸ“œ npm-proxy:set-registry - Set the npm registry to use a local proxy.
  • πŸ“œ npm-proxy:publish - Publish your npm package via the local proxy.
  • πŸ“œ npm-proxy:unpublish - Forcefully unpublish the cli package from the npm registry via the local proxy.
  • πŸ“œ npm-proxy:republish - Republish your npm package by first unpublishing it and then publishing it again via the local proxy.

NVM

  • πŸ“œ nvm - Manage multiple node.js versions. Easily switch between node versions per project to ensure compatibility.

Others

  • πŸ“œ qtype:tasks - Generate types for tasks.json file.

Build Target

The build configuration uses Node.js as the target (target: "node") with an appropriate shebang (#!/usr/bin/env node) to ensure maximum compatibility across different environments. This choice provides the best balance between performance and compatibility.

The CLI can be installed using any of the following package managers according to user preference:

  • npm: npm install -g @raja-rakoto/taskmaster-cli
  • pnpm: pnpm install -g @raja-rakoto/taskmaster-cli
  • bun: bun install -g @raja-rakoto/taskmaster-cli

Important note for local registry testing:
When testing the CLI with Verdaccio or a local registry, you may need to clear Bun's cache directories to avoid version conflicts. Delete the following directories:

~/.bun/_bun
~/.bun/install/cache/
Enter fullscreen mode Exit fullscreen mode

This ensures you're testing with the freshly published version rather than a cached one.

Top comments (0)