makaron-cli 0.5.2 → 0.5.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.
- package/README.md +55 -1
- package/SKILL.md +53 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Makaron CLI — Agent Integration Skill
|
|
2
2
|
|
|
3
|
+
> **makaron.app** is for humans. **makaron-cli** is for AI agents.
|
|
4
|
+
|
|
3
5
|
Makaron is a multimodal AI creative agent. You talk to it via `makaron chat`, and it produces images, videos, music, and animated designs — all saved to a persistent project.
|
|
4
6
|
|
|
5
7
|
## Setup
|
|
@@ -7,12 +9,23 @@ Makaron is a multimodal AI creative agent. You talk to it via `makaron chat`, an
|
|
|
7
9
|
```bash
|
|
8
10
|
npm install -g makaron-cli
|
|
9
11
|
# or use directly: npx makaron-cli
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### Get your API key
|
|
15
|
+
|
|
16
|
+
1. Go to [makaron.app](https://makaron.app) and log in
|
|
17
|
+
2. Open the menu (top-right)
|
|
18
|
+
3. Click **Get API Key**
|
|
19
|
+
4. Copy your `mk_live_...` key
|
|
10
20
|
|
|
21
|
+
```bash
|
|
11
22
|
export MAKARON_API_KEY=mk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
12
23
|
```
|
|
13
24
|
|
|
14
25
|
Verify: `npx makaron-cli list` should show projects.
|
|
15
26
|
|
|
27
|
+
> **Agent Self-Registration**: Coming soon — agents will be able to register and obtain API keys programmatically without human login.
|
|
28
|
+
|
|
16
29
|
## Core Workflow
|
|
17
30
|
|
|
18
31
|
```bash
|
|
@@ -181,11 +194,52 @@ type MakaronOutput =
|
|
|
181
194
|
| Add/remove elements | "add a cat on the table" / "remove background person" |
|
|
182
195
|
| Text-to-image | "generate a cyberpunk cityscape" |
|
|
183
196
|
| Video from image | "create a 5 second video of her walking" |
|
|
184
|
-
| Video with model | "
|
|
197
|
+
| Video with model | "use seedance model, make a 5s video" |
|
|
185
198
|
| Background music | "add calm piano music" |
|
|
186
199
|
| Motion design | "create an Instagram story with animated text" |
|
|
187
200
|
| Multi-step | "edit the photo then make a video from it" |
|
|
188
201
|
|
|
202
|
+
## Recommended Pattern: Service Flow (Feishu/OpenClaw/Group Chat)
|
|
203
|
+
|
|
204
|
+
When serving end-users in a chat environment (Feishu, Slack, Discord), use this proactive message pattern:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# 1. Immediately acknowledge the user
|
|
208
|
+
send_message "Got it! Working on it now..."
|
|
209
|
+
|
|
210
|
+
# 2. Create project + submit (one command)
|
|
211
|
+
RUN_ID=$(npx makaron-cli chat --project auto --image photo.jpg -b "make it cinematic and create a 5s video")
|
|
212
|
+
|
|
213
|
+
# 3. Send project link proactively
|
|
214
|
+
PROJECT_URL=$(npx makaron-cli responses get $RUN_ID --pick project_url)
|
|
215
|
+
send_message "Project created: $PROJECT_URL"
|
|
216
|
+
|
|
217
|
+
# 4. Watch and send each artifact as it appears
|
|
218
|
+
npx makaron-cli responses watch $RUN_ID --jsonl | while read -r line; do
|
|
219
|
+
EVENT=$(echo "$line" | jq -r '.event')
|
|
220
|
+
TYPE=$(echo "$line" | jq -r '.item.type // empty')
|
|
221
|
+
URL=$(echo "$line" | jq -r '.item.url // empty')
|
|
222
|
+
STATUS=$(echo "$line" | jq -r '.item.status // empty')
|
|
223
|
+
|
|
224
|
+
if [ "$EVENT" = "output.added" ] && [ "$TYPE" = "image" ]; then
|
|
225
|
+
# Send image immediately as media (not just link)
|
|
226
|
+
send_image "$URL"
|
|
227
|
+
elif [ "$EVENT" = "output.updated" ] && [ "$TYPE" = "video" ] && [ "$STATUS" = "completed" ]; then
|
|
228
|
+
# Video ready — send as media
|
|
229
|
+
send_video "$URL"
|
|
230
|
+
elif [ "$EVENT" = "done" ]; then
|
|
231
|
+
send_message "All done!"
|
|
232
|
+
fi
|
|
233
|
+
done
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
**Key principles for service agents:**
|
|
237
|
+
- **Proactive, not reactive**: Don't wait for the full run to finish. Send progress messages and artifacts as they appear.
|
|
238
|
+
- **Media over links**: When possible, send images/videos as native media in the chat (download URL and upload as attachment), not just paste the URL.
|
|
239
|
+
- **Immediate acknowledgment**: Reply within 1 second of receiving user request. Don't make users wait for project creation.
|
|
240
|
+
- **Project link early**: Send the project URL right after creation so users can check anytime.
|
|
241
|
+
- **Stream artifacts**: Use `watch --jsonl` to push each artifact the moment it's ready. An image at 15s should reach the user at 15s, not after the video finishes at 5 minutes.
|
|
242
|
+
|
|
189
243
|
## Important Notes
|
|
190
244
|
|
|
191
245
|
- One project = one conversation thread. All history is preserved.
|
package/SKILL.md
CHANGED
|
@@ -5,16 +5,27 @@ description: Use Makaron CLI to generate AI images, videos, music, and motion de
|
|
|
5
5
|
|
|
6
6
|
# Makaron CLI — Agent Integration Skill
|
|
7
7
|
|
|
8
|
+
> **makaron.app** is for humans. **makaron-cli** is for AI agents.
|
|
9
|
+
|
|
8
10
|
Makaron is a multimodal AI creative agent. You talk to it via `makaron chat`, and it produces images, videos, music, and animated designs — all saved to a persistent project.
|
|
9
11
|
|
|
10
12
|
## Setup
|
|
11
13
|
|
|
14
|
+
### Get your API key
|
|
15
|
+
|
|
16
|
+
1. Go to [makaron.app](https://makaron.app) and log in
|
|
17
|
+
2. Open the menu (top-right)
|
|
18
|
+
3. Click **Get API Key**
|
|
19
|
+
4. Copy your `mk_live_...` key
|
|
20
|
+
|
|
12
21
|
```bash
|
|
13
22
|
export MAKARON_API_KEY=mk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
14
23
|
```
|
|
15
24
|
|
|
16
25
|
Verify: `npx makaron-cli list` should show projects.
|
|
17
26
|
|
|
27
|
+
> **Agent Self-Registration**: Coming soon — agents will be able to register and obtain API keys programmatically without human login.
|
|
28
|
+
|
|
18
29
|
## Core Workflow
|
|
19
30
|
|
|
20
31
|
```bash
|
|
@@ -183,11 +194,52 @@ type MakaronOutput =
|
|
|
183
194
|
| Add/remove elements | "add a cat on the table" / "remove background person" |
|
|
184
195
|
| Text-to-image | "generate a cyberpunk cityscape" |
|
|
185
196
|
| Video from image | "create a 5 second video of her walking" |
|
|
186
|
-
| Video with model | "
|
|
197
|
+
| Video with model | "use seedance model, make a 5s video" |
|
|
187
198
|
| Background music | "add calm piano music" |
|
|
188
199
|
| Motion design | "create an Instagram story with animated text" |
|
|
189
200
|
| Multi-step | "edit the photo then make a video from it" |
|
|
190
201
|
|
|
202
|
+
## Recommended Pattern: Service Flow (Feishu/OpenClaw/Group Chat)
|
|
203
|
+
|
|
204
|
+
When serving end-users in a chat environment (Feishu, Slack, Discord), use this proactive message pattern:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# 1. Immediately acknowledge the user
|
|
208
|
+
send_message "Got it! Working on it now..."
|
|
209
|
+
|
|
210
|
+
# 2. Create project + submit (one command)
|
|
211
|
+
RUN_ID=$(npx makaron-cli chat --project auto --image photo.jpg -b "make it cinematic and create a 5s video")
|
|
212
|
+
|
|
213
|
+
# 3. Send project link proactively
|
|
214
|
+
PROJECT_URL=$(npx makaron-cli responses get $RUN_ID --pick project_url)
|
|
215
|
+
send_message "Project created: $PROJECT_URL"
|
|
216
|
+
|
|
217
|
+
# 4. Watch and send each artifact as it appears
|
|
218
|
+
npx makaron-cli responses watch $RUN_ID --jsonl | while read -r line; do
|
|
219
|
+
EVENT=$(echo "$line" | jq -r '.event')
|
|
220
|
+
TYPE=$(echo "$line" | jq -r '.item.type // empty')
|
|
221
|
+
URL=$(echo "$line" | jq -r '.item.url // empty')
|
|
222
|
+
STATUS=$(echo "$line" | jq -r '.item.status // empty')
|
|
223
|
+
|
|
224
|
+
if [ "$EVENT" = "output.added" ] && [ "$TYPE" = "image" ]; then
|
|
225
|
+
# Send image immediately as media (not just link)
|
|
226
|
+
send_image "$URL"
|
|
227
|
+
elif [ "$EVENT" = "output.updated" ] && [ "$TYPE" = "video" ] && [ "$STATUS" = "completed" ]; then
|
|
228
|
+
# Video ready — send as media
|
|
229
|
+
send_video "$URL"
|
|
230
|
+
elif [ "$EVENT" = "done" ]; then
|
|
231
|
+
send_message "All done!"
|
|
232
|
+
fi
|
|
233
|
+
done
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
**Key principles for service agents:**
|
|
237
|
+
- **Proactive, not reactive**: Don't wait for the full run to finish. Send progress messages and artifacts as they appear.
|
|
238
|
+
- **Media over links**: When possible, send images/videos as native media in the chat (download URL and upload as attachment), not just paste the URL.
|
|
239
|
+
- **Immediate acknowledgment**: Reply within 1 second of receiving user request. Don't make users wait for project creation.
|
|
240
|
+
- **Project link early**: Send the project URL right after creation so users can check anytime.
|
|
241
|
+
- **Stream artifacts**: Use `watch --jsonl` to push each artifact the moment it's ready. An image at 15s should reach the user at 15s, not after the video finishes at 5 minutes.
|
|
242
|
+
|
|
191
243
|
## Important Notes
|
|
192
244
|
|
|
193
245
|
- One project = one conversation thread. All history is preserved.
|