@powerformer/refly-cli 0.1.22 → 0.1.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerformer/refly-cli",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "description": "Refly CLI - Command-line interface for Refly workflow orchestration",
5
5
  "bin": {
6
6
  "refly": "./dist/bin/refly.js"
package/skill/SKILL.md CHANGED
@@ -1,11 +1,6 @@
1
1
  ---
2
2
  name: refly
3
- description: |
4
- Base skill for Refly ecosystem: creates, discovers, and runs domain-specific skills bound to workflows.
5
- Routes user intent to matching domain skills via symlinks in ~/.claude/skills/, delegates execution to Refly backend.
6
- Use when user asks to: create skills, run workflows, automate multi-step tasks, or manage pipelines.
7
- Triggers: refly, skill, workflow, run skill, create skill, automation, pipeline.
8
- Requires: @refly/cli installed and authenticated.
3
+ description: "Base skill for Refly ecosystem: creates, discovers, and runs domain-specific skills bound to workflows. Routes user intent to matching domain skills via symlinks, delegates execution to Refly backend. Use when user asks to: create skills, run workflows, automate multi-step tasks, or manage pipelines. Triggers: refly, skill, workflow, run skill, create skill, automation, pipeline. Requires: @refly/cli installed and authenticated."
9
4
  ---
10
5
 
11
6
  # Refly
@@ -18,17 +13,123 @@ description: |
18
13
  4. **No tokens** - Never print or request auth tokens.
19
14
  5. **Stop on error** - If `ok=false`, stop and show `hint`.
20
15
 
21
- ## Quick Commands
16
+ ## Available Commands
17
+
18
+ | Command | ID Format | Description |
19
+ |---------|-----------|-------------|
20
+ | `refly status` | - | Check authentication and connection status |
21
+ | `refly login` | - | Authenticate with Refly |
22
+ | `refly skill list` | - | List all available skills in the marketplace |
23
+ | `refly skill installations` | - | List your installed skills (get installationId here) |
24
+ | `refly skill run --id <installationId> --input '<json>'` | skpi-xxx | Run an installed skill, returns runId (we-xxx) |
25
+ | `refly workflow status <runId> --watch` | we-xxx | Watch workflow execution status |
26
+ | `refly workflow detail <runId>` | we-xxx | Get workflow run details |
27
+ | `refly workflow toolcalls <runId> --files --latest` | we-xxx | Get files from latest toolcall |
28
+ | `refly file download <fileId> -o <path>` | df-xxx | Download a file |
29
+
30
+ **Tip**: Get `installationId` (skpi-xxx) from `refly skill installations`.
31
+
32
+ ### Command Options
33
+
34
+ | Command | Option | Description |
35
+ |---------|--------|-------------|
36
+ | `workflow status` | `--watch` | Poll until workflow completes |
37
+ | `workflow status` | `--interval <ms>` | Polling interval in milliseconds (default: 5000) |
38
+ | `workflow toolcalls` | `--files` | Return simplified output with only files and content |
39
+ | `workflow toolcalls` | `--latest` | With `--files`, return only files from the most recent toolcall |
40
+ | `workflow toolcalls` | `--raw` | Disable output sanitization (show full tool outputs) |
41
+
42
+ **Recommended**: Use `--files --latest` to get files from the final output without processing all toolcalls.
43
+
44
+ ## Skill Categories & Execution Patterns
45
+
46
+ Choose the execution pattern based on the skill's output type:
47
+
48
+ | Category | Skills | Output | Pattern |
49
+ |----------|--------|--------|---------|
50
+ | **File Generation** | image, video, audio skills | Files (png/mp4/mp3) | Run → Wait → Download → Open |
51
+ | **Text/Data** | search, research, report skills | Text content | Run → Wait → Extract content |
52
+ | **Action** | email, messaging, integration skills | Status confirmation | Run → Wait → Confirm |
53
+
54
+ ---
55
+
56
+ ### Pattern A: File Generation Skills
57
+ **Use for**: nano-banana-pro, fal-image, fal-video, fal-audio, seedream-image, kling-video, wan-video
58
+
59
+ ```bash
60
+ # Step 1: Run and capture RUN_ID
61
+ RESULT=$(refly skill run --id <installationId> --input '<json>')
62
+ RUN_ID=$(echo "$RESULT" | jq -r '.payload.workflowExecutions[0].id')
63
+
64
+ # Step 2: Wait for completion
65
+ refly workflow status "$RUN_ID" --watch --interval 30000
66
+
67
+ # Step 3: Get files and download to Desktop
68
+ FILES=$(refly workflow toolcalls "$RUN_ID" --files --latest | jq -r '.payload.files[]')
69
+ echo "$FILES" | jq -c '.' | while read -r file; do
70
+ FILE_ID=$(echo "$file" | jq -r '.fileId')
71
+ FILE_NAME=$(echo "$file" | jq -r '.name')
72
+ if [ -n "$FILE_ID" ] && [ "$FILE_ID" != "null" ]; then
73
+ refly file download "$FILE_ID" -o "$HOME/Desktop/${FILE_NAME}"
74
+ open "$HOME/Desktop/${FILE_NAME}"
75
+ fi
76
+ done
77
+ ```
78
+
79
+ ---
80
+
81
+ ### Pattern B: Text/Data Skills
82
+ **Use for**: jina, perplexity, weather-report, exa, research skills
83
+
84
+ ```bash
85
+ # Step 1: Run and capture RUN_ID
86
+ RESULT=$(refly skill run --id <installationId> --input '<json>')
87
+ RUN_ID=$(echo "$RESULT" | jq -r '.payload.workflowExecutions[0].id')
88
+
89
+ # Step 2: Wait for completion
90
+ refly workflow status "$RUN_ID" --watch --interval 30000
91
+
92
+ # Step 3: Extract text content from toolcalls
93
+ CONTENT=$(refly workflow toolcalls "$RUN_ID" --files --latest | jq -r '.payload.nodes[].content')
94
+ echo "$CONTENT"
95
+ ```
96
+
97
+ ---
98
+
99
+ ### Pattern C: Action Skills
100
+ **Use for**: send-email, slack, microsoft-teams, zoom, calendar, CRM integrations
22
101
 
23
102
  ```bash
24
- refly status
25
- refly login
26
- refly skill list
27
- refly skill installations
28
- refly skill run <installationId> --input '<json>'
103
+ # Step 1: Run and capture RUN_ID
104
+ RESULT=$(refly skill run --id <installationId> --input '<json>')
105
+ RUN_ID=$(echo "$RESULT" | jq -r '.payload.workflowExecutions[0].id')
106
+
107
+ # Step 2: Wait for completion
108
+ refly workflow status "$RUN_ID" --watch --interval 30000
109
+
110
+ # Step 3: Confirm action status
111
+ STATUS=$(refly workflow detail "$RUN_ID" | jq -r '.payload.status')
112
+ echo "Action completed with status: $STATUS"
29
113
  ```
30
114
 
31
- Tip: Get `installationId` from `refly skill installations` after installing a skill.
115
+ ---
116
+
117
+ **ID Types:**
118
+ | ID Format | Example | Used For |
119
+ |-----------|---------|----------|
120
+ | `skpi-xxx` | skpi-h9kpmts9ho1kl9l1sohaloeu | `skill run --id` only |
121
+ | `we-xxx` | we-abc123def456 | `workflow status`, `workflow detail`, `workflow toolcalls` |
122
+ | `c-xxx` | c-g6emwcpi1wpalsz6j4gyi3d9 | Browser URL only |
123
+ | `df-xxx` | df-b3yxyelshtwsbxbrkmcqxmx9 | `file download` |
124
+ | `skpe-xxx` | skpe-qga5lpyv59yjzz2ghz2iv9bu | ⚠️ Do NOT use for workflow commands |
125
+
126
+ **Required behavior:**
127
+ - `skill run` returns `RUN_ID` (we-xxx) in `.payload.workflowExecutions[0].id`
128
+ - Use `we-xxx` for all workflow commands (`status`, `detail`, `toolcalls`)
129
+ - Choose execution pattern (A/B/C) based on skill category
130
+ - File skills: Download to `~/Desktop/` and `open` to show user
131
+ - Text skills: Extract `.payload.nodes[].content` for text output
132
+ - Action skills: Confirm `.payload.status` for completion
32
133
 
33
134
  ## Directory Structure
34
135