*** > [!IMPORTANT] > This project has moved to ***
English | 简体中文 | 繁體中文 | 日本 | 한국인 | हिंदी | नेपाली | Việt




## ⚡ Installation ### Library #### Node.js: From your project root: ```bash npm install @kudoai/chatgpt.js ``` #### [][web-usage][][web-usage][][web-usage][][web-usage][][web-usage] Web: [web-usage]: #-web ```js ``` #### [][greasemonkey-usage][][greasemonkey-usage][][greasemonkey-usage][][greasemonkey-usage][][greasemonkey-usage][][greasemonkey-usage] Greasemonkey: [greasemonkey-usage]: #-greasemonkey > **Note** _To use a starter template: [KudoAI/chatgpt.js-greasemonkey-starter](https://github.com/KudoAI/chatgpt.js-greasemonkey-starter)_ ```js // @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@4/dist/chatgpt.min.js // ==/UserScript== ``` #### [](#-chrome) Chrome: > **Note** _To use a starter template: [KudoAI/chatgpt.js-chrome-starter](https://github.com/KudoAI/chatgpt.js-chrome-starter)_ 1. Save https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@4/dist/chatgpt.min.js to `lib` 2. In project's (V3) `manifest.json`, add `lib/chatgpt.min.js` as a web accessible resource ```json "web_accessible_resources": [{ "matches": [""], "resources": ["lib/chatgpt.min.js"] }], ``` # ### CLI app #### Node.js: ```bash npm install -g @kudoai/chatgpt.js ``` # ### API keys Supported providers:
OpenRouter — 300+ models, dozens free
**1. Create API key: ** **2. Add key to environment:** ##### Windows: ```bash setx OPENROUTER_API_KEY "sk-or-v1-8a69..." ``` ##### Mac/Linux: ```bash export OPENROUTER_API_KEY="sk-or-v1-8a69..." ```
Google AI — Gemini + Gemma models
**1. Create API key: ** **2. Add key to environment:** ##### Windows: ```bash setx GOOGLE_API_KEY "AIzaSyB..." ``` ##### Mac/Linux: ```bash export GOOGLE_API_KEY="AIzaSyB..." ```

## 💻 Usage #### ES Modules (ESM): ```js import chatgpt from '@kudoai/chatgpt.js' console.log(await chatgpt.send('sup')) // e.g. => Hey! Not much—just here and ready to help. What's up with you? ``` #### CommonJS (CJS): ```js (async () => { const chatgpt = require('@kudoai/chatgpt.js') console.log(await chatgpt.send('sup')) // e.g. => Hey! What's up? })() ``` #### [](#-chrome) Chrome: ```js (async () => { await import(chrome.runtime.getURL('lib/chatgpt.min.js')) await chatgpt.isLoaded() console.log('ChatGPT is ready!') })() ``` #### Terminal: After setting an API key, control from your terminal: ```bash chatgpt --query "sup" # or gpt -q sup # e.g. => Hey there! What's up? chatgpt --ascii-art "cat" # or gpt -a cat # e.g. => # # |\ _,,,---,,_ # ZZZzz /,`.-'`' -. ;-;;,_ # |,4- ) )-,_. ,\ ( `'-' # '---''(_/--' `-'\_) chatgpt --commit-msg # or gpt -g (in a git repo) # e.g. => feat: add `--ascii-art` cli cmd ``` (Optional) Create [.chatgpt.config.mjs](https://github.com/KudoAI/chatgpt.js/blob/main/.chatgpt.config.mjs) (customize provider, etc.): ```bash chatgpt init # or gpt -i ``` View all CLI options: ```bash chatgpt --help ``` For more options & examples, see the extended user guide:

## 🚀 Made with chatgpt.js
### [][amazongpt-readme] [AmazonGPT][amazongpt-readme]  [](https://cdn.jsdelivr.net/gh/KudoAI/amazongpt@579eef3/assets/wolfram-award/letter.pdf)
Add AI chat & product/category summaries to Amazon shopping, powered by the latest LLMs!
> [][amazongpt-install] > [Greasemonkey][amazongpt-install] / > [][amazongpt-readme] > [README][amazongpt-readme] / > [][aiweb-discuss] > [Discuss][aiweb-discuss] [amazongpt-install]: https://github.com/adamlui/ai-web-extensions/tree/main/amazongpt/#-installation [amazongpt-readme]: https://github.com/adamlui/ai-web-extensions/tree/main/amazongpt/#readme ### [][ach-readme] [Autoclear ChatGPT History][ach-readme]  [](https://github.com/awesome-scripts/awesome-userscripts#privacy)
Auto-clear your ChatGPT query history for maximum privacy.
> [][ach-install] > [Greasemonkey][ach-install] / > [][ach-readme] > [README][ach-readme] / > [][aiweb-discuss] > [Discuss][aiweb-discuss] [ach-install]: https://github.com/adamlui/ai-web-extensions/tree/main/autoclear-chatgpt-history/#-installation [ach-readme]: https://github.com/adamlui/ai-web-extensions/tree/main/autoclear-chatgpt-history/#readme ### [][bravegpt-readme] [BraveGPT][bravegpt-readme]  [](https://www.producthunt.com/posts/bravegpt)
Add AI chat & search summaries to Brave Search, powered by the latest LLMs!
> [][bravegpt-install] > [Greasemonkey][bravegpt-install] / > [][bravegpt-readme] > [README][bravegpt-readme] / > [][aiweb-discuss] > [Discuss][aiweb-discuss] [bravegpt-install]: https://github.com/adamlui/ai-web-extensions/tree/main/bravegpt/#-installation [bravegpt-readme]: https://github.com/adamlui/ai-web-extensions/tree/main/bravegpt/#readme ### [][cac-readme] [ChatGPT Auto-Continue][cac-readme]  [][awesome-chatgpt-userscripts]
Automatically continue generating answers when ChatGPT responses get cut off.
> [][cac-chrome] > [Chrome][cac-chrome] / > [][cac-ff] > [Firefox][cac-ff] / > [][cac-edge] > [Edge][cac-edge] / > [][cac-readme] > [README][cac-readme] / > [][aiweb-discuss] > [Discuss][aiweb-discuss] [cac-chrome]: https://chromewebstore.google.com/detail/chatgpt-auto-continue/lbojnhaafilddefkdgmbplkafnckaoga?utm_source=github&utm_medium=referral&utm_content=ai-web-extensions-readme [cac-ff]: https://addons.mozilla.org/firefox/addon/chatgpt-auto-continue/?utm_source=github&utm_medium=referral&utm_content=ai-web-extensions-readme [cac-edge]: https://microsoftedge.microsoft.com/addons/detail/chatgpt-auto-continue/kaicnimcjamamnlbaeaneofmdjibgepl [cac-readme]: https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-auto-continue/#readme
### Have a library idea or request? Create a new Issue: https://github.com/KudoAI/chatgpt.js/issues/new
### [][car-readme] [ChatGPT Auto Refresh ↻][car-readme]  [][awesome-chatgpt-userscripts] Keeps ChatGPT sessions fresh, eliminating chat time limits + network errors + Cloudflare checks. > [][car-install] > [Greasemonkey][car-install] / > [][car-readme] > [README][car-readme] / > [][aiweb-discuss] > [Discuss][aiweb-discuss] [car-install]: https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-auto-refresh/#-installation [car-readme]: https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-auto-refresh/#readme ### [][cat-readme] [ChatGPT Auto-Talk 📣][cat-readme]  [][awesome-chatgpt-userscripts] Auto-play ChatGPT responses. > [][cat-install] > [Greasemonkey][cat-install] / > [][cat-readme] > [README][cat-readme] / > [][aiweb-discuss] > [Discuss][aiweb-discuss] [cat-install]: https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-auto-talk/#-installation [cat-readme]: https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-auto-talk/#readme ### [][ci-readme] [ChatGPT Infinity][ci-readme]  [][ci-chrome]
Generate endless answers powered by ChatGPT (on any topic!)
> [][ci-chrome] > [Chrome][ci-chrome] / > [][ci-ff] > [Firefox][ci-ff] / > [][ci-edge] > [Edge][ci-edge] / > [][ci-greasemonkey] > [Greasemonkey][ci-greasemonkey] / > [][ci-readme] > [README][ci-readme] / > [][aiweb-discuss] > [Discuss][aiweb-discuss] [ci-chrome]: https://chromewebstore.google.com/detail/chatgpt-infinity/amikeononomkhphopbflomhnmdijjpmb?utm_source=github&utm_medium=referral&utm_content=ai-web-extensions-readme [ci-ff]: https://addons.mozilla.org/firefox/addon/chatgpt-infinity/?utm_source=github&utm_medium=referral&utm_content=ai-web-extensions-readme [ci-edge]: https://microsoftedge.microsoft.com/addons/detail/chatgpt-infinity/jgonecnbmehicpdpjkdekamhmlebfagb [ci-greasemonkey]: https://raw.githubusercontent.com/adamlui/chatgpt-infinity/refs/heads/main/greasemonkey/chatgpt-infinity.user.js [ci-readme]: https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-infinity/#readme ### [][cwm-readme] [ChatGPT Widescreen][cwm-readme]  [][cwm-readme]
Enhances ChatGPT with wide/full/tall-screen + spamblock modes. Also works on poe.com!
> [][cwm-chrome] > [Chrome][cwm-chrome] / > [][cwm-ff] > [Firefox][cwm-ff] / > [][cwm-edge] > [Edge][cwm-edge] / > [][cwm-greasemonkey] > [Greasemonkey][cwm-greasemonkey] / > [][cwm-readme] > [README][cwm-readme] / > [][aiweb-discuss] > [Discuss][aiweb-discuss] [cwm-chrome]: https://chromewebstore.google.com/detail/chatgpt-widescreen/jgnjpnmofkalfliddjelaciggjgnphgm?utm_source=github&utm_medium=referral&utm_content=ai-web-extensions-readme [cwm-ff]: https://addons.mozilla.org/firefox/addon/chatgpt-widescreen/?utm_source=github&utm_medium=referral&utm_content=ai-web-extensions-readme [cwm-edge]: https://microsoftedge.microsoft.com/addons/detail/chatgpt-widescreen-mode/obnaaalnokmchdoagnhmllakaclaaooa [cwm-greasemonkey]: https://raw.githubusercontent.com/adamlui/chatgpt-widescreen/refs/heads/main/greasemonkey/chatgpt-widescreen.user.js [cwm-readme]: https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-widescreen/#readme ### [][ddgpt-readme] [DuckDuckGPT][ddgpt-readme]  [](https://www.producthunt.com/posts/duckduckgpt)
Add AI chat & search summaries to DuckDuckGo, powered by the latest LLMs!
> [][ddgpt-install] > [Greasemonkey][ddgpt-install] / > [][ddgpt-readme] > [README][ddgpt-readme] / > [][aiweb-discuss] > [Discuss][aiweb-discuss] [ddgpt-install]: https://github.com/adamlui/ai-web-extensions/tree/main/duckduckgpt/#-installation [ddgpt-readme]: https://github.com/adamlui/ai-web-extensions/tree/main/duckduckgpt/#readme ### [][googlegpt-readme] [GoogleGPT][googlegpt-readme]  [][awesome-chatgpt-userscripts]
Add AI chat & search summaries to Google Search, powered by the latest LLMs!
> [][googlegpt-install] > [Greasemonkey][googlegpt-install] / > [][googlegpt-readme] > [README][googlegpt-readme] / > [][aiweb-discuss] > [Discuss][aiweb-discuss] [googlegpt-install]: https://github.com/adamlui/ai-web-extensions/tree/main/googlegpt/#-installation [googlegpt-readme]: https://github.com/adamlui/ai-web-extensions/tree/main/googlegpt/#readme ### ThunderAI  [Rated 5-stars] > Use ChatGPT in Thunderbird to enhance your emails, even with a free account!
[Install](https://addons.thunderbird.net/thunderbird/addon/thunderai/) / [README](https://github.com/micz/ThunderAI#readme) / [Support](https://github.com/micz/ThunderAI/issues)
## 🧠 Contributors

All contributions are welcome!
## 🏛️ License ### MIT License **Copyright © 2023–2026 [KudoAI](https://github.com/KudoAI) & [contributors](./#-contributors).** Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**[Latest releases](https://github.com/KudoAI/chatgpt.js/releases)** / [Userguide](https://github.com/KudoAI/chatgpt.js/blob/v4.15.6/docs/USERGUIDE.md) / [Get support](https://github.com/KudoAI/chatgpt.js/issues) / [Discuss](https://github.com/KudoAI/chatgpt.js/discussions) / [Back to top ↑](#top)
[aiweb-discuss]: https://github.com/adamlui/ai-web-extensions/discussions [awesome-chatgpt-userscripts]: https://github.com/awesome-scripts/awesome-userscripts#-chatgpt