skool-cli 1.0.0
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/LICENSE +21 -0
- package/README.md +179 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +33 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/create-folder.d.ts +3 -0
- package/dist/commands/create-folder.d.ts.map +1 -0
- package/dist/commands/create-folder.js +24 -0
- package/dist/commands/create-folder.js.map +1 -0
- package/dist/commands/create-lesson.d.ts +3 -0
- package/dist/commands/create-lesson.d.ts.map +1 -0
- package/dist/commands/create-lesson.js +35 -0
- package/dist/commands/create-lesson.js.map +1 -0
- package/dist/commands/create-post.d.ts +3 -0
- package/dist/commands/create-post.d.ts.map +1 -0
- package/dist/commands/create-post.js +36 -0
- package/dist/commands/create-post.js.map +1 -0
- package/dist/commands/debug-api.d.ts +3 -0
- package/dist/commands/debug-api.d.ts.map +1 -0
- package/dist/commands/debug-api.js +112 -0
- package/dist/commands/debug-api.js.map +1 -0
- package/dist/commands/debug-manual.d.ts +3 -0
- package/dist/commands/debug-manual.d.ts.map +1 -0
- package/dist/commands/debug-manual.js +66 -0
- package/dist/commands/debug-manual.js.map +1 -0
- package/dist/commands/debug.d.ts +3 -0
- package/dist/commands/debug.d.ts.map +1 -0
- package/dist/commands/debug.js +114 -0
- package/dist/commands/debug.js.map +1 -0
- package/dist/commands/delete-lesson.d.ts +3 -0
- package/dist/commands/delete-lesson.d.ts.map +1 -0
- package/dist/commands/delete-lesson.js +17 -0
- package/dist/commands/delete-lesson.js.map +1 -0
- package/dist/commands/get-categories.d.ts +3 -0
- package/dist/commands/get-categories.d.ts.map +1 -0
- package/dist/commands/get-categories.js +34 -0
- package/dist/commands/get-categories.js.map +1 -0
- package/dist/commands/get-members.d.ts +3 -0
- package/dist/commands/get-members.d.ts.map +1 -0
- package/dist/commands/get-members.js +35 -0
- package/dist/commands/get-members.js.map +1 -0
- package/dist/commands/get-posts.d.ts +3 -0
- package/dist/commands/get-posts.d.ts.map +1 -0
- package/dist/commands/get-posts.js +41 -0
- package/dist/commands/get-posts.js.map +1 -0
- package/dist/commands/list-lessons.d.ts +3 -0
- package/dist/commands/list-lessons.d.ts.map +1 -0
- package/dist/commands/list-lessons.js +45 -0
- package/dist/commands/list-lessons.js.map +1 -0
- package/dist/commands/login.d.ts +3 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +30 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/test-api.d.ts +3 -0
- package/dist/commands/test-api.d.ts.map +1 -0
- package/dist/commands/test-api.js +143 -0
- package/dist/commands/test-api.js.map +1 -0
- package/dist/commands/whoami.d.ts +3 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +17 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/core/browser-manager.d.ts +25 -0
- package/dist/core/browser-manager.d.ts.map +1 -0
- package/dist/core/browser-manager.js +104 -0
- package/dist/core/browser-manager.js.map +1 -0
- package/dist/core/config.d.ts +15 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +17 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/html-generator.d.ts +15 -0
- package/dist/core/html-generator.d.ts.map +1 -0
- package/dist/core/html-generator.js +254 -0
- package/dist/core/html-generator.js.map +1 -0
- package/dist/core/page-ops.d.ts +69 -0
- package/dist/core/page-ops.d.ts.map +1 -0
- package/dist/core/page-ops.js +511 -0
- package/dist/core/page-ops.js.map +1 -0
- package/dist/core/skool-api.d.ts +74 -0
- package/dist/core/skool-api.d.ts.map +1 -0
- package/dist/core/skool-api.js +389 -0
- package/dist/core/skool-api.js.map +1 -0
- package/dist/core/skool-client.d.ts +63 -0
- package/dist/core/skool-client.d.ts.map +1 -0
- package/dist/core/skool-client.js +501 -0
- package/dist/core/skool-client.js.map +1 -0
- package/dist/core/types.d.ts +58 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { BrowserManager } from "./browser-manager.js";
|
|
3
|
+
import { PageOps } from "./page-ops.js";
|
|
4
|
+
import { SkoolApi } from "./skool-api.js";
|
|
5
|
+
import { markdownToHtml, structuredContentToHtml } from "./html-generator.js";
|
|
6
|
+
/**
|
|
7
|
+
* High-level Skool client.
|
|
8
|
+
* This is the main API for both CLI commands and programmatic usage.
|
|
9
|
+
*/
|
|
10
|
+
export class SkoolClient {
|
|
11
|
+
browser;
|
|
12
|
+
ops;
|
|
13
|
+
api;
|
|
14
|
+
// Cached IDs for API calls
|
|
15
|
+
cachedGroupId = "";
|
|
16
|
+
cachedUserId = "";
|
|
17
|
+
cachedRootId = "";
|
|
18
|
+
constructor() {
|
|
19
|
+
this.browser = new BrowserManager();
|
|
20
|
+
this.ops = new PageOps(this.browser);
|
|
21
|
+
this.api = new SkoolApi(this.browser);
|
|
22
|
+
}
|
|
23
|
+
/** Discover group_id, user_id, root_id for API calls */
|
|
24
|
+
async discoverIds(groupSlug, courseName) {
|
|
25
|
+
// Return cached if available
|
|
26
|
+
if (this.cachedGroupId && this.cachedUserId && this.cachedRootId) {
|
|
27
|
+
return {
|
|
28
|
+
groupId: this.cachedGroupId,
|
|
29
|
+
userId: this.cachedUserId,
|
|
30
|
+
rootId: this.cachedRootId,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const page = await this.browser.getPage();
|
|
34
|
+
// Navigate to classroom
|
|
35
|
+
await this.ops.gotoClassroom(groupSlug);
|
|
36
|
+
// Enter course
|
|
37
|
+
if (courseName) {
|
|
38
|
+
await page.getByText(courseName, { exact: false }).first().click();
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
const courseLink = page.locator('a[href*="/classroom/"]').first();
|
|
42
|
+
if ((await courseLink.count()) > 0)
|
|
43
|
+
await courseLink.click();
|
|
44
|
+
}
|
|
45
|
+
await page.waitForTimeout(3000);
|
|
46
|
+
// Get group_id from telemetry/page
|
|
47
|
+
let groupId = "";
|
|
48
|
+
page.on("request", (req) => {
|
|
49
|
+
const body = req.postData();
|
|
50
|
+
if (body) {
|
|
51
|
+
const gm = body.match(/"group_id"\s*:\s*"([a-f0-9]{32})"/);
|
|
52
|
+
if (gm && !groupId)
|
|
53
|
+
groupId = gm[1];
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
// Get group_id from page assets if not captured
|
|
57
|
+
if (!groupId) {
|
|
58
|
+
groupId = await page.evaluate(() => {
|
|
59
|
+
const str = document.documentElement.innerHTML;
|
|
60
|
+
const m = str.match(/[a-f0-9]{32}/);
|
|
61
|
+
// Look for the specific pattern in og:image URLs
|
|
62
|
+
const ogMatch = str.match(/assets\.skool\.com\/f\/([a-f0-9]{32})/);
|
|
63
|
+
return ogMatch ? ogMatch[1] : (m ? m[0] : "");
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
// Get user_id from JWT auth_token cookie
|
|
67
|
+
let userId = "";
|
|
68
|
+
const cookies = await page.context().cookies();
|
|
69
|
+
const authCookie = cookies.find((c) => c.name === "auth_token");
|
|
70
|
+
if (authCookie) {
|
|
71
|
+
try {
|
|
72
|
+
const payload = JSON.parse(Buffer.from(authCookie.value.split(".")[1], "base64").toString());
|
|
73
|
+
userId = payload.user_id || payload.sub || payload.id || "";
|
|
74
|
+
}
|
|
75
|
+
catch { /* ignore */ }
|
|
76
|
+
}
|
|
77
|
+
// Get root_id by intercepting the POST to api2.skool.com when doing "Add page"
|
|
78
|
+
// Then DELETE the unwanted "New page" that gets created
|
|
79
|
+
let rootId = "";
|
|
80
|
+
let tempPageId = "";
|
|
81
|
+
const rootIdPromise = new Promise((resolve) => {
|
|
82
|
+
const timeout = setTimeout(() => resolve({ rootId: "", pageId: "" }), 15000);
|
|
83
|
+
page.on("response", async (res) => {
|
|
84
|
+
if (res.url().includes("api2.skool.com/courses") && res.request().method() === "POST") {
|
|
85
|
+
try {
|
|
86
|
+
const data = (await res.json());
|
|
87
|
+
if (data.root_id && data.id) {
|
|
88
|
+
clearTimeout(timeout);
|
|
89
|
+
resolve({
|
|
90
|
+
rootId: data.root_id,
|
|
91
|
+
pageId: data.id,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
catch { /* ignore */ }
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
// Trigger "Add page" to get root_id
|
|
100
|
+
const courseTopArea = page.locator('div[class*="CourseMenuTop"]').first();
|
|
101
|
+
await courseTopArea.hover();
|
|
102
|
+
await page.waitForTimeout(500);
|
|
103
|
+
await page.evaluate(() => {
|
|
104
|
+
const topArea = document.querySelector('div[class*="CourseMenuTop"]');
|
|
105
|
+
if (!topArea)
|
|
106
|
+
return;
|
|
107
|
+
topArea.querySelectorAll("div, button, span, svg").forEach((el) => {
|
|
108
|
+
const rect = el.getBoundingClientRect();
|
|
109
|
+
const text = el.textContent?.trim() || "";
|
|
110
|
+
if (rect.width > 10 && rect.width < 50 && rect.height > 10 && rect.height < 50 && text.length < 4) {
|
|
111
|
+
el.dispatchEvent(new MouseEvent("click", { bubbles: true, cancelable: true }));
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
await page.waitForTimeout(800);
|
|
116
|
+
try {
|
|
117
|
+
await page.getByText("Add page", { exact: true }).click({ timeout: 5000 });
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
await page.getByText("Add page", { exact: true }).click({ force: true, timeout: 5000 });
|
|
121
|
+
}
|
|
122
|
+
const captured = await rootIdPromise;
|
|
123
|
+
rootId = captured.rootId;
|
|
124
|
+
tempPageId = captured.pageId;
|
|
125
|
+
// Delete the temporary "New page" that was created for discovery
|
|
126
|
+
if (tempPageId) {
|
|
127
|
+
await this.api.deletePage(tempPageId);
|
|
128
|
+
}
|
|
129
|
+
// Cache for future calls
|
|
130
|
+
this.cachedGroupId = groupId;
|
|
131
|
+
this.cachedUserId = userId;
|
|
132
|
+
this.cachedRootId = rootId;
|
|
133
|
+
return { groupId, userId, rootId };
|
|
134
|
+
}
|
|
135
|
+
// ----------------------------------------------------------
|
|
136
|
+
// Auth
|
|
137
|
+
// ----------------------------------------------------------
|
|
138
|
+
/** Login to Skool with email and password */
|
|
139
|
+
async login(email, password) {
|
|
140
|
+
const success = await this.ops.login(email, password);
|
|
141
|
+
return {
|
|
142
|
+
success,
|
|
143
|
+
message: success
|
|
144
|
+
? "Logged in successfully. Session cached for future use."
|
|
145
|
+
: "Login failed. Check your email and password.",
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/** Check if the current session is valid */
|
|
149
|
+
async checkSession(groupSlug) {
|
|
150
|
+
await this.ops.gotoCommunity(groupSlug);
|
|
151
|
+
const authenticated = await this.ops.isAuthenticated();
|
|
152
|
+
return {
|
|
153
|
+
success: authenticated,
|
|
154
|
+
message: authenticated
|
|
155
|
+
? "Session is active."
|
|
156
|
+
: "Session expired. Run: skool login",
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
// ----------------------------------------------------------
|
|
160
|
+
// Classroom
|
|
161
|
+
// ----------------------------------------------------------
|
|
162
|
+
/** Create a new folder (module) in a Skool classroom course */
|
|
163
|
+
async createFolder(options) {
|
|
164
|
+
try {
|
|
165
|
+
const { groupId, userId, rootId } = await this.discoverIds(options.group, options.course);
|
|
166
|
+
if (!groupId || !rootId) {
|
|
167
|
+
return { success: false, message: "Could not discover Skool IDs." };
|
|
168
|
+
}
|
|
169
|
+
const result = await this.api.createFolder({
|
|
170
|
+
groupId,
|
|
171
|
+
parentId: rootId,
|
|
172
|
+
rootId,
|
|
173
|
+
title: options.title,
|
|
174
|
+
});
|
|
175
|
+
return { success: result.success, message: result.message };
|
|
176
|
+
}
|
|
177
|
+
catch (error) {
|
|
178
|
+
return {
|
|
179
|
+
success: false,
|
|
180
|
+
message: `Failed to create folder: ${error.message}`,
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
/** Find a folder by name and return its ID.
|
|
185
|
+
* Extracts folder names + IDs from the sidebar DOM via Playwright.
|
|
186
|
+
*/
|
|
187
|
+
async findFolderByName(groupId, rootId, folderName) {
|
|
188
|
+
// First try: API-based lookup
|
|
189
|
+
const items = await this.api.listCourseItems(groupId, rootId);
|
|
190
|
+
for (const item of items) {
|
|
191
|
+
const meta = item.metadata;
|
|
192
|
+
const title = meta?.title || "";
|
|
193
|
+
const unitType = item.unit_type || "";
|
|
194
|
+
if (unitType === "set" &&
|
|
195
|
+
title.toLowerCase() === folderName.toLowerCase()) {
|
|
196
|
+
return item.id;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
// Second try: extract from sidebar links via Playwright
|
|
200
|
+
// Folder links in the sidebar contain the folder ID in the URL hash
|
|
201
|
+
const page = await this.browser.getPage();
|
|
202
|
+
const folderId = await page.evaluate((name) => {
|
|
203
|
+
// Folders in sidebar are MenuItemTitle elements
|
|
204
|
+
// Their parent MenuItemWrapper contains a link or data attribute with the ID
|
|
205
|
+
// When you click a folder, the URL changes to include ?md=<folder_first_child_id>
|
|
206
|
+
// But we can also find the folder by matching the name in the sidebar
|
|
207
|
+
// and looking for nearby elements with ID-like attributes
|
|
208
|
+
// Alternative: look at all links in the sidebar that contain the course path
|
|
209
|
+
const links = document.querySelectorAll('a[href*="/classroom/"]');
|
|
210
|
+
let found = "";
|
|
211
|
+
links.forEach((link) => {
|
|
212
|
+
const href = link.getAttribute("href") || "";
|
|
213
|
+
const text = link.textContent?.trim() || "";
|
|
214
|
+
// Links inside folders have ?md= parameter with the page ID
|
|
215
|
+
// We need the folder ID, which is the parent_id of pages inside it
|
|
216
|
+
// This approach won't give us the folder ID directly
|
|
217
|
+
});
|
|
218
|
+
// Better approach: check if Skool stores course data in React state
|
|
219
|
+
// Look for __NEXT_DATA__ or similar
|
|
220
|
+
const scripts = document.querySelectorAll("script#__NEXT_DATA__");
|
|
221
|
+
if (scripts.length > 0) {
|
|
222
|
+
try {
|
|
223
|
+
const data = JSON.parse(scripts[0].textContent || "{}");
|
|
224
|
+
const str = JSON.stringify(data);
|
|
225
|
+
// Find all "set" type items (folders) by parsing the full state
|
|
226
|
+
// Pattern: "unit_type":"set" with matching "title":"<name>"
|
|
227
|
+
const regex = new RegExp(`"id":"([a-f0-9]{32})"[^}]*"unit_type":"set"[^}]*"title":"${name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}"`, "i");
|
|
228
|
+
const match = str.match(regex);
|
|
229
|
+
if (match)
|
|
230
|
+
return match[1];
|
|
231
|
+
// Try reverse order (title before id)
|
|
232
|
+
const regex2 = new RegExp(`"title":"${name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}"[^}]*"unit_type":"set"[^}]*"id":"([a-f0-9]{32})"`, "i");
|
|
233
|
+
const match2 = str.match(regex2);
|
|
234
|
+
if (match2)
|
|
235
|
+
return match2[1];
|
|
236
|
+
}
|
|
237
|
+
catch {
|
|
238
|
+
// ignore parse errors
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return found;
|
|
242
|
+
}, folderName);
|
|
243
|
+
return folderId || null;
|
|
244
|
+
}
|
|
245
|
+
/** Create a new lesson in a Skool classroom module */
|
|
246
|
+
async createLesson(options) {
|
|
247
|
+
// Resolve HTML content
|
|
248
|
+
let html;
|
|
249
|
+
if (options.htmlContent) {
|
|
250
|
+
html = options.htmlContent;
|
|
251
|
+
}
|
|
252
|
+
else if (options.markdownContent) {
|
|
253
|
+
html = markdownToHtml(options.markdownContent);
|
|
254
|
+
}
|
|
255
|
+
else if (options.filePath) {
|
|
256
|
+
const content = readFileSync(options.filePath, "utf-8");
|
|
257
|
+
if (options.filePath.endsWith(".json")) {
|
|
258
|
+
const parsed = JSON.parse(content);
|
|
259
|
+
const sc = parsed.skool_class || parsed;
|
|
260
|
+
html = structuredContentToHtml(sc);
|
|
261
|
+
}
|
|
262
|
+
else if (options.filePath.endsWith(".html") ||
|
|
263
|
+
options.filePath.endsWith(".htm")) {
|
|
264
|
+
html = content;
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
html = markdownToHtml(content);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
return {
|
|
272
|
+
success: false,
|
|
273
|
+
message: "No content provided. Use --file, --html, or provide markdown content.",
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
try {
|
|
277
|
+
// Discover IDs via browser navigation
|
|
278
|
+
const { groupId, userId, rootId } = await this.discoverIds(options.group, options.course);
|
|
279
|
+
if (!groupId || !userId || !rootId) {
|
|
280
|
+
return {
|
|
281
|
+
success: false,
|
|
282
|
+
message: "Could not discover Skool IDs. Check your auth session.",
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
// Resolve parent: if folder specified, find its ID
|
|
286
|
+
let parentId = rootId;
|
|
287
|
+
if (options.folderId) {
|
|
288
|
+
// Direct folder ID provided
|
|
289
|
+
parentId = options.folderId;
|
|
290
|
+
}
|
|
291
|
+
else if (options.folder) {
|
|
292
|
+
const folderId = await this.findFolderByName(groupId, rootId, options.folder);
|
|
293
|
+
if (!folderId) {
|
|
294
|
+
return {
|
|
295
|
+
success: false,
|
|
296
|
+
message: `Folder "${options.folder}" not found. Try --folder-id with the folder ID directly.`,
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
parentId = folderId;
|
|
300
|
+
}
|
|
301
|
+
// Create lesson via direct API call
|
|
302
|
+
const result = await this.api.createPage({
|
|
303
|
+
groupId,
|
|
304
|
+
userId,
|
|
305
|
+
parentId,
|
|
306
|
+
rootId,
|
|
307
|
+
title: options.title,
|
|
308
|
+
content: html,
|
|
309
|
+
});
|
|
310
|
+
return {
|
|
311
|
+
success: result.success,
|
|
312
|
+
message: result.message,
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
catch (error) {
|
|
316
|
+
return {
|
|
317
|
+
success: false,
|
|
318
|
+
message: `Failed to create lesson: ${error.message}`,
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
/** List all lessons and folders in a course (from sidebar DOM) */
|
|
323
|
+
async listLessons(groupSlug, courseName) {
|
|
324
|
+
try {
|
|
325
|
+
const page = await this.browser.getPage();
|
|
326
|
+
// Navigate to classroom and enter course
|
|
327
|
+
await this.ops.gotoClassroom(groupSlug);
|
|
328
|
+
if (courseName) {
|
|
329
|
+
await page.getByText(courseName, { exact: false }).first().click();
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
const link = page.locator('a[href*="/classroom/"]').first();
|
|
333
|
+
if ((await link.count()) > 0)
|
|
334
|
+
await link.click();
|
|
335
|
+
}
|
|
336
|
+
await page.waitForTimeout(3000);
|
|
337
|
+
// Extract structure from sidebar DOM
|
|
338
|
+
// Folders have class MenuItemTitle with a chevron (expandable)
|
|
339
|
+
// Lessons are links inside expanded folders or at course root
|
|
340
|
+
const items = await page.evaluate(() => {
|
|
341
|
+
const result = [];
|
|
342
|
+
// All items in the sidebar menu
|
|
343
|
+
const wrappers = document.querySelectorAll('div[class*="MenuItemWrapper"]');
|
|
344
|
+
let currentFolder = null;
|
|
345
|
+
wrappers.forEach((wrapper) => {
|
|
346
|
+
const titleEl = wrapper.querySelector('div[class*="MenuItemTitle"]');
|
|
347
|
+
const name = titleEl?.textContent?.trim() || "";
|
|
348
|
+
if (!name)
|
|
349
|
+
return;
|
|
350
|
+
// Check if this is a folder (has SetMenuItem children or is a "set" type)
|
|
351
|
+
// Folders have a chevron (expand/collapse) indicator
|
|
352
|
+
const hasChevron = wrapper.querySelector('svg, [class*="Chevron"], [class*="arrow"]') !== null;
|
|
353
|
+
const setItems = wrapper.querySelector('div[class*="SetMenuItem"]');
|
|
354
|
+
// A folder is an item that contains other items
|
|
355
|
+
// In the DOM: folders are top-level MenuItemWrapper with child SetMenuItem items
|
|
356
|
+
if (setItems || wrapper.classList.toString().includes("SetMenuItem") === false) {
|
|
357
|
+
// Check if this item has children (is expanded with lessons underneath)
|
|
358
|
+
const childContainer = wrapper.querySelector('div[class*="SetMenuItem"]');
|
|
359
|
+
if (childContainer) {
|
|
360
|
+
// This is a folder with visible children
|
|
361
|
+
currentFolder = { name, type: "folder", children: [] };
|
|
362
|
+
// Children are links inside this wrapper
|
|
363
|
+
const childLinks = wrapper.querySelectorAll('a[href*="/classroom/"]');
|
|
364
|
+
childLinks.forEach((link) => {
|
|
365
|
+
const childName = link.textContent?.trim() || "";
|
|
366
|
+
if (childName && childName !== name) {
|
|
367
|
+
currentFolder.children.push({ name: childName });
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
result.push(currentFolder);
|
|
371
|
+
currentFolder = null;
|
|
372
|
+
}
|
|
373
|
+
else {
|
|
374
|
+
// Standalone item (could be a collapsed folder or a root-level lesson)
|
|
375
|
+
// Check if it has a link (lessons have links, folders don't always)
|
|
376
|
+
const link = wrapper.querySelector('a[href*="/classroom/"]');
|
|
377
|
+
if (link) {
|
|
378
|
+
result.push({ name, type: "lesson" });
|
|
379
|
+
}
|
|
380
|
+
else {
|
|
381
|
+
// Collapsed folder (no children visible)
|
|
382
|
+
result.push({ name, type: "folder", children: [] });
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
return result;
|
|
388
|
+
});
|
|
389
|
+
return { success: true, message: `Found ${items.length} items`, items };
|
|
390
|
+
}
|
|
391
|
+
catch (error) {
|
|
392
|
+
return {
|
|
393
|
+
success: false,
|
|
394
|
+
message: `Failed to list lessons: ${error.message}`,
|
|
395
|
+
items: [],
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
/** Delete a lesson or folder by ID */
|
|
400
|
+
async deleteLesson(pageId) {
|
|
401
|
+
try {
|
|
402
|
+
const success = await this.api.deletePage(pageId);
|
|
403
|
+
return {
|
|
404
|
+
success,
|
|
405
|
+
message: success
|
|
406
|
+
? `Deleted successfully. ID: ${pageId}`
|
|
407
|
+
: `Delete failed for ID: ${pageId}`,
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
catch (error) {
|
|
411
|
+
return {
|
|
412
|
+
success: false,
|
|
413
|
+
message: `Failed to delete: ${error.message}`,
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
// ----------------------------------------------------------
|
|
418
|
+
// Community
|
|
419
|
+
// ----------------------------------------------------------
|
|
420
|
+
/** Create a community post */
|
|
421
|
+
async createPost(options) {
|
|
422
|
+
// Check auth first
|
|
423
|
+
await this.ops.gotoCommunity(options.group);
|
|
424
|
+
const authenticated = await this.ops.isAuthenticated();
|
|
425
|
+
if (!authenticated) {
|
|
426
|
+
return {
|
|
427
|
+
success: false,
|
|
428
|
+
message: "Not authenticated. Run: skool login",
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
try {
|
|
432
|
+
await this.ops.createCommunityPost(options.group, options.title, options.body, options.category);
|
|
433
|
+
return {
|
|
434
|
+
success: true,
|
|
435
|
+
message: `Post "${options.title}" created successfully.`,
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
catch (error) {
|
|
439
|
+
return {
|
|
440
|
+
success: false,
|
|
441
|
+
message: `Failed to create post: ${error.message}`,
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
/** Get posts from a community */
|
|
446
|
+
async getPosts(groupSlug) {
|
|
447
|
+
try {
|
|
448
|
+
const raw = await this.ops.extractPosts(groupSlug);
|
|
449
|
+
const posts = raw.map((p) => ({
|
|
450
|
+
title: p.title,
|
|
451
|
+
author: p.author,
|
|
452
|
+
category: p.category,
|
|
453
|
+
likes: 0,
|
|
454
|
+
comments: 0,
|
|
455
|
+
preview: p.preview,
|
|
456
|
+
url: p.url,
|
|
457
|
+
}));
|
|
458
|
+
return { success: true, posts };
|
|
459
|
+
}
|
|
460
|
+
catch (error) {
|
|
461
|
+
return { success: false, posts: [] };
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
/** Get categories from a community */
|
|
465
|
+
async getCategories(groupSlug) {
|
|
466
|
+
try {
|
|
467
|
+
const categories = await this.ops.extractCategories(groupSlug);
|
|
468
|
+
return { success: true, categories };
|
|
469
|
+
}
|
|
470
|
+
catch {
|
|
471
|
+
return { success: false, categories: [] };
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
// ----------------------------------------------------------
|
|
475
|
+
// Members
|
|
476
|
+
// ----------------------------------------------------------
|
|
477
|
+
/** Get members from a community */
|
|
478
|
+
async getMembers(groupSlug, search) {
|
|
479
|
+
try {
|
|
480
|
+
const raw = await this.ops.extractMembers(groupSlug, search);
|
|
481
|
+
const members = raw.map((m) => ({
|
|
482
|
+
name: m.name,
|
|
483
|
+
level: m.level,
|
|
484
|
+
points: 0,
|
|
485
|
+
contributions: m.contributions,
|
|
486
|
+
}));
|
|
487
|
+
return { success: true, members };
|
|
488
|
+
}
|
|
489
|
+
catch {
|
|
490
|
+
return { success: false, members: [] };
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
// ----------------------------------------------------------
|
|
494
|
+
// Lifecycle
|
|
495
|
+
// ----------------------------------------------------------
|
|
496
|
+
/** Close the browser and cleanup */
|
|
497
|
+
async close() {
|
|
498
|
+
await this.browser.close();
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
//# sourceMappingURL=skool-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skool-client.js","sourceRoot":"","sources":["../../src/core/skool-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,cA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EAAE,UAAU,EAAE,CAAC;QACvC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;QAC5C,CAAC;IACH,CAAC;IAED,6DAA6D;IAC7D,UAAU;IACV,6DAA6D;IAE7D,mCAAmC;IACnC,KAAK,CAAC,UAAU,CACd,SAAiB,EACjB,MAAe;QAEf,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YAC7D,MAAM,OAAO,GAAkB,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC7C,IAAI,EAAE,CAAC,CAAC,IAAI;gBACZ,KAAK,EAAE,CAAC,CAAC,KAAK;gBACd,MAAM,EAAE,CAAC;gBACT,aAAa,EAAE,CAAC,CAAC,aAAa;aAC/B,CAAC,CAAC,CAAC;YACJ,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QACpC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;QACzC,CAAC;IACH,CAAC;IAED,6DAA6D;IAC7D,YAAY;IACZ,6DAA6D;IAE7D,oCAAoC;IACpC,KAAK,CAAC,KAAK;QACT,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IAC7B,CAAC;CACF"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/** Skool community post */
|
|
2
|
+
export interface SkoolPost {
|
|
3
|
+
title: string;
|
|
4
|
+
author: string;
|
|
5
|
+
category: string;
|
|
6
|
+
likes: number;
|
|
7
|
+
comments: number;
|
|
8
|
+
preview: string;
|
|
9
|
+
url: string;
|
|
10
|
+
}
|
|
11
|
+
/** Skool community member */
|
|
12
|
+
export interface SkoolMember {
|
|
13
|
+
name: string;
|
|
14
|
+
level: number;
|
|
15
|
+
points: number;
|
|
16
|
+
contributions: number;
|
|
17
|
+
}
|
|
18
|
+
/** Skool course info */
|
|
19
|
+
export interface SkoolCourse {
|
|
20
|
+
name: string;
|
|
21
|
+
modules: SkoolModule[];
|
|
22
|
+
}
|
|
23
|
+
/** Skool module (folder) in a course */
|
|
24
|
+
export interface SkoolModule {
|
|
25
|
+
name: string;
|
|
26
|
+
lessons: string[];
|
|
27
|
+
}
|
|
28
|
+
/** Options for creating a lesson */
|
|
29
|
+
export interface CreateLessonOptions {
|
|
30
|
+
group: string;
|
|
31
|
+
module: string;
|
|
32
|
+
title: string;
|
|
33
|
+
course?: string;
|
|
34
|
+
folder?: string;
|
|
35
|
+
folderId?: string;
|
|
36
|
+
htmlContent?: string;
|
|
37
|
+
markdownContent?: string;
|
|
38
|
+
filePath?: string;
|
|
39
|
+
}
|
|
40
|
+
/** Options for creating a folder */
|
|
41
|
+
export interface CreateFolderOptions {
|
|
42
|
+
group: string;
|
|
43
|
+
title: string;
|
|
44
|
+
course?: string;
|
|
45
|
+
}
|
|
46
|
+
/** Options for creating a post */
|
|
47
|
+
export interface CreatePostOptions {
|
|
48
|
+
group: string;
|
|
49
|
+
title: string;
|
|
50
|
+
body: string;
|
|
51
|
+
category?: string;
|
|
52
|
+
}
|
|
53
|
+
/** Result of an operation */
|
|
54
|
+
export interface OperationResult {
|
|
55
|
+
success: boolean;
|
|
56
|
+
message: string;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MA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 -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "skool-cli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "CLI and programmatic API for Skool.com automation — create lessons, posts, and manage communities via browser automation",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/core/skool-client.js",
|
|
7
|
+
"types": "dist/core/skool-client.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"skool": "dist/cli.js"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/core/skool-client.js",
|
|
14
|
+
"types": "./dist/core/skool-client.d.ts"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc",
|
|
19
|
+
"dev": "tsc --watch",
|
|
20
|
+
"start": "node dist/cli.js"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"skool",
|
|
24
|
+
"cli",
|
|
25
|
+
"automation",
|
|
26
|
+
"playwright",
|
|
27
|
+
"classroom",
|
|
28
|
+
"community",
|
|
29
|
+
"education",
|
|
30
|
+
"mcp",
|
|
31
|
+
"ai-tools"
|
|
32
|
+
],
|
|
33
|
+
"author": "UNIKPROMPT Technologies LLC",
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://github.com/unikprompt/skool-cli"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://unikprompt.com",
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"commander": "^13.1.0",
|
|
42
|
+
"playwright": "^1.52.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/node": "^22.0.0",
|
|
46
|
+
"typescript": "^5.7.0"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=18.0.0"
|
|
50
|
+
}
|
|
51
|
+
}
|