scpl-updated-mcp-server 1.0.2 → 1.0.3

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 +75 -25
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -50,7 +50,7 @@ if (process.argv.includes("--setup-codex")) {
50
50
  console.log("🚀 Setting up ScPL Shortcuts for Codex...\n");
51
51
 
52
52
  const codexConfigPath = join(homedir(), ".codex", "config.toml");
53
- const agentsPath = join(homedir(), ".codex", "AGENTS.md");
53
+ const skillDir = join(homedir(), ".codex", "skills", "scpl-shortcuts");
54
54
 
55
55
  // Step 1: Add MCP server to ~/.codex/config.toml
56
56
  console.log("📝 Step 1: Adding MCP server to ~/.codex/config.toml...");
@@ -84,42 +84,92 @@ startup_timeout_sec = 60.0
84
84
  `);
85
85
  }
86
86
 
87
- // Step 2: Add instructions to AGENTS.md
88
- console.log("📁 Step 2: Adding skill instructions to AGENTS.md...");
87
+ // Step 2: Install skill to ~/.codex/skills/scpl-shortcuts/
88
+ console.log("📁 Step 2: Installing skill to ~/.codex/skills/scpl-shortcuts/...");
89
89
  try {
90
- let agents = "";
91
- if (existsSync(agentsPath)) {
92
- agents = readFileSync(agentsPath, "utf-8");
93
- }
90
+ mkdirSync(skillDir, { recursive: true });
94
91
 
95
- if (agents.includes("## ScPL Shortcuts")) {
96
- console.log(" ⏭️ Already in AGENTS.md, skipping...\n");
97
- } else {
98
- const agentBlock = `
92
+ const skillContent = `---
93
+ name: scpl-shortcuts
94
+ description: Create macOS Shortcuts using natural language. Use when users want to create, generate, or build Apple Shortcuts. Converts requests to ScPL code and generates .shortcut files.
95
+ metadata:
96
+ short-description: Create macOS Shortcuts with AI
97
+ ---
99
98
 
100
- ## ScPL Shortcuts
99
+ # ScPL Shortcuts Skill
101
100
 
102
- You have access to the ScPL MCP server with 493 actions for creating macOS Shortcuts.
101
+ Create macOS Shortcuts using natural language with 493 available actions.
102
+
103
+ ## MCP Tools Available
104
+
105
+ You have access to the \`scpl-shortcuts\` MCP server with these tools:
106
+
107
+ | Tool | Description |
108
+ |------|-------------|
109
+ | \`create_shortcut\` | Generate a .shortcut file from ScPL code |
110
+ | \`validate_scpl\` | Check if ScPL code is valid before creating |
111
+ | \`list_actions\` | Search available actions by category or keyword |
112
+
113
+ ## ScPL Syntax
103
114
 
104
- **Tools available:**
105
- - \`create_shortcut\` - Generate a .shortcut file from ScPL code
106
- - \`validate_scpl\` - Check if ScPL code is valid
107
- - \`list_actions\` - Search available actions
115
+ ScPL is line-based. Each line is an action. Parameters use \`key=value\` or \`key="value"\`.
108
116
 
109
- **ScPL syntax example:**
110
117
  \`\`\`scpl
111
- Text "Hello"
112
- AskLLM model="Apple Intelligence" prompt="Make it fun"
118
+ # Comments start with #
119
+ Text "Hello World"
113
120
  ShowResult
121
+
122
+ # Variables
123
+ Text "some value"
124
+ SetVariable v:myVar
125
+ ShowResult v:myVar
126
+
127
+ # AI actions
128
+ AskLLM model="Apple Intelligence" prompt="Summarize this"
129
+ AskChatGPT prompt="Explain this"
130
+ \`\`\`
131
+
132
+ ## Popular Actions by Category
133
+
134
+ **AI**: AskLLM, AskChatGPT, AskClaude
135
+ **Clock**: StartStopwatch, StopStopwatch, CreateAlarm
136
+ **Voice Memos**: CreateRecording, PlayRecording
137
+ **System**: SetDarkMode, TakeScreenshot, LockScreen
138
+ **Files**: GetFile, SaveFile, RenameFile, RevealInFinder
139
+ **Scripting**: RunShellScript, RunAppleScript, RunJavaScriptForAutomation
140
+ **Clipboard**: GetClipboard, SetClipboard
141
+
142
+ ## Workflow
143
+
144
+ 1. User describes what shortcut they want
145
+ 2. Use \`list_actions\` if you need to find specific actions
146
+ 3. Write ScPL code for the shortcut
147
+ 4. Use \`validate_scpl\` to check syntax
148
+ 5. Use \`create_shortcut\` to generate the .shortcut file
149
+ 6. Tell user to install via Shortcut Source Helper from RoutineHub
150
+
151
+ ## Example: Timer with Notification
152
+
153
+ \`\`\`scpl
154
+ # Start a 25-minute Pomodoro timer
155
+ StartTimer minutes=25
156
+ ShowAlert title="Timer Started" message="Focus for 25 minutes!"
114
157
  \`\`\`
115
158
 
116
- When user asks to create a shortcut, write ScPL code, validate it, then create the file.
159
+ ## Example: Clipboard AI Enhancement
160
+
161
+ \`\`\`scpl
162
+ GetClipboard
163
+ SetVariable v:text
164
+ AskChatGPT prompt="Improve this text: \\(v:text)"
165
+ SetClipboard
166
+ ShowAlert title="Done" message="Improved text copied!"
167
+ \`\`\`
117
168
  `;
118
- writeFileSync(agentsPath, agents + agentBlock);
119
- console.log(" ✅ Instructions added!\n");
120
- }
169
+ writeFileSync(join(skillDir, "SKILL.md"), skillContent);
170
+ console.log(" ✅ Skill installed!\n");
121
171
  } catch (error) {
122
- console.error(" ❌ Failed to update AGENTS.md:", error.message, "\n");
172
+ console.error(" ❌ Failed to install skill:", error.message, "\n");
123
173
  }
124
174
 
125
175
  console.log("🎉 Setup complete! Restart Codex to use the shortcuts tools.\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scpl-updated-mcp-server",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
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",