Repo Gist Userscript
A Tampermonkey userscript that enhances T3 Chat by providing GitHub repository context to your conversations. This script allows you to import repositories and use their contents as additional context for your chat interactions.
Features
- Import public GitHub repositories directly into your T3 Chat conversations
- Automatically enhances chat prompts with relevant repository context
- Clean and intuitive UI integration with T3 Chat
- Persistent storage of repository data using IndexedDB
- Debug mode for troubleshooting
- Secure API key management
Prerequisites
- Tampermonkey browser extension
- A Gemini API key (for context generation)
- A RepoGist API URL (for repository ingest)
Installation
- Install the Tampermonkey browser extension from tampermonkey.net
- Click on the Tampermonkey icon in your browser
- Select "Create a new script"
- Copy and paste the entire contents of
repo-gist.js
into the editor
- Save the script (Ctrl+S or File > Save)
Configuration
The script requires two API configurations:
- RepoGist API URL: The endpoint for repository import
- Gemini API Key: Used for generating relevant context from repository contents
You can configure these in two ways:
Automatic Configuration
- The first time you click the "Import Repo" button, a configuration modal will appear
- Enter your RepoGist API URL and Gemini API key
- Click "Save" to store the configuration
Manual Configuration
You can also configure the APIs through Tampermonkey's menu:
- Click the Tampermonkey icon
- Find "Repo Gist" in the menu
- Use the following commands:
- "Reset Gemini API Key" - Clear and reconfigure the Gemini API key
- "Reset RepoGist API URL" - Clear and reconfigure the RepoGist API URL
RepoGist API Options
You have two options for using the RepoGist API:
- Use the Public API (Recommended for most users):
- Use the default endpoint:
- No setup required
- Subject to rate limits and availability
- Self-host the API (For advanced users):
- Fork the Repo Gist repository
- Follow the setup instructions in the forked repository
- Deploy to your preferred hosting platform (Vercel, Railway, etc.)
- Use your deployed API URL in the configuration
Usage
- Navigate to T3 Chat
- Look for the "Import Repo" button in the message actions area
- Click the button and enter a GitHub repository URL
- The script will import the repository and enhance your chat interactions with relevant context
Supported Repository URLs
The script supports the following URL formats:
Debug Mode
To enable debug mode:
- Click the Tampermonkey icon
- Find "Repo Gist" in the menu
- Click "Toggle debug logs"
Debug mode will show detailed logs in the browser console, which can be helpful for troubleshooting.
Data Management
The script stores repository data locally using IndexedDB. You can clear all stored data using the "Reset IndexedDB for all chats" option in the Tampermonkey menu.
Security
- API keys are stored securely using Tampermonkey's storage API
- Repository data is stored locally in your browser
- No data is sent to unauthorized endpoints
Support
For issues, feature requests, or contributions, please visit the GitHub repository.
License
This project is licensed under the MIT License - see the LICENSE file for details.