This Chrome extension enables you to pass a query parameter to ChatGPT. It automates the process of inputting a prompt to the ChatGPT interface, reducing the number of steps needed to generate a result. It takes the text passed via the "prompt-text" query parameter, places it into the prompt field, and activates the prompt button.
Note: This extension is designed for use on a Mac running Chrome and passing the query parameter via an Alfred workflow. However, it can be adapted to other setups as long as the text is passed to the query parameter named "prompt-text" on chat.openai.com.
Before you get started, you must sign up for an account on chat.openai.com and log in. The extension will only work if you are logged into ChatGPT.
-
Ensure you have git installed locally.
-
Navigate to the directory where you would like to store these files.
-
Run the following command to clone the repository:
git clone https://github.com/ethanthompson/chatgpt-query-param-extension.git
You can also download the files and unzip them to any location on your computer. Choose a location that is unlikely to be deleted or changed, i.e., do not store the files in your Downloads folder.
-
Open the Alfred app and navigate to the workflows tool.
-
Create a blank workflow.
-
Create an "Open URL" action using these settings:
Be sure to use
?prompt-text={query}
in your URL. This will pass the value of your input to the browser URL, allowing the extension to grab it and place it in the prompt field. -
Test your workflow by opening the Alfred field and typing
chat this is a test
. Your browser should open and navigate tohttps://chat.openai.com/?prompt-text="this is a test"
. If it doesn't, double-check your steps.
- Open
chrome://extensions/
and enable Developer Mode (this should be a toggle in the upper right). - Click "Load Unpacked".
- Navigate to the folder where you have cloned this repo and select it.
- Enable the extension and accept the permission requirements.
- Open Alfred.
- Type
chat this is a test
and hit Enter. - This should open Chrome, and you should start seeing ChatGPT responding to the prompt.
- You're done! Now you can input prompts with ease.