GitHub Assistant
In this guide, you'll get hands on experience with PromptQL and the GitHub connector. We will be building a "Github Issues" assistant.
You will learn how to:
- Set up PromptQL to work with a GitHub issues and pull requests.
- You will be able to do natural language query to triage feature requests, bugs and other issues with your connected Github repository.
- Create and configure the necessary API keys.
- Run your PromptQL project in a local environment.
- Ask your questions with PromptQL playground.
Prerequisites
Install the DDN CLI
To use this guide, ensure you've installed/updated your CLI to at least v2.28.0
.
- macOS and Linux
- Windows
Simply run the installer script in your terminal:
curl -L https://graphql-engine-cdn.hasura.io/ddn/cli/v4/get.sh | bash
Currently, the CLI does not support installation on ARM-based Linux systems.
- Download the latest DDN CLI installer for Windows.
- Run the
DDN_CLI_Setup.exe
installer file and follow the instructions. This will only take a minute. - By default, the DDN CLI is installed under
C:\Users\{Username}\AppData\Local\Programs\DDN_CLI
- The DDN CLI is added to your
%PATH%
environment variable so that you can use theddn
command from your terminal.
Install Docker
The Docker-based workflow helps you iterate and develop locally without deploying any changes to Hasura DDN, making the
development experience faster and your feedback loops shorter. You'll need Docker Compose v2.20
or later.
Validate the installation
You can verify that the DDN CLI is installed correctly by running:
ddn doctor
Build your PromptQL app
##ge# Clone the example project
The example project is already set up to connect PromptQL to any GitHub repo.
git clone git@github.com:hasura/example-promptql-github.git
cd example-promptql-github
Set up your .env file
Set up your .env file with your GitHub API token.
cp .env.example .env
Add GitHub API token to .env
For the Github integration. Create an API token from https://github.com/settings/tokens
# .env
...
GITHUB_API_TOKEN=<GITHUB_API_TOKEN>
This token only needs read access to the repo you are interested in.

Set up your GitHub repo
Head to app/connector/github/index.ts
and change the org name and the repo name to something you'd like:
// index.ts
...
const manager = new GitHubIssueSyncManager('<org-name>', '<repo-name>');
if (!process.env.GITHUB_API_TOKEN) {
...