chatgpt.js  by KudoAI

JS library for client-side ChatGPT DOM interaction

created 2 years ago
1,980 stars

Top 22.7% on sourcepulse

GitHubView on GitHub
Project Summary

This library provides a client-side JavaScript interface for interacting with the ChatGPT web application's DOM. It targets developers building browser extensions, userscripts, or other web-based tools that need to automate or enhance their ChatGPT experience, offering a lightweight and object-oriented API for easy integration.

How It Works

The library operates by directly manipulating the Document Object Model (DOM) of the ChatGPT web interface. It exposes a JavaScript object, chatgpt, with methods to access and control various aspects of the chat, such as retrieving the last response, sending messages, and managing conversation history. This approach allows for deep integration without requiring API keys or server-side processing, leveraging the existing browser session.

Quick Start & Requirements

  • Import: Via CDN (ES11 or ES5) or local import for Chrome extensions.
  • Dependencies: Modern web browser.
  • Setup: Instantaneous via CDN. Local setup for Chrome extensions involves adding the script as a web-accessible resource.
  • Links: Userguide, Discuss

Highlighted Details

  • Client-side DOM manipulation for ChatGPT interaction.
  • Object-oriented, lightweight, and performant API.
  • Supports ES11 and ES5 import methods, plus Greasemonkey and Chrome extensions.
  • Numerous community projects built using the library are showcased.

Maintenance & Community

The project is actively maintained with contributions from a community of developers. Discussions and support are available via GitHub Discussions.

Licensing & Compatibility

The library is released under the MIT License, permitting commercial use and integration into closed-source projects.

Limitations & Caveats

As a client-side DOM manipulation library, it is inherently tied to the structure of the ChatGPT web interface. Future updates to ChatGPT's UI could potentially break the library's functionality, requiring updates to maintain compatibility.

Health Check
Last commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
8
Issues (30d)
0
Star History
15 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.