Compare commits

..

2 Commits

Author SHA1 Message Date
Ralph Khreish
879409ac66 feat: improve tm init 2025-04-16 14:51:02 +02:00
Ralph Khreish
d9296614f8 chore: fix weird bug where package.json is not upgrading its version based on current package version 2025-04-16 14:48:20 +02:00
8 changed files with 37 additions and 43 deletions

View File

@@ -1,5 +0,0 @@
---
'task-master-ai': minor
---
Add `npx task-master-ai` that runs mcp instead of using `task-master-mcp``

View File

@@ -1,5 +0,0 @@
---
'task-master-ai': patch
---
Fixed a bug that prevented the task-master from running in a Linux container

View File

@@ -146,7 +146,7 @@ To enable enhanced task management capabilities directly within Cursor using the
4. Configure with the following details:
- Name: "Task Master"
- Type: "Command"
- Command: "npx -y task-master-ai"
- Command: "npx -y task-master-mcp"
5. Save the settings
Once configured, you can interact with Task Master's task management commands directly through Cursor's interface, providing a more integrated experience.

View File

@@ -20,14 +20,20 @@ A task management system for AI-driven development with Claude, designed to work
MCP (Model Control Protocol) provides the easiest way to get started with Task Master directly in your editor.
1. **Add the MCP config to your editor** (Cursor recommended, but it works with other text editors):
1. **Install the package**
```bash
npm i -g task-master-ai
```
2. **Add the MCP config to your editor** (Cursor recommended, but it works with other text editors):
```json
{
"mcpServers": {
"taskmaster-ai": {
"command": "npx",
"args": ["-y", "task-master-ai"],
"args": ["-y", "task-master-mcp"],
"env": {
"ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY_HERE",
"PERPLEXITY_API_KEY": "YOUR_PERPLEXITY_API_KEY_HERE",

View File

@@ -10,14 +10,20 @@ There are two ways to set up Task Master: using MCP (recommended) or via npm ins
MCP (Model Control Protocol) provides the easiest way to get started with Task Master directly in your editor.
1. **Add the MCP config to your editor** (Cursor recommended, but it works with other text editors):
1. **Install the package**
```bash
npm i -g task-master-ai
```
2. **Add the MCP config to your editor** (Cursor recommended, but it works with other text editors):
```json
{
"mcpServers": {
"taskmaster-ai": {
"command": "npx",
"args": ["-y", "task-master-ai"],
"args": ["-y", "task-master-mcp"],
"env": {
"ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY_HERE",
"PERPLEXITY_API_KEY": "YOUR_PERPLEXITY_API_KEY_HERE",

View File

@@ -46,18 +46,22 @@ export const initProject = async (options = {}) => {
};
// Export a function to run init as a CLI command
export const runInitCLI = async (options = {}) => {
try {
const init = await import('./scripts/init.js');
const result = await init.initializeProject(options);
return result;
} catch (error) {
console.error('Initialization failed:', error.message);
if (process.env.DEBUG === 'true') {
console.error('Debug stack trace:', error.stack);
}
throw error; // Re-throw to be handled by the command handler
}
export const runInitCLI = async () => {
// Using spawn to ensure proper handling of stdio and process exit
const child = spawn('node', [resolve(__dirname, './scripts/init.js')], {
stdio: 'inherit',
cwd: process.cwd()
});
return new Promise((resolve, reject) => {
child.on('close', (code) => {
if (code === 0) {
resolve();
} else {
reject(new Error(`Init script exited with code ${code}`));
}
});
});
};
// Export version information
@@ -75,21 +79,11 @@ if (import.meta.url === `file://${process.argv[1]}`) {
program
.command('init')
.description('Initialize a new project')
.option('-y, --yes', 'Skip prompts and use default values')
.option('-n, --name <n>', 'Project name')
.option('-d, --description <description>', 'Project description')
.option('-v, --version <version>', 'Project version', '0.1.0')
.option('-a, --author <author>', 'Author name')
.option('--skip-install', 'Skip installing dependencies')
.option('--dry-run', 'Show what would be done without making changes')
.option('--aliases', 'Add shell aliases (tm, taskmaster)')
.action(async (cmdOptions) => {
try {
await runInitCLI(cmdOptions);
} catch (err) {
.action(() => {
runInitCLI().catch((err) => {
console.error('Init failed:', err.message);
process.exit(1);
}
});
});
program

1
package-lock.json generated
View File

@@ -31,7 +31,6 @@
},
"bin": {
"task-master": "bin/task-master.js",
"task-master-ai": "mcp-server/server.js",
"task-master-mcp": "mcp-server/server.js"
},
"devDependencies": {

View File

@@ -6,8 +6,7 @@
"type": "module",
"bin": {
"task-master": "bin/task-master.js",
"task-master-mcp": "mcp-server/server.js",
"task-master-ai": "mcp-server/server.js"
"task-master-mcp": "mcp-server/server.js"
},
"scripts": {
"test": "node --experimental-vm-modules node_modules/.bin/jest",