fastbrowser_cli 1.0.37 → 1.0.39
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/dist/contribs/_shared/fastbrowser_helper.d.ts +13 -0
- package/dist/contribs/_shared/fastbrowser_helper.d.ts.map +1 -0
- package/dist/contribs/_shared/fastbrowser_helper.js +39 -0
- package/dist/contribs/_shared/fastbrowser_helper.js.map +1 -0
- package/dist/contribs/linkedin_cli/src/cli.d.ts +3 -0
- package/dist/contribs/linkedin_cli/src/cli.d.ts.map +1 -0
- package/dist/contribs/linkedin_cli/src/cli.js +299 -0
- package/dist/contribs/linkedin_cli/src/cli.js.map +1 -0
- package/dist/contribs/linkedin_cli/src/libs/linkedin_profile_helper.d.ts +73 -0
- package/dist/contribs/linkedin_cli/src/libs/linkedin_profile_helper.d.ts.map +1 -0
- package/dist/contribs/linkedin_cli/src/libs/linkedin_profile_helper.js +866 -0
- package/dist/contribs/linkedin_cli/src/libs/linkedin_profile_helper.js.map +1 -0
- package/dist/contribs/linkedin_cli/src/libs/linkedin_recent_posts_helper.d.ts +61 -0
- package/dist/contribs/linkedin_cli/src/libs/linkedin_recent_posts_helper.d.ts.map +1 -0
- package/dist/contribs/linkedin_cli/src/libs/linkedin_recent_posts_helper.js +885 -0
- package/dist/contribs/linkedin_cli/src/libs/linkedin_recent_posts_helper.js.map +1 -0
- package/dist/contribs/linkedin_cli/src/libs/linkedin_thread_helper.d.ts +11 -0
- package/dist/contribs/linkedin_cli/src/libs/linkedin_thread_helper.d.ts.map +1 -0
- package/dist/contribs/linkedin_cli/src/libs/linkedin_thread_helper.js +145 -0
- package/dist/contribs/linkedin_cli/src/libs/linkedin_thread_helper.js.map +1 -0
- package/dist/contribs/twitter_cli/src/cli.d.ts +3 -0
- package/dist/contribs/twitter_cli/src/cli.d.ts.map +1 -0
- package/dist/contribs/twitter_cli/src/cli.js +273 -0
- package/dist/contribs/twitter_cli/src/cli.js.map +1 -0
- package/dist/contribs/twitter_cli/src/libs/twitter_profile_helper.d.ts +28 -0
- package/dist/contribs/twitter_cli/src/libs/twitter_profile_helper.d.ts.map +1 -0
- package/dist/contribs/twitter_cli/src/libs/twitter_profile_helper.js +274 -0
- package/dist/contribs/twitter_cli/src/libs/twitter_profile_helper.js.map +1 -0
- package/dist/contribs/twitter_cli/src/libs/twitter_recent_posts_helper.d.ts +43 -0
- package/dist/contribs/twitter_cli/src/libs/twitter_recent_posts_helper.d.ts.map +1 -0
- package/dist/contribs/twitter_cli/src/libs/twitter_recent_posts_helper.js +519 -0
- package/dist/contribs/twitter_cli/src/libs/twitter_recent_posts_helper.js.map +1 -0
- package/dist/contribs/twitter_cli/src/libs/twitter_thread_helper.d.ts +11 -0
- package/dist/contribs/twitter_cli/src/libs/twitter_thread_helper.d.ts.map +1 -0
- package/dist/contribs/twitter_cli/src/libs/twitter_thread_helper.js +213 -0
- package/dist/contribs/twitter_cli/src/libs/twitter_thread_helper.js.map +1 -0
- package/dist/fastbrowser_cli/fastbrowser_cli.js +43 -0
- package/dist/fastbrowser_cli/fastbrowser_cli.js.map +1 -1
- package/dist/fastbrowser_httpd/libs/tool-schemas.d.ts +4 -0
- package/dist/fastbrowser_httpd/libs/tool-schemas.d.ts.map +1 -1
- package/dist/fastbrowser_httpd/libs/tool-schemas.js +4 -0
- package/dist/fastbrowser_httpd/libs/tool-schemas.js.map +1 -1
- package/dist/fastbrowser_mcp/fastbrowser_mcp.js +36 -2
- package/dist/fastbrowser_mcp/fastbrowser_mcp.js.map +1 -1
- package/dist/fastbrowser_mcp/libs/mcp_target_helper.d.ts +2 -0
- package/dist/fastbrowser_mcp/libs/mcp_target_helper.d.ts.map +1 -1
- package/dist/fastbrowser_mcp/libs/mcp_target_helper.js +12 -0
- package/dist/fastbrowser_mcp/libs/mcp_target_helper.js.map +1 -1
- package/dist/fastbrowser_mcp/libs/response_formatter.d.ts +1 -0
- package/dist/fastbrowser_mcp/libs/response_formatter.d.ts.map +1 -1
- package/dist/fastbrowser_mcp/libs/response_formatter.js +27 -0
- package/dist/fastbrowser_mcp/libs/response_formatter.js.map +1 -1
- package/dist/shared/fastbrowser_helper.d.ts +13 -0
- package/dist/shared/fastbrowser_helper.d.ts.map +1 -0
- package/dist/shared/fastbrowser_helper.js +39 -0
- package/dist/shared/fastbrowser_helper.js.map +1 -0
- package/examples/linkedin_cli_TOREMOVE/README.md +7 -0
- package/examples/{linkedin_cli → linkedin_cli_TOREMOVE}/linkedin_dm.sh +8 -4
- package/examples/linkedin_cli_TOREMOVE/linkedin_dm.ts +326 -0
- package/examples/linkedin_cli_TOREMOVE/linkedin_dm_messages.ts +279 -0
- package/examples/linkedin_cli_TOREMOVE/linkedin_full_cycle.sh +5 -0
- package/examples/{linkedin_cli → linkedin_cli_TOREMOVE}/linkedin_post.sh +3 -0
- package/examples/linkedin_cli_TOREMOVE/message_thread.a11y.txt +252 -0
- package/listitem +4 -0
- package/package.json +7 -3
- package/skills/fastbrowser/SKILL.md +33 -25
- package/src/contribs/_shared/fastbrowser_helper.ts +49 -0
- package/src/contribs/linkedin_cli/README.md +80 -0
- package/src/contribs/linkedin_cli/data/linkedin_posts_jeromeetienne.a11y.txt +2364 -0
- package/src/contribs/linkedin_cli/data/linkedin_posts_jontwigge.a11y.txt +2740 -0
- package/src/contribs/linkedin_cli/data/linkedin_posts_julien_guezennec.a11y.txt +2073 -0
- package/src/contribs/linkedin_cli/data/linkedin_profile_jeromeetienne.a11y.txt +1863 -0
- package/src/contribs/linkedin_cli/data/linkedin_profile_jontwigge.a11y.txt +1738 -0
- package/src/contribs/linkedin_cli/data/linkedin_profile_julien_guezennec.a11y.txt +2182 -0
- package/src/contribs/linkedin_cli/src/cli.ts +345 -0
- package/src/contribs/linkedin_cli/src/libs/linkedin_profile_helper.ts +964 -0
- package/src/contribs/linkedin_cli/src/libs/linkedin_recent_posts_helper.ts +982 -0
- package/src/contribs/linkedin_cli/src/libs/linkedin_thread_helper.ts +171 -0
- package/src/contribs/twitter_cli/README.md +79 -0
- package/src/contribs/twitter_cli/data/twitter_chat.a11y.txt +215 -0
- package/src/contribs/twitter_cli/data/twitter_home.a11y.txt +467 -0
- package/src/contribs/twitter_cli/data/twitter_profile.a11y.txt +418 -0
- package/src/contribs/twitter_cli/data/twitter_profile_jontwigge.a11y.txt +484 -0
- package/src/contribs/twitter_cli/data/twitter_profile_molokoloco.a11y.txt +483 -0
- package/src/contribs/twitter_cli/src/cli.ts +315 -0
- package/src/contribs/twitter_cli/src/libs/twitter_profile_helper.ts +328 -0
- package/src/contribs/twitter_cli/src/libs/twitter_recent_posts_helper.ts +607 -0
- package/src/contribs/twitter_cli/src/libs/twitter_thread_helper.ts +240 -0
- package/src/fastbrowser_cli/fastbrowser_cli.ts +51 -0
- package/src/fastbrowser_httpd/libs/tool-schemas.ts +6 -0
- package/src/fastbrowser_mcp/fastbrowser_mcp.ts +46 -3
- package/src/fastbrowser_mcp/libs/mcp_target_helper.ts +11 -0
- package/src/fastbrowser_mcp/libs/response_formatter.ts +29 -0
- package/src/shared/fastbrowser_helper.ts +49 -0
- package/tsconfig.json +1 -1
- package/examples/mcp_client_playwright.ts +0 -34
- /package/examples/{linkedin_cli → linkedin_cli_TOREMOVE}/linkedin.snapshot.txt +0 -0
- /package/examples/{twitter_cli → twitter_cli_TOREMOVE}/twitter_post.sh +0 -0
|
@@ -15,7 +15,7 @@ maps 1-to-1 to a FastBrowser tool and returns the tool's response on stdout.
|
|
|
15
15
|
Run the CLI directly via `tsx`:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
npx fastbrowser_cli <command> [flags]
|
|
18
|
+
npx fastbrowser_cli@latest <command> [flags]
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Typical Workflow
|
|
@@ -35,20 +35,20 @@ uid=1_0 RootWebArea "Example Domain" url="https://example.com/"
|
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
37
|
# List all open browser pages
|
|
38
|
-
npx fastbrowser_cli list_pages
|
|
38
|
+
npx fastbrowser_cli@latest list_pages
|
|
39
39
|
|
|
40
40
|
# Open a new page at a URL
|
|
41
|
-
npx fastbrowser_cli new_page --url https://example.com
|
|
41
|
+
npx fastbrowser_cli@latest new_page --url https://example.com
|
|
42
42
|
|
|
43
43
|
# Close a page by its numeric id
|
|
44
|
-
npx fastbrowser_cli close_page --page-id 1
|
|
44
|
+
npx fastbrowser_cli@latest close_page --page-id 1
|
|
45
45
|
|
|
46
46
|
# Navigate the current page to a URL
|
|
47
|
-
npx fastbrowser_cli navigate_page --url https://example.com
|
|
47
|
+
npx fastbrowser_cli@latest navigate_page --url https://example.com
|
|
48
48
|
|
|
49
49
|
# Restart the daemon - run this if pages opened by the bridge were closed manually
|
|
50
50
|
# and the MCP connection has broken
|
|
51
|
-
npx fastbrowser_cli server restart
|
|
51
|
+
npx fastbrowser_cli@latest server restart
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
|
|
@@ -66,10 +66,10 @@ The daemon binds to one backend at startup. If it is already running with a diff
|
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
68
|
# Use chrome-devtools-mcp for one command
|
|
69
|
-
npx fastbrowser_cli --mcp-target chrome_devtools list_pages
|
|
69
|
+
npx fastbrowser_cli@latest --mcp-target chrome_devtools list_pages
|
|
70
70
|
|
|
71
71
|
# Switch the running daemon to a different backend
|
|
72
|
-
npx fastbrowser_cli --mcp-target chrome_devtools server restart
|
|
72
|
+
npx fastbrowser_cli@latest --mcp-target chrome_devtools server restart
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
|
|
@@ -224,47 +224,54 @@ Example queries on it:
|
|
|
224
224
|
|
|
225
225
|
```bash
|
|
226
226
|
# Query the accessibility tree returning the FIRST match per selector (--selector is repeatable)
|
|
227
|
-
npx fastbrowser_cli query_selectors --selector "button" --selector "link"
|
|
227
|
+
npx fastbrowser_cli@latest query_selectors --selector "button" --selector "link"
|
|
228
228
|
|
|
229
229
|
# Include ancestor nodes in the result
|
|
230
|
-
npx fastbrowser_cli query_selectors --selector 'heading[level="1"]' --with-ancestors
|
|
230
|
+
npx fastbrowser_cli@latest query_selectors --selector 'heading[level="1"]' --with-ancestors
|
|
231
231
|
|
|
232
232
|
# Include the descendant subtree of each match
|
|
233
|
-
npx fastbrowser_cli query_selectors --selector 'main' --with-children
|
|
233
|
+
npx fastbrowser_cli@latest query_selectors --selector 'main' --with-children
|
|
234
234
|
|
|
235
235
|
# Per-selector control over withAncestors / withChildren via JSON
|
|
236
|
-
npx fastbrowser_cli query_selectors \
|
|
236
|
+
npx fastbrowser_cli@latest query_selectors \
|
|
237
237
|
--selectors-json '[{"selector":"button","withAncestors":true},{"selector":"link","withChildren":true}]'
|
|
238
238
|
|
|
239
239
|
# Pass --all to return every match per selector; --limit caps results per selector (0 = unlimited)
|
|
240
|
-
npx fastbrowser_cli query_selectors --all --selector "button" --selector "link" --limit 5
|
|
240
|
+
npx fastbrowser_cli@latest query_selectors --all --selector "button" --selector "link" --limit 5
|
|
241
241
|
|
|
242
242
|
# Include ancestor nodes in the result
|
|
243
|
-
npx fastbrowser_cli query_selectors --all --selector 'heading[level="1"]' --with-ancestors
|
|
243
|
+
npx fastbrowser_cli@latest query_selectors --all --selector 'heading[level="1"]' --with-ancestors
|
|
244
244
|
|
|
245
245
|
# Per-selector control over limit / withAncestors / withChildren via JSON (with --all)
|
|
246
|
-
npx fastbrowser_cli query_selectors --all \
|
|
246
|
+
npx fastbrowser_cli@latest query_selectors --all \
|
|
247
247
|
--selectors-json '[{"selector":"button","limit":3,"withAncestors":true},{"selector":"link","limit":0,"withChildren":true}]'
|
|
248
248
|
|
|
249
249
|
# Take an accessibility-tree full page snapshot of the current page - very expensive, prefer targeted queries when possible
|
|
250
|
-
npx fastbrowser_cli take_snapshot
|
|
250
|
+
npx fastbrowser_cli@latest take_snapshot
|
|
251
251
|
```
|
|
252
252
|
|
|
253
253
|
## Interaction
|
|
254
254
|
|
|
255
255
|
```bash
|
|
256
256
|
# Click by a direct uid reference (fast path - no accessibility-tree lookup)
|
|
257
|
-
npx fastbrowser_cli click --selector "#1_42"
|
|
257
|
+
npx fastbrowser_cli@latest click --selector "#1_42"
|
|
258
258
|
|
|
259
259
|
# Click by any CSS-like selector - resolved to a uid internally
|
|
260
|
-
npx fastbrowser_cli click -s 'button[name="Submit"]'
|
|
260
|
+
npx fastbrowser_cli@latest click -s 'button[name="Submit"]'
|
|
261
261
|
|
|
262
262
|
# Fill a single form field - selector can be a uid (#1_7) or any CSS-like selector
|
|
263
|
-
npx fastbrowser_cli fill_form -s 'textbox[name="Email"]' -v "hello@example.com"
|
|
263
|
+
npx fastbrowser_cli@latest fill_form -s 'textbox[name="Email"]' -v "hello@example.com"
|
|
264
264
|
|
|
265
265
|
# Press a comma-separated sequence of keys (literals and named keys both work)
|
|
266
|
-
npx fastbrowser_cli press_keys --keys "Tab, Tab, Enter"
|
|
267
|
-
npx fastbrowser_cli press_keys --keys "Hello, Tab, Enter"
|
|
266
|
+
npx fastbrowser_cli@latest press_keys --keys "Tab, Tab, Enter"
|
|
267
|
+
npx fastbrowser_cli@latest press_keys --keys "Hello, Tab, Enter"
|
|
268
|
+
|
|
269
|
+
# Evaluate a JS function in the page context and get its JSON-able return value
|
|
270
|
+
npx fastbrowser_cli@latest evaluate_script --script 'function() { return { title: document.title, url: location.href }; }'
|
|
271
|
+
|
|
272
|
+
# Same, reading the function from a file or piped stdin
|
|
273
|
+
npx fastbrowser_cli@latest evaluate_script ./my_script.js
|
|
274
|
+
echo 'function() { return document.querySelectorAll("a").length; }' | npx fastbrowser_cli@latest evaluate_script
|
|
268
275
|
```
|
|
269
276
|
|
|
270
277
|
## Batch Execution
|
|
@@ -281,16 +288,16 @@ By default, the batch stops at the first failing line (shell `set -e` semantics)
|
|
|
281
288
|
|
|
282
289
|
```bash
|
|
283
290
|
# From a file
|
|
284
|
-
npx fastbrowser_cli batch ./demo.fbs
|
|
291
|
+
npx fastbrowser_cli@latest batch ./demo.fbs
|
|
285
292
|
|
|
286
293
|
# Piped on stdin
|
|
287
|
-
cat demo.fbs | npx fastbrowser_cli batch
|
|
294
|
+
cat demo.fbs | npx fastbrowser_cli@latest batch
|
|
288
295
|
|
|
289
296
|
# Inline script
|
|
290
|
-
npx fastbrowser_cli batch --script $'press_keys --keys "Enter"\nclick -s \'button[name^="Tout effacer"]\''
|
|
297
|
+
npx fastbrowser_cli@latest batch --script $'press_keys --keys "Enter"\nclick -s \'button[name^="Tout effacer"]\''
|
|
291
298
|
|
|
292
299
|
# Continue through failures
|
|
293
|
-
npx fastbrowser_cli batch --no-stop-on-error ./demo.fbs
|
|
300
|
+
npx fastbrowser_cli@latest batch --no-stop-on-error ./demo.fbs
|
|
294
301
|
```
|
|
295
302
|
|
|
296
303
|
Example `demo.fbs`:
|
|
@@ -315,6 +322,7 @@ press_keys --keys "Tab, Enter"
|
|
|
315
322
|
| `click` | Click an element by accessibility selector | `--selector` / `-s` |
|
|
316
323
|
| `fill_form` | Fill a form field by accessibility selector | `--selector` / `-s`, `--value` |
|
|
317
324
|
| `press_keys` | Press a comma-separated key sequence | `--keys` |
|
|
325
|
+
| `evaluate_script` | Run a JS function in the page context and return its JSON-able result | one of: `<file>`, `--script`, or piped stdin |
|
|
318
326
|
| `batch` | Run multiple commands from a file, piped stdin, or `--script` inline | one of: `<file>`, `--script`, or piped stdin |
|
|
319
327
|
| `install [skill-folder]` | Install bundled skills into `<skill-folder>/skills/` (default: `.`) | — |
|
|
320
328
|
| `server start` | Start the HTTP server daemon | — |
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { execSync } from 'node:child_process';
|
|
2
|
+
|
|
3
|
+
const __dirname = new URL('.', import.meta.url).pathname;
|
|
4
|
+
|
|
5
|
+
export class FastBrowserHelper {
|
|
6
|
+
static async run(command: string): Promise<string> {
|
|
7
|
+
// const fullCommand = `npx fastbrowser_cli ${command}`;
|
|
8
|
+
const fullCommand = `npx tsx ${__dirname}../../fastbrowser_cli/fastbrowser_cli.ts ${command}`;
|
|
9
|
+
console.error(`Running command: ${fullCommand}`);
|
|
10
|
+
return execSync(fullCommand, { encoding: 'utf8' });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
static async navigatePage(url: string): Promise<void> {
|
|
14
|
+
await FastBrowserHelper.run(`navigate_page --url '${url}'`);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static async fillForm(selector: string, value: string): Promise<void> {
|
|
18
|
+
await FastBrowserHelper.run(`fill_form --selector '${selector}' --value '${value}'`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static async pressKeys(keys: string): Promise<void> {
|
|
22
|
+
await FastBrowserHelper.run(`press_keys --keys '${keys}'`);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static async click(selector: string): Promise<void> {
|
|
26
|
+
await FastBrowserHelper.run(`click -s '${selector}'`);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
static async querySelectorsAll(selector: string, limit: number): Promise<string> {
|
|
30
|
+
return await FastBrowserHelper.run(`query_selectors --all --selector '${selector}' --limit ${limit}`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
static async querySelectorsAllWithChildren(selector: string, limit: number): Promise<string> {
|
|
34
|
+
return await FastBrowserHelper.run(`query_selectors --all --selector '${selector}' --limit ${limit} --with-ancestors --with-children`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
static async takeSnapshot(): Promise<string> {
|
|
38
|
+
return await FastBrowserHelper.run('take_snapshot');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static async querySelectors(selector: string, withAncestors = true): Promise<string> {
|
|
42
|
+
const flag = withAncestors === false ? ' --no-with-ancestors' : '';
|
|
43
|
+
return await FastBrowserHelper.run(`query_selectors --selector '${selector}'${flag}`);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
static async evaluateScript(functionText: string): Promise<string> {
|
|
47
|
+
return await FastBrowserHelper.run(`evaluate_script --script "${functionText}"`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# linkedin_cli
|
|
2
|
+
|
|
3
|
+
Command-line tool to interact with LinkedIn through a real browser session, driven by `fastbrowser_cli`.
|
|
4
|
+
|
|
5
|
+
It lets you create posts on the feed and manage direct-message conversations (list, read, send) from the terminal.
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
- A running `fastbrowser_cli` session already authenticated on `linkedin.com`.
|
|
10
|
+
- The `_shared/fastbrowser_helper.ts` wrapper located in the sibling `contribs/_shared/` folder.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx tsx ./src/cli.ts <command> [args]
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Commands
|
|
19
|
+
|
|
20
|
+
| Command | Description |
|
|
21
|
+
|---------|-------------|
|
|
22
|
+
| `post <content>` | Create a post on the LinkedIn feed. |
|
|
23
|
+
| `dm_page` | Navigate to the LinkedIn messaging page. Run this first before any `dm_*` command. |
|
|
24
|
+
| `dm_list` | List the names of people you have conversations with. |
|
|
25
|
+
| `dm_send <target_user> <message>` | Send a message in an existing conversation with `target_user`. |
|
|
26
|
+
| `dm_thread <target_user>` | Print the message thread of a conversation with `target_user`. |
|
|
27
|
+
| `profile <slug>` | Export a LinkedIn profile by slug (the path component of `/in/<slug>/`). Use `-f json` for JSON output. |
|
|
28
|
+
|
|
29
|
+
`target_user` is matched against the conversation heading via a prefix match (e.g. `"Jerome"` matches `"Jerome Etienne"`).
|
|
30
|
+
|
|
31
|
+
### Examples
|
|
32
|
+
|
|
33
|
+
Create a post:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx tsx ./src/cli.ts post "Hello LinkedIn from the CLI"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
List your conversations:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx tsx ./src/cli.ts dm_page
|
|
43
|
+
npx tsx ./src/cli.ts dm_list
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Read a thread:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx tsx ./src/cli.ts dm_thread "Jerome Etienne"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Output is one message per line in the form:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
2026-05-03T14:32:00:Jerome Etienne: hey, are you free this week?
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Send a reply:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npx tsx ./src/cli.ts dm_send "Jerome Etienne" "Sure, Thursday afternoon works."
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Export a profile as markdown (default):
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npx tsx ./src/cli.ts profile jeromeetienne
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Export the same profile as JSON:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npx tsx ./src/cli.ts profile jeromeetienne -f json
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Layout
|
|
77
|
+
|
|
78
|
+
- [src/cli.ts](src/cli.ts) — Commander entry point, defines the commands and orchestrates browser actions through `FastBrowserHelper`.
|
|
79
|
+
- [src/libs/linkedin_thread_helper.ts](src/libs/linkedin_thread_helper.ts) — Parses the LinkedIn message thread from an accessibility tree snapshot into timestamped lines.
|
|
80
|
+
- [src/libs/linkedin_profile_helper.ts](src/libs/linkedin_profile_helper.ts) — Parses a LinkedIn profile snapshot into a typed `LinkedinProfile` (header, About, Experience, Education) with markdown rendering.
|