Introducing `npx create-chat-gpt-plugin`

I was having a lot of fun building chat gpt plugins and using them for my personal workflows. To help me rapidly prototype I built a script that asks GPT to write a plugin for me. It will create a template with node.js, typescript, and express for whatever topic you ask it to: Here is an example of a github plugin that it generated and I didn’t have to do any manual modifications.

I’ve tried it with a few examples and gotten pretty good results:

  • Yelp businesses near a location
  • Generate a QR code from a link
  • Stock prices
  • Weather
  • PR summary

I would love if people checked it out and let me know what they think! GitHub - SawyerHood/create-chat-gpt-plugin: A script that uses GPT to generate a chat-gpt-plugin for you.


OMG. Amazing Sawyer! This is something I’ve been looking for actually. A quick way to prototype plugins in ChatGPT. Thank you.

1 Like

Hi Sawyer:

Thank you for this tool!

I had used it with the following input:
What is your project named?: recipe-generator
What is the topic of your plugin for GPT to use for generation? A recipe generator that can take ingredients and cuisine as input and produce a recipe with detailed cooking instructions and a meal description that can be used to generate an image.

I had 2 plugins installed: the recipe generator (using your tool) and instacart (available in the plugin store). What is interesting is that GPT-4 asked if I wanted to order items in the recipe and then called the instacart plugin with a shopping list based on the recipe. I can point you to the github repo if you’re interested. I was surprised that based on the context, GPT chose to automatically invoke the instacart plugin.

1 Like

@sawyer, thanks for this script :slight_smile:

Since it’s awesome, I added it to our awesome repo: GitHub - pluginlab-ai/awesome-chatgpt-plugins: A curated list of awesome ChatGPT Plugins.



@sawyer I tried and am getting this when generating the code:

Generating index.ts file...
    const headers = new Headers(config.headers);

ReferenceError: Headers is not defined

Sorry @cyberjunkie I was out on vacation so I didn’t see this. You need at least node 18 to use this utility. Let me update the package.json of the package!

1 Like

This is cool! How did you generate OpenAPI specs? Are you using ChatGPT for that too based on the routes?

hi,great job.
i cloned it to my computer, and after i ran, it shows:
const error = new Error(message);

Error: Network Error
at createError (/Users/liguanghe/.npm/_npx/a67ddc7a09eebd4d/node_modules/langchain/dist/util/axios-fetch-adapter.cjs:319:19)
at getResponse (/Users/liguanghe/.npm/_npx/a67ddc7a09eebd4d/node_modules/langchain/dist/util/axios-fetch-adapter.cjs:196:16)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async fetchAdapter (/Users/liguanghe/.npm/_npx/a67ddc7a09eebd4d/node_modules/langchain/dist/util/axios-fetch-adapter.cjs:172:18) {
config: {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false

my version:
Node.js v20.1.0
Mac os

so what could i do ~?

@AliceLee I wasn’t able to reproduce on MacOS also on node 20.1.0. Would it be possible that you selected the GPT4 option but your OpenAI account doesn’t have access to it yet?

Yeah I use OpenAI to generate the OpenAPI specs as well.

Good day.
i can access to gpt4. and i used gpt3.5,not gpt4. should i change node version~?

Hey Alice I ran into the same error but project folder was still generated on my Desktop

If you cd into your project directory and run

npm ls express
npm ls cors
npm ls axios
npm ls typescript
npm ls ts-node
npm ls @types/express
npm ls @types/cors
npm ls @types/node

You should see a version for everything, if anything has (empty) you will need to install that.

I think somehow this step was getting blocked maybe by my VPN?

So after making sure everything was installed I just had to change the index.js to index.ts not sure why that happened either and it worked!

Curious if these steps help you / if you found a fix

i did what u tought me what to do, and it works~ amazing.
One more question,is there just for Front-end pages. Should i still need to write back-end script, like an sql to record for example? where i should put back-end script to?

seems this website does the same work

1 Like

Hi Alice,

Langdock does provide a similar capability, but it’s more extensive and comes with certain usage limits and costs. Whats cool about @sawyer npx command is it offers a quick and straightforward way to prototype ChatGPT plugins right in your development environment. This could be a better fit if you’re seeking a more lightweight and customizable solution.

On your frontend/backend question: The setup doesn’t include a traditional frontend. Instead, the command builds a “backend” application using Node.js, TypeScript, and Express, which processes requests and sends responses. This application communicates directly with the ChatGPT plugin API, which you can consider our interface in this context.

As for your SQL question, yes, you can absolutely integrate a database within your Express application. If you want to store some data (like queries or responses), you could write a SQL script that interacts with your chosen database (such as PostgreSQL or MySQL) directly within your Express routes. You can even ask ChatGPT itself about how to integrate SQL within an Express application.


thanks a lot for teaching me these, i’ll try to use Node.js, TypeScript, and Express.
just for nice, have u submit this plugin to openai to review~? looking forward to meeting it on chatgpt~

1 Like

how to make several functions in one plugins in your create-your-plugins?

1 Like