Add a Custom Connector
Installing a Custom Connector for Prompt Mixer
You can install a custom connector for Prompt Mixer either manually or via a GitHub release link. Below are updated instructions for both methods, including additional details for ensuring a successful installation.
Manual Installation
When installing a connector manually, you need to add the built main.js
file to your connector's folder.
Steps for Manual Installation
-
Build Your Connector: Before copying your connector's folder, make sure to build your connector's source code to generate the
main.js
file. Usually, this is done by running a build command likenpm run build
in your project directory. -
Locate the Application Data Folder:
- Windows:
C:\Users\[Your Username]\AppData\Roaming\promptmixer\connectors
- macOS:
/Users/[Your Username]/Library/Application Support/promptmixer/connectors
- Linux:
/home/[Your Username]/.config/promptmixer/connectors
Replace
[Your Username]
with your actual username on your operating system. - Windows:
-
Copy the Built Connector: Your first step is to navigate to the connectors directory. Here, you'll need to create a new folder that corresponds to your connector:
mkdir your-connector-name
Upon successful creation of this new directory, proceed by transferring your constructed
main.js
file into it. It is this step that places your built connector within its designated folder, ensuring it is properly organized within your project structure.
Installation via GitHub Release
To install a custom connector from a GitHub release, you must use the API link to access the latest release directly.
Steps for Installation via GitHub Release
-
Obtain the API Link: Ensure you have the correct API link to the latest release of the connector, which should look like:
https://api.github.com/repos/PromptMixerDev/prompt-mixer-sample-connector/releases/latest
-
Open Prompt Mixer: Launch the Prompt Mixer application.
-
Navigate to Connectors: Go to the "Connectors" section from the side menu within the Prompt Mixer app.
-
Add New Connector: Click on the "Add new" button located at the top right corner of the connectors panel.
-
Enter the GitHub API Link: In the "New Connector" form, fill the "Name" field and paste your GitHub API release link into the "Github link" field.
-
Install the Connector: Click the "Add connector" button. The app will fetch and install the connector using the provided link.