I built this to programmatically interact with Grok directly through the X.com web UI.
The motivation is simple: I’m already paying for an X Premium subscription. I have enough API keys scattered around, and I didn't want to open yet another billing account just to use an AI I already have access to.
*Tech stack:* Node.js + Playwright (Chromium) + Turndown.
*The core idea:* Persist an X browser session, navigate to `x.com/i/grok`, type the prompt, wait for the streaming response to stabilize, then extract the reply DOM and convert it back to Markdown via Turndown with custom rules (Grok renders headings as `display:block` spans and bold as hashed utility classes, not semantic HTML).
The fragile part is those hashed CSS class names — X's CSS-in-JS pipeline regenerates them on every front-end deploy. We centralize them in a `SELECTORS` constant and ship an `npm run inspect` script that re-discovers the new classes when things break.
*Limitations (honest):*
* Requires X Premium.
* Needs a GUI for the initial login (no headless CI support for the very first run).
* Sessions expire; re-login is manual due to CAPTCHA/2FA.
* DOM selectors break on X front-end deploys — recoverable via the inspect script, but not zero-maintenance.
* Technically violates X ToS — low risk for personal/low-frequency use, but a real consideration.
Would love to hear your thoughts!
I have developed a software called Meogic that aims to alleviate your information anxiety.
Unlike other outline software, Meogic emphasizes the process of how you handle information.
It allows you to conveniently gather information from the bottom-up and effortlessly organize it from the top-down, eventually creating your own information system.
Currently, this software is in the Early Access (EA) stage and is available for free trial. I would greatly appreciate your feedback after using it.
Thank you.
You can focus the project