원클릭으로
api
Control the Strudel REPL via REST APIs. Use when you need to push code, start/stop playback, or check status.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Control the Strudel REPL via REST APIs. Use when you need to push code, start/stop playback, or check status.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Create full arranged tracks with timeline structure. Use when user asks to "compose", "create a track", "make a song", or specifies a duration.
Create and perform automated DJ sets with Strudel. Use when the user asks for a "set", "DJ set", "live performance", "mix", or wants music that evolves over time.
Interactive music creation mode. Use when the user wants to be guided through creating music with prompts and options at each step.
Create music with Strudel live coding syntax. Use when the user asks to play a song, make music, create beats, patterns, or sounds.
Learn Strudel step by step. Use when the user wants to learn live coding, understand the syntax, or improve their skills.
Add psychedelic visual feedback to Strudel patterns. Use when you want trippy, colorful, or informative visualizations.
| name | api |
| description | Control the Strudel REPL via REST APIs. Use when you need to push code, start/stop playback, or check status. |
| allowed-tools | Bash(curl *) |
Talk to the REPL at http://localhost:3000.
| Endpoint | Method | What it does |
|---|---|---|
/api/code | POST | Push new code |
/api/code | GET | Read current code |
/api/play | POST | Start playback |
/api/stop | POST | Stop playback |
/api/status | GET | Get current state |
/api/events | GET | SSE stream (real-time updates) |
Real-time sync: The browser connects to /api/events via Server-Sent Events. When you push code or trigger play/stop, the browser updates automatically.
curl -X POST http://localhost:3000/api/code \
-H "Content-Type: application/json" \
-d '{"code": "YOUR_CODE_HERE"}'
The API uses JSON.parse(). Invalid escape sequences will cause 500 errors.
Valid JSON escapes (these work):
| Escape | Meaning |
|---|---|
\" | Double quote |
\\ | Backslash |
\n | Newline |
\t | Tab |
\r | Carriage return |
\/ | Forward slash |
Invalid escapes (these BREAK the API):
\x, \a, \s, \d, \w, or any backslash + letter not in the table aboveExamples:
# ✅ GOOD - properly escaped
curl -X POST http://localhost:3000/api/code \
-H "Content-Type: application/json" \
-d '{"code": "$: s(\"bd sd hh hh\")"}'
# ❌ BAD - \s is not a valid JSON escape
curl -X POST http://localhost:3000/api/code \
-H "Content-Type: application/json" \
-d '{"code": "$: s(\"bd\sd\")"}'
Rule of thumb: If you need a literal backslash in the code, escape it as \\
curl -X POST http://localhost:3000/api/play
curl -X POST http://localhost:3000/api/stop
That's it. The REPL handles the rest.
curl -X POST http://localhost:3000/api/code \
-H "Content-Type: application/json" \
-d '{"code": "setcpm(130/4)\n\n$: s(\"bd*4, hh*8\").bank(\"RolandTR909\")\n\n$: note(\"<c2 g1 ab1 bb1>\").s(\"sawtooth\").lpf(400)"}'