RUNE is a web application that integrates Large Language Model (LLM) capabilities with graph visualization to enhance developer productivity and code comprehension while using GitHub.
To access the app features you need to find and select a repository you want to analyze using the search bar on the home page.- Codebase review
- The codebase review feature in RUNE combines dynamic graph visualization, a code viewer on file node click, and brief repository data.
- Prompt bar for LLM queries
- The Prompt bar in RUNE serves as an interface to interact with LLMs, enabling you to pose natural language queries and receive detailed insights about your project structure. Due to the GitHub API limitations it can't store the content of all files and analyze it.
- Dynamic code analysis
- Dynamic code analysis in RUNE performs real-time code scrutiny, identifying issues, suggesting improvements, and fostering a proactive approach to code quality enhancement.
Warning It is recommended that you have access to GPT-4 via the OpenAI API. GPT-3.5 will probably fail to make correct knowledge graphs from your data. Since we still don't have access to GPT-4 OpenAI API, although we made our account a month ago and generated >1$ in billing a week ago, the
init_repo
,update_file
andadd_file
endpoints are still untested. We initialized knowledge graphs manually, through ChatGPT. Here be dragons.
You can download and run RUNE via Docker to automatically install Memgraph, frontend and the backend components, or install it manually if you prefer a more customized setup.
- Cloning the repository
First, you need to clone the Git repository that contains the RUNE app. If you already have the codebase, you can skip this step.
git clone https://github.com/memgraph/rune.git
Navigate into the RUNE root folder:
cd rune
- Generating the GitHub API Token
To access the GitHub API and get more available requests per hour, you need to create a personal access token. You can create one by following the steps below:
- Go to GitHub Personal Access Tokens settings page.
- Click on "Generate new token."
- Provide a descriptive note for the token (e.g., "magic-graph GitHub API Token").
- Click "Generate token" at the bottom.
Note: Ensure that you save the generated token in a safe place. It will not be shown again.
- Generating the News API token (optional for article recommendation)
To access NewsAPI and retrieve theme-related articles for your repository, you'll need to generate a NewsAPI token. Follow these steps:
- Go to the NewsAPI website and sign in or create an account.
- Once logged in, navigate to your account settings or dashboard.
- Copy your API key.
Note: It's important to securely store the generated token. Treat it as a sensitive credential, as it provides access to the NewsAPI. Keep it confidential and avoid sharing it publicly.
- Creating the .env file
In the root directory of your project, create a new file called .env
(if it doesn't already exist). This file will store your environment variables, including the GitHub API token.
Open the .env
file in a text editor and add the following lines:
REACT_APP_GITHUB_API_TOKEN=YOUR_GENERATED_GITHUB_TOKEN
REACT_APP_NEWS_API_TOKEN=YOUR_GENERATED_NEWSAPI_TOKEN
Replace YOUR_GENERATED_GITHUB_TOKEN
and YOUR_GENERATED_NEWSAPI_TOKEN
with the actual tokens you generated in previous steps.
-
Installing and running RUNE
You have the option to install RUNE using Docker, which will automatically install, set up and run the Memgraph database, the backend, and frontend components, or you can manually run the project locally for a more customized setup or if you already have Memgraph up and running.
You will need to have Node.js (version 14 or above) and npm (Node Package Manager) installed on your machine.
-
Install all required dependencies:
npm install
-
Run the app:
npm start
This command will compile the TypeScript code and launch the app in your default web browser. If it doesn't open automatically, you can visit
http://localhost:3000
in your browser to access the running app. -
Now that you have frontend up and running, you need to start the backend by following the installation steps for BOR.
- Starting the app
To start RUNE make sure you have a running Docker instance and Docker compose installed.
docker compose up
-
To access the running app after the installation process, you can visit http://localhost:3000
in your browser.