chatgpt.js
FreeEasy interaction with the ChatGPT DOM.
About chatgpt.js
chatgpt.js is an open-source JavaScript library designed to simplify interaction with the ChatGPT web interface's DOM. It provides a powerful, lightweight API for developers to programmatically access and manipulate elements within the ChatGPT page, enabling the creation of custom scripts, browser extensions, and user scripts. The library is available via npm for Node.js projects and as a CDN-hosted script for direct inclusion in web pages or userscripts. It also includes an interactive command-line interface (CLI) that can be used with various API providers, such as OpenRouter and Google AI, to interact with language models outside of the ChatGPT web interface. The project is maintained by KudoAI and is hosted on GitHub, where it has garnered over 2,000 stars and 172 forks.
Key Features
Pros & Cons
- Open-source and free to use
- Lightweight library with a focus on simplicity
- Well-documented with starter templates for common use cases
- Supports multiple integration methods (npm, CDN, userscripts, extensions)
- Active development and community support on GitHub
- Requires familiarity with JavaScript and DOM manipulation
- Dependent on the ChatGPT web interface structure, which may change
- CLI requires API keys from supported providers; free tier limits should be verified
- Not a standalone application; requires existing ChatGPT access or API keys
- Limited to interactions with ChatGPT and supported API providers