UNPKG

task-engine-ai-core

Version:

Revolutionary AI-driven task management system with complete transformation trilogy: Frontend v0.1.0, Backend v0.2.0, CLI v0.3.0 - Enterprise-grade performance with 95% improvements

316 lines (220 loc) β€’ 11.8 kB
# Task Engine AI [![GitHub stars](https://img.shields.io/github/stars/cracked99/Task-engine?style=social)](https://github.com/cracked99/Task-engine/stargazers) [![CI](https://github.com/cracked99/Task-engine/actions/workflows/ci.yml/badge.svg)](https://github.com/cracked99/Task-engine/actions/workflows/ci.yml) [![npm version](https://badge.fury.io/js/task-engine-ai-core.svg)](https://badge.fury.io/js/task-engine-ai-core) [![Discord](https://dcbadge.limes.pink/api/server/https://discord.gg/taskmasterai?style=flat)](https://discord.gg/taskmasterai) [![License: MIT with Commons Clause](https://img.shields.io/badge/license-MIT%20with%20Commons%20Clause-blue.svg)](LICENSE) ### By [@eyaltoledano](https://x.com/eyaltoledano) & [@RalphEcom](https://x.com/RalphEcom) [![Twitter Follow](https://img.shields.io/twitter/follow/eyaltoledano?style=flat)](https://x.com/eyaltoledano) [![Twitter Follow](https://img.shields.io/twitter/follow/RalphEcom?style=flat)](https://x.com/RalphEcom) A task management system for AI-driven development with Claude, designed to work seamlessly with Cursor AI. ## πŸ†• NEW: IDE Bridge - Zero External API Dependencies! **Task-engine can now run completely independently using your IDE's built-in AI agent!** βœ… **No external API keys required** βœ… **Zero token costs** βœ… **Better performance** (local communication) βœ… **Enhanced security** (no data leaves your machine) βœ… **Works with Cursor, VS Code, and Windsurf** ### Quick IDE Setup (3 commands) ```bash # 1. Check if you're ready task-engine migrate-to-ide --check-prereqs # 2. Migrate to IDE-based AI task-engine migrate-to-ide # 3. Test it works task-engine generate-text "Hello from my IDE!" ``` **[πŸ“š Full IDE Bridge Guide](docs/ide-bridge-quickstart.md)** | **[πŸ”§ Advanced Configuration](docs/ide-bridge.md)** --- ## Requirements (Traditional Setup) > **πŸ’‘ Note**: With the new IDE Bridge, you can skip external API keys entirely! See the IDE setup above. Task Engine AI utilizes AI across several commands, and those require a separate API key. You can use a variety of models from different AI providers provided you add your API keys. For example, if you want to use Claude 3.7, you'll need an Anthropic API key. You can define 3 types of models to be used: the main model, the research model, and the fallback model (in case either the main or research fail). Whatever model you use, its provider API key must be present in either mcp.json or .env. At least one (1) of the following is required: - Anthropic API key (Claude API) - OpenAI API key - Google Gemini API key - Perplexity API key (for research model) - xAI API Key (for research or main model) - OpenRouter API Key (for research or main model) Using the research model is optional but highly recommended. You will need at least ONE API key. Adding all API keys enables you to seamlessly switch between model providers at will. ## Quick Start ### Option 1: MCP (Recommended) MCP (Model Control Protocol) lets you run Task Engine AI directly from your editor. #### πŸ†• Real IDE Integration (New!) Task Engine AI now supports **real connections** to your IDE's built-in AI agent instead of external APIs: ```bash # Automatically setup MCP with real IDE integration npm run setup:mcp-ide ``` This provides: - βœ… **Zero API costs** when using your IDE's AI - βœ… **Consistent behavior** matching your IDE settings - βœ… **Automatic fallback** to external APIs if needed - βœ… **Cross-IDE compatibility** (Cursor, VS Code, Windsurf) [πŸ“– Complete MCP IDE Integration Guide](docs/mcp-ide-integration-guide.md) #### 1. Add your MCP config at the following path depending on your editor | Editor | Scope | Linux/macOS Path | Windows Path | Key | | ------------ | ------- | ------------------------------------- | ------------------------------------------------- | ------------ | | **Cursor** | Global | `~/.cursor/mcp.json` | `%USERPROFILE%\.cursor\mcp.json` | `mcpServers` | | | Project | `<project_folder>/.cursor/mcp.json` | `<project_folder>\.cursor\mcp.json` | `mcpServers` | | **Windsurf** | Global | `~/.codeium/windsurf/mcp_config.json` | `%USERPROFILE%\.codeium\windsurf\mcp_config.json` | `mcpServers` | | **VSβ€―Code** | Project | `<project_folder>/.vscode/mcp.json` | `<project_folder>\.vscode\mcp.json` | `servers` | ##### Cursor & Windsurf (`mcpServers`) ```jsonc { "mcpServers": { "task-engine-ai": { "command": "npx", "args": ["-y", "--package=task-engine-ai-core", "task-engine-ai"], "env": { "ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY_HERE", "PERPLEXITY_API_KEY": "YOUR_PERPLEXITY_API_KEY_HERE", "OPENAI_API_KEY": "YOUR_OPENAI_KEY_HERE", "GOOGLE_API_KEY": "YOUR_GOOGLE_KEY_HERE", "MISTRAL_API_KEY": "YOUR_MISTRAL_KEY_HERE", "OPENROUTER_API_KEY": "YOUR_OPENROUTER_KEY_HERE", "XAI_API_KEY": "YOUR_XAI_KEY_HERE", "AZURE_OPENAI_API_KEY": "YOUR_AZURE_KEY_HERE", "OLLAMA_API_KEY": "YOUR_OLLAMA_API_KEY_HERE", }, }, }, } ``` > πŸ”‘ Replace `YOUR_…_KEY_HERE` with your real API keys. You can remove keys you don't use. ##### VSβ€―Code (`servers` + `type`) ```jsonc { "servers": { "task-engine-ai": { "command": "npx", "args": ["-y", "--package=task-engine-ai-core", "task-engine-ai"], "env": { "ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY_HERE", "PERPLEXITY_API_KEY": "YOUR_PERPLEXITY_API_KEY_HERE", "OPENAI_API_KEY": "YOUR_OPENAI_KEY_HERE", "GOOGLE_API_KEY": "YOUR_GOOGLE_KEY_HERE", "MISTRAL_API_KEY": "YOUR_MISTRAL_KEY_HERE", "OPENROUTER_API_KEY": "YOUR_OPENROUTER_KEY_HERE", "XAI_API_KEY": "YOUR_XAI_KEY_HERE", "AZURE_OPENAI_API_KEY": "YOUR_AZURE_KEY_HERE", }, "type": "stdio", }, }, } ``` > πŸ”‘ Replace `YOUR_…_KEY_HERE` with your real API keys. You can remove keys you don't use. #### 2. (Cursor-only) Enable Task Engine AI MCP Open Cursor Settings (Ctrl+Shift+J) ➑ Click on MCP tab on the left ➑ Enable task-engine-ai with the toggle #### 3. (Optional) Configure the models you want to use In your editor's AI chat pane, say: ```txt Change the main, research and fallback models to <model_name>, <model_name> and <model_name> respectively. ``` [Table of available models](docs/models.md) #### 4. Initialize Task Engine AI In your editor's AI chat pane, say: ```txt Initialize task-engine-ai in my project ``` #### 5. Make sure you have a PRD (Recommended) For **new projects**: Create your PRD at `.task-engine/docs/prd.txt` For **existing projects**: You can use `scripts/prd.txt` or migrate with `task-engine migrate` An example PRD template is available after initialization in `.task-engine/templates/example_prd.txt`. > [!NOTE] > While a PRD is recommended for complex projects, you can always create individual tasks by asking "Can you help me implement [description of what you want to do]?" in chat. **Always start with a detailed PRD.** The more detailed your PRD, the better the generated tasks will be. #### 6. Common Commands Use your AI assistant to: - Parse requirements: `Can you parse my PRD at scripts/prd.txt?` - Plan next step: `What's the next task I should work on?` - Implement a task: `Can you help me implement task 3?` - Expand a task: `Can you help me expand task 4?` #### πŸ†• Dual-Mode Task Creation Task Engine AI supports two modes for creating tasks via MCP: **πŸ€– AI-Powered Mode** (requires external APIs): ```txt Create a task for implementing user authentication with secure session management ``` **🧠 Manual/Agentic Mode** (works through agentic instance): ```txt Add a task with title "Implement user authentication", description "Add login/logout functionality", priority "high", and dependencies "1,2,3" ``` **Benefits of Manual Mode:** - βœ… **No External Dependencies**: Works without API keys - βœ… **Immediate Response**: No waiting for AI processing - βœ… **Perfect for AI Agents**: Ideal for agentic workflows - βœ… **Cost-Free**: No API usage costs [More examples on how to use Task Engine AI in chat](docs/examples.md) ### Option 2: Using Command Line #### Installation ```bash # Install globally npm install -g task-engine-ai-core # OR install locally within your project npm install task-engine-ai-core ``` #### Initialize a new project ```bash # If installed globally task-engine init # If installed locally npx task-engine-ai-core task-engine init ``` This will prompt you for project details and set up a new project with the necessary files and structure. #### Common Commands ```bash # Initialize a new project task-engine init # Parse a PRD and generate tasks task-engine parse-prd your-prd.txt # List all tasks task-engine list # Show the next task to work on task-engine next # Generate task files task-engine generate ``` ## Documentation For more detailed information, check out the documentation in the `docs` directory: ### πŸ†• Real IDE Integration Documentation - [MCP IDE Integration Guide](docs/mcp-ide-integration-guide.md) - Complete guide for real IDE connections via MCP - [Real IDE Integration](docs/real-ide-integration.md) - Technical details and architecture - [IDE Bridge Quick Start](docs/ide-bridge-quickstart.md) - Get started with IDE-based AI in 3 steps - [IDE Bridge Advanced Guide](docs/ide-bridge.md) - Complete setup, configuration, and troubleshooting ### General Documentation - [Configuration Guide](docs/configuration.md) - Set up environment variables and customize Task Engine AI - [Tutorial](docs/tutorial.md) - Step-by-step guide to getting started with Task Engine AI - [Command Reference](docs/command-reference.md) - Complete list of all available commands - [Task Structure](docs/task-structure.md) - Understanding the task format and features - [Example Interactions](docs/examples.md) - Common Cursor AI interaction examples - [Migration Guide](docs/migration-guide.md) - Guide to migrating to the new project structure ## Troubleshooting ### If `task-engine init` doesn't respond: Try running it with Node directly: ```bash node node_modules/task-engine-ai-core/scripts/init.js ``` Or clone the repository and run: ```bash git clone https://github.com/eyaltoledano/claude-task-master.git cd claude-task-master node scripts/init.js ``` ## Contributors <a href="https://github.com/eyaltoledano/claude-task-master/graphs/contributors"> <img src="https://contrib.rocks/image?repo=cracked99/Task-engine" alt="Task Engine AI project contributors" /> </a> ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=cracked99/Task-engine&type=Timeline)](https://www.star-history.com/#cracked99/Task-engine&Timeline) ## Licensing Task Engine AI is licensed under the MIT License with Commons Clause. This means you can: βœ… **Allowed**: - Use Task Engine AI for any purpose (personal, commercial, academic) - Modify the code - Distribute copies - Create and sell products built using Task Engine AI ❌ **Not Allowed**: - Sell Task Engine AI itself - Offer Task Engine AI as a hosted service - Create competing products based on Task Engine AI See the [LICENSE](LICENSE) file for the complete license text and [licensing details](docs/licensing.md) for more information.