scpl-updated-mcp-server 1.0.3 → 1.0.4

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/index.js +33 -14
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -29,13 +29,19 @@ USAGE:
29
29
  npx scpl-updated-mcp-server [OPTIONS]
30
30
 
31
31
  OPTIONS:
32
- --setup Auto-install for Claude Code (recommended)
33
- --setup-codex Auto-install for OpenAI Codex CLI
34
- --help, -h Show this help message
32
+ --setup Auto-install for Claude Code
33
+ --setup-codex Auto-install for OpenAI Codex CLI (~/.codex)
34
+ --setup-codex=<dir> Auto-install for Codex forks with custom directory
35
+ --help, -h Show this help message
35
36
 
36
37
  EXAMPLES:
37
- npx scpl-updated-mcp-server --setup # Install for Claude Code
38
- npx scpl-updated-mcp-server --setup-codex # Install for Codex
38
+ npx scpl-updated-mcp-server --setup
39
+ npx scpl-updated-mcp-server --setup-codex
40
+ npx scpl-updated-mcp-server --setup-codex=~/.code
41
+ npx scpl-updated-mcp-server --setup-codex=/path/to/code_config
42
+
43
+ For Codex forks like just-every/code that use CODE_HOME or CODEX_HOME:
44
+ npx scpl-updated-mcp-server --setup-codex=$CODE_HOME
39
45
 
40
46
  After setup, restart your AI coding tool and ask:
41
47
  "Create a shortcut that starts a timer and plays a sound"
@@ -44,16 +50,29 @@ After setup, restart your AI coding tool and ask:
44
50
  }
45
51
 
46
52
  // ============================================================================
47
- // CODEX SETUP: Run with --setup-codex for OpenAI Codex CLI
53
+ // CODEX SETUP: Run with --setup-codex or --setup-codex=<dir>
48
54
  // ============================================================================
49
- if (process.argv.includes("--setup-codex")) {
50
- console.log("🚀 Setting up ScPL Shortcuts for Codex...\n");
55
+ const codexArg = process.argv.find(arg => arg.startsWith("--setup-codex"));
56
+ if (codexArg) {
57
+ // Check for custom directory: --setup-codex=/path/to/dir or --setup-codex=~/custom
58
+ let codexDir = join(homedir(), ".codex"); // default
59
+
60
+ if (codexArg.includes("=")) {
61
+ let customDir = codexArg.split("=")[1];
62
+ // Expand ~ to home directory
63
+ if (customDir.startsWith("~")) {
64
+ customDir = customDir.replace("~", homedir());
65
+ }
66
+ codexDir = customDir;
67
+ }
68
+
69
+ console.log(`🚀 Setting up ScPL Shortcuts for Codex at ${codexDir}...\n`);
51
70
 
52
- const codexConfigPath = join(homedir(), ".codex", "config.toml");
53
- const skillDir = join(homedir(), ".codex", "skills", "scpl-shortcuts");
71
+ const codexConfigPath = join(codexDir, "config.toml");
72
+ const skillDir = join(codexDir, "skills", "scpl-shortcuts");
54
73
 
55
- // Step 1: Add MCP server to ~/.codex/config.toml
56
- console.log("📝 Step 1: Adding MCP server to ~/.codex/config.toml...");
74
+ // Step 1: Add MCP server to config.toml
75
+ console.log(`📝 Step 1: Adding MCP server to ${codexConfigPath}...`);
57
76
  try {
58
77
  let config = "";
59
78
  if (existsSync(codexConfigPath)) {
@@ -84,8 +103,8 @@ startup_timeout_sec = 60.0
84
103
  `);
85
104
  }
86
105
 
87
- // Step 2: Install skill to ~/.codex/skills/scpl-shortcuts/
88
- console.log("📁 Step 2: Installing skill to ~/.codex/skills/scpl-shortcuts/...");
106
+ // Step 2: Install skill
107
+ console.log(`📁 Step 2: Installing skill to ${skillDir}...`);
89
108
  try {
90
109
  mkdirSync(skillDir, { recursive: true });
91
110
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scpl-updated-mcp-server",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "AI-powered Apple Shortcuts creation with Claude Code! Generate macOS shortcuts using natural language. 493 actions available. MCP server for text-based shortcut programming. Vibe code your automation workflows.",
5
5
  "type": "module",
6
6
  "main": "index.js",