We also highly recommend using the Chrome extension ChatGPT Helper alongside MinRAGServer to increase productivity further. https://chromewebstore.google.com/detail/chatgpt-helper/pjaiffleeblodclagbgflpnmighceibl?hl=en
- Display and navigate a list of projects configured in JSON files.
- View the entire structure and all file contents of a project in new windows.
- Copy structure URLs and content URLs to the clipboard for use in ChatGPT.
- Configure visibility settings, including show/hide hidden files, timestamp URLs, and filter files and folders based on extensions or names.
- Customize appearance and add interactive features through CSS and JavaScript.
- Support for scraping plugins to enhance RAG model functionality.
-
Ensure you have Go installed on your machine. You can download it from the official website.
-
Clone this repository to your local machine.
git clone https://github.com/greatwhiz/MinRAGServer.git
cd MinRAGServer
- Build the project.
go mod tidy
go build
For Windows:
GOOS=windows GOARCH=amd64 go build
For Mac:
GOOS=darwin GOARCH=amd64 go build
- Configure the general settings in settings.json, and change the inclusive_extensions, exclusive_extensions, exclusive_folders (* means ignoring the parent path, like *build or bin/data):
{
"server_port": "8080",
"disable_external_network_browsing": true,
"show_hidden": false,
"time_stamp": true,
"inclusive_extensions": "js,ts,tsx,json,css,html",
"exclusive_extensions": "",
"exclusive_folders": "*build,bin/data"
}
- Create a folder named config and inside it, create a JSON file for each project you want to display. The JSON file should have the following structure:
{
"project_name": "Project 1",
"root_path": "/absolute_path/to/project",
"project_url": "http://external-domain:80",
"inclusive_extensions": "js,ts,tsx,json,css,cs,html,dart",
"exclusive_extensions": "",
"exclusive_folders": "*build,bin/data",
"exclusive_files": ""
}
Change the inclusive_extensions, exclusive_extensions, exclusive_folders (* means ignoring the parent path). The project_url includes the host and the port which can be accessed from the Internet. You can use dynamic DNS and port mapping to your local network.
- Run the server:
./MinRAGServer
- Open a web browser and navigate to http://localhost:8080.
- Map an external port on your router if necessary
- Click on a project name to view its file tree.
- Navigate through directories and view file contents.
- Copy file URLs and info to the clipboard.
- Use a scraper plugin to feed content to ChatGPT.
- (Optional) Enhance productivity with the ChatGPT Helper Chrome extension. https://chromewebstore.google.com/detail/chatgpt-helper/pjaiffleeblodclagbgflpnmighceibl?hl=en
- Modify static/style.css to customize the appearance.
- Add features with static/script.js.
- static/clipboard.js handles copy-to-clipboard functionality.
Contributions are welcome! Fork the repository, make changes, and open a pull request.
MinRAGServer is licensed under the MIT License. See the LICENSE file for details.