@hasna/todos 0.9.50 → 0.9.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli/index.js +17 -23
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -14113,32 +14113,26 @@ function writeTomlFile(path, content) {
14113
14113
  writeFileSync3(path, content);
14114
14114
  }
14115
14115
  function registerClaude(binPath, global) {
14116
- const configPath = global ? join7(HOME2, ".claude", ".mcp.json") : join7(process.cwd(), ".mcp.json");
14117
- const config = readJsonFile2(configPath);
14118
- if (!config["mcpServers"]) {
14119
- config["mcpServers"] = {};
14116
+ const scope = global ? "user" : "project";
14117
+ const cmd = `claude mcp add --transport stdio --scope ${scope} todos -- ${binPath}`;
14118
+ try {
14119
+ const { execSync: execSync2 } = __require("child_process");
14120
+ execSync2(cmd, { stdio: "pipe" });
14121
+ console.log(chalk.green(`Claude Code (${scope}): registered via 'claude mcp add'`));
14122
+ } catch {
14123
+ console.log(chalk.yellow(`Claude Code: could not auto-register. Run this command manually:`));
14124
+ console.log(chalk.cyan(` ${cmd}`));
14120
14125
  }
14121
- const servers = config["mcpServers"];
14122
- servers["todos"] = {
14123
- command: binPath,
14124
- args: []
14125
- };
14126
- writeJsonFile2(configPath, config);
14127
- const scope = global ? "global" : "project";
14128
- console.log(chalk.green(`Claude Code (${scope}): registered in ${configPath}`));
14129
14126
  }
14130
- function unregisterClaude(global) {
14131
- const configPath = global ? join7(HOME2, ".claude", ".mcp.json") : join7(process.cwd(), ".mcp.json");
14132
- const config = readJsonFile2(configPath);
14133
- const servers = config["mcpServers"];
14134
- if (!servers || !("todos" in servers)) {
14135
- console.log(chalk.dim(`Claude Code: todos not found in ${configPath}`));
14136
- return;
14127
+ function unregisterClaude(_global) {
14128
+ try {
14129
+ const { execSync: execSync2 } = __require("child_process");
14130
+ execSync2("claude mcp remove todos", { stdio: "pipe" });
14131
+ console.log(chalk.green(`Claude Code: removed todos MCP server`));
14132
+ } catch {
14133
+ console.log(chalk.yellow(`Claude Code: could not auto-remove. Run manually:`));
14134
+ console.log(chalk.cyan(" claude mcp remove todos"));
14137
14135
  }
14138
- delete servers["todos"];
14139
- writeJsonFile2(configPath, config);
14140
- const scope = global ? "global" : "project";
14141
- console.log(chalk.green(`Claude Code (${scope}): unregistered from ${configPath}`));
14142
14136
  }
14143
14137
  function registerCodex(binPath) {
14144
14138
  const configPath = join7(HOME2, ".codex", "config.toml");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/todos",
3
- "version": "0.9.50",
3
+ "version": "0.9.51",
4
4
  "description": "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",