insightfulpipe 0.1.0 → 0.1.2
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/SKILL.md +71 -0
- package/package.json +5 -1
- package/scripts/postinstall.js +33 -0
- package/skills/insightfulpipe/SKILL.md +71 -0
package/SKILL.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: insightfulpipe
|
|
3
|
+
description: Query and manage marketing data across 40+ platforms — Google Analytics, Google Ads, Facebook Ads, Instagram, Shopify, HubSpot, Klaviyo, TikTok, LinkedIn, and more.
|
|
4
|
+
homepage: https://insightfulpipe.com
|
|
5
|
+
metadata: {"clawdbot":{"emoji":"📊","requires":{"bins":[],"env":["INSIGHTFULPIPE_TOKEN"]}}}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Install InsightfulPipe if it doesn't exist
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install -g insightfulpipe
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
npm release: https://www.npmjs.com/package/insightfulpipe
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
| Property | Value |
|
|
19
|
+
|----------|-------|
|
|
20
|
+
| **name** | insightfulpipe |
|
|
21
|
+
| **description** | Query marketing data across analytics, ads, social, ecommerce, and SEO platforms |
|
|
22
|
+
| **allowed-tools** | Bash(insightfulpipe:*) |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Core Workflow
|
|
27
|
+
|
|
28
|
+
1. **Authenticate** — Set your API token
|
|
29
|
+
2. **Discover** — List platforms and available actions
|
|
30
|
+
3. **Schema** — Get the exact request body for an action
|
|
31
|
+
4. **Query** — Execute read operations (reports, analytics, listings)
|
|
32
|
+
5. **Execute** — Execute write operations (create, update, delete, publish)
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# 1. Authenticate
|
|
36
|
+
export INSIGHTFULPIPE_TOKEN=ip_sk_your_token
|
|
37
|
+
# or
|
|
38
|
+
insightfulpipe auth
|
|
39
|
+
|
|
40
|
+
# 2. Discover
|
|
41
|
+
insightfulpipe platforms
|
|
42
|
+
insightfulpipe accounts --platform <platform> --json
|
|
43
|
+
insightfulpipe helper <platform>
|
|
44
|
+
|
|
45
|
+
# 3. Schema
|
|
46
|
+
insightfulpipe helper <platform> --actions <action1>,<action2>
|
|
47
|
+
|
|
48
|
+
# 4. Query (read)
|
|
49
|
+
insightfulpipe query <platform> -b '{"action":"...","workspace_id":...,"brand_id":...}'
|
|
50
|
+
|
|
51
|
+
# 5. Execute (write)
|
|
52
|
+
insightfulpipe action <platform> -b '{"action":"..."}' --yes
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Key Rules
|
|
56
|
+
|
|
57
|
+
- **Never guess the request body** — always call `helper <platform> --actions <action>` first to get the exact schema.
|
|
58
|
+
- **Replace "xxx" placeholders** with real values from `accounts --platform <platform> --json`.
|
|
59
|
+
- **Use `query`** for read operations (reports, analytics, metrics, listings).
|
|
60
|
+
- **Use `action`** for write operations (create, update, delete, publish, send). Requires `--yes` in non-interactive mode.
|
|
61
|
+
|
|
62
|
+
## Other Commands
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
insightfulpipe platforms # All supported platforms
|
|
66
|
+
insightfulpipe sources --platform X # Connected sources with IDs
|
|
67
|
+
insightfulpipe prompts <platform> # Prompt templates
|
|
68
|
+
insightfulpipe brands --workspace ID # Brand metadata
|
|
69
|
+
insightfulpipe whoami # Current user
|
|
70
|
+
insightfulpipe doctor # Check auth and connectivity
|
|
71
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "insightfulpipe",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "InsightfulPipe CLI — query your marketing data from the terminal",
|
|
5
5
|
"bin": {
|
|
6
6
|
"insightfulpipe": "bin/cli.js"
|
|
@@ -8,14 +8,18 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
"bin/",
|
|
10
10
|
"src/",
|
|
11
|
+
"scripts/",
|
|
12
|
+
"skills/",
|
|
11
13
|
"README.md",
|
|
12
14
|
"CHANGELOG.md",
|
|
13
15
|
"SECURITY.md",
|
|
16
|
+
"SKILL.md",
|
|
14
17
|
"LICENSE"
|
|
15
18
|
],
|
|
16
19
|
"type": "module",
|
|
17
20
|
"scripts": {
|
|
18
21
|
"start": "node bin/cli.js",
|
|
22
|
+
"postinstall": "node scripts/postinstall.js",
|
|
19
23
|
"test": "node --test",
|
|
20
24
|
"test:unit": "node --test test/cli.test.js",
|
|
21
25
|
"test:live": "node --test test/live-smoke.test.js"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
|
|
4
|
+
import { join, dirname } from 'path';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
|
|
7
|
+
// Auto-detect skills directory: env var > known OpenClaw paths
|
|
8
|
+
const KNOWN_PATHS = [
|
|
9
|
+
process.env.OPENCLAW_SKILLS_DIR,
|
|
10
|
+
'/openclaw/skills',
|
|
11
|
+
join(process.env.HOME || '', '.openclaw', 'skills'),
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
const skillsDir = KNOWN_PATHS.find((p) => p && existsSync(p));
|
|
15
|
+
if (!skillsDir) {
|
|
16
|
+
process.exit(0);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const targetDir = join(skillsDir, 'insightfulpipe');
|
|
20
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
21
|
+
const skillSource = join(__dirname, '..', 'skills', 'insightfulpipe', 'SKILL.md');
|
|
22
|
+
|
|
23
|
+
if (!existsSync(skillSource)) {
|
|
24
|
+
process.exit(0);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
mkdirSync(targetDir, { recursive: true });
|
|
29
|
+
writeFileSync(join(targetDir, 'SKILL.md'), readFileSync(skillSource));
|
|
30
|
+
console.log(`InsightfulPipe skill installed to ${targetDir}`);
|
|
31
|
+
} catch (err) {
|
|
32
|
+
console.error(`Warning: could not install skill to ${targetDir}: ${err.message}`);
|
|
33
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: insightfulpipe
|
|
3
|
+
description: Query and manage marketing data across 40+ platforms — Google Analytics, Google Ads, Facebook Ads, Instagram, Shopify, HubSpot, Klaviyo, TikTok, LinkedIn, and more.
|
|
4
|
+
homepage: https://insightfulpipe.com
|
|
5
|
+
metadata: {"clawdbot":{"emoji":"📊","requires":{"bins":[],"env":["INSIGHTFULPIPE_TOKEN"]}}}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Install InsightfulPipe if it doesn't exist
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install -g insightfulpipe
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
npm release: https://www.npmjs.com/package/insightfulpipe
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
| Property | Value |
|
|
19
|
+
|----------|-------|
|
|
20
|
+
| **name** | insightfulpipe |
|
|
21
|
+
| **description** | Query marketing data across analytics, ads, social, ecommerce, and SEO platforms |
|
|
22
|
+
| **allowed-tools** | Bash(insightfulpipe:*) |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Core Workflow
|
|
27
|
+
|
|
28
|
+
1. **Authenticate** — Set your API token
|
|
29
|
+
2. **Discover** — List platforms and available actions
|
|
30
|
+
3. **Schema** — Get the exact request body for an action
|
|
31
|
+
4. **Query** — Execute read operations (reports, analytics, listings)
|
|
32
|
+
5. **Execute** — Execute write operations (create, update, delete, publish)
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# 1. Authenticate
|
|
36
|
+
export INSIGHTFULPIPE_TOKEN=ip_sk_your_token
|
|
37
|
+
# or
|
|
38
|
+
insightfulpipe auth
|
|
39
|
+
|
|
40
|
+
# 2. Discover
|
|
41
|
+
insightfulpipe platforms
|
|
42
|
+
insightfulpipe accounts --platform <platform> --json
|
|
43
|
+
insightfulpipe helper <platform>
|
|
44
|
+
|
|
45
|
+
# 3. Schema
|
|
46
|
+
insightfulpipe helper <platform> --actions <action1>,<action2>
|
|
47
|
+
|
|
48
|
+
# 4. Query (read)
|
|
49
|
+
insightfulpipe query <platform> -b '{"action":"...","workspace_id":...,"brand_id":...}'
|
|
50
|
+
|
|
51
|
+
# 5. Execute (write)
|
|
52
|
+
insightfulpipe action <platform> -b '{"action":"..."}' --yes
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Key Rules
|
|
56
|
+
|
|
57
|
+
- **Never guess the request body** — always call `helper <platform> --actions <action>` first to get the exact schema.
|
|
58
|
+
- **Replace "xxx" placeholders** with real values from `accounts --platform <platform> --json`.
|
|
59
|
+
- **Use `query`** for read operations (reports, analytics, metrics, listings).
|
|
60
|
+
- **Use `action`** for write operations (create, update, delete, publish, send). Requires `--yes` in non-interactive mode.
|
|
61
|
+
|
|
62
|
+
## Other Commands
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
insightfulpipe platforms # All supported platforms
|
|
66
|
+
insightfulpipe sources --platform X # Connected sources with IDs
|
|
67
|
+
insightfulpipe prompts <platform> # Prompt templates
|
|
68
|
+
insightfulpipe brands --workspace ID # Brand metadata
|
|
69
|
+
insightfulpipe whoami # Current user
|
|
70
|
+
insightfulpipe doctor # Check auth and connectivity
|
|
71
|
+
```
|