Clone any GitHub repo and ask AI questions about the code.
Import a repository, browse files like in an IDE, and get instant explanations from AI. No more context switching between browser and editor.
git clone https://github.com/ashfromsky/gitra.git
cd gitra
pip install -r requirements.txt
python desktop.pyThe app will open automatically at http://127.0.0.1:46789
git clone https://github.com/ashfromsky/gitra.git
cd gitra
pip install -r requirements.txt
# Copy example env file
cp .env.example .env
# Add your Gemini API key to .env
# Get it free at https://aistudio.google.com/app/apikey
# Start server
uvicorn app.gitra:app --reload --port 8000Visit http://localhost:8000
git clone https://github.com/ashfromsky/gitra.git
cd gitra
docker-compose upVisit http://localhost:8000
Gitra is a code exploration tool. You paste a GitHub URL, and it clones the repo locally. Then you can:
- Browse files in a clean IDE-style interface
- Select any piece of code and ask AI about it
- Get bug reports and improvement suggestions
- View repository statistics (stars, forks, languages)
Think of it as "GitHub meets AI assistant" but running locally.
Code Browser
- Syntax highlighting for 20+ languages
- File tree with icons
- Markdown preview
- Image viewer
- Multi-tab editor
AI Assistant
- Analyze entire files or selected code
- Ask specific questions about logic
- Get bug detection and refactoring tips
- Works with Google Gemini API
Repository Stats
- GitHub metadata (stars, forks, watchers)
- Language breakdown
- Commit activity
- Topic tags
UI
- Dark/light themes (Gruvbox palette)
- Vim-inspired status line
- Keyboard shortcuts
- Tab management like VSCode
- Import - Paste any public GitHub URL
- Browse - Files are cloned to
downloaded_repos/ - Analyze - AI reads your code and system prompt from
app/routes/ai/genai_gemini/ - Ask - Select code, click "Ask AI", get explanations
The AI panel uses an iframe with local message passing. No code leaves your machine except API calls to Gemini.
user_config.json.
Do not commit this file. For production use, consider encryption.
You need a free Google Gemini API key. Get one at aistudio.google.com/app/apikey
Option 1: Settings UI
- Open Gitra
- Click the gear icon (top right)
- Paste your API key
- Click "Save Key"
Option 2: Environment Variable
# Add to .env file
GEMINI_API_KEY=AIzaSyD...your-key-hereOption 3: Config File
Keys are stored in user_config.json (auto-created, gitignored)
For repository stats, add a GitHub token:
# Add to .env
GITHUB_TOKEN=ghp_your-token-hereWithout this, stats will show limited data due to API rate limits.
gitra/
├── app/
│ ├── gitra.py # FastAPI app
│ ├── config_manager.py # Settings handler
│ ├── routes/
│ │ ├── basic/combined/repo.py # File browsing
│ │ ├── ai/base_response.py # AI endpoint
│ │ └── stats/repo_stats.py # GitHub stats
│ └── utils/exporter.py # Repo to markdown
├── templates/
│ ├── index.html # Landing page
│ ├── view_repo.html # IDE interface
│ └── repo_stats.html # Stats dashboard
├── static/
│ ├── ai_chat.html # AI panel iframe
│ └── *.svg # Logos
├── desktop.py # Desktop app launcher
└── downloaded_repos/ # Cloned repos (gitignored)
| Key | Action |
|---|---|
Cmd/Ctrl + K |
Open AI assistant |
Alt + W |
Toggle word wrap |
Esc |
Close active tab |
Current version supports:
- Public repositories only (private repos planned)
- Single AI provider (Gemini)
- Basic git operations (clone only, no pull/push)
Not supported yet:
- Multiple repositories open at once
- Search across files
- Git history browsing
- Code editing (read-only for now)
I got tired of switching between GitHub, my editor, and ChatGPT just to understand a new codebase. Wanted something that does all three in one window.
v1.1 - Core improvements
- Private repository support (OAuth)
- Search in files
- Multiple AI providers (Claude, local LLMs)
- Git operations (pull, checkout branches)
v1.2 - Advanced features
- Code editing with syntax checking
- Diff viewer
- Multi-repo workspace
# Install dev dependencies
pip install pytest pytest-asyncio
# Run tests
pytest tests/ -v# Install PyInstaller
pip install pyinstaller
# Build executable
pyinstaller desktop.py --onefile --windowed
# Output in dist/Pull requests are welcome. For major changes, open an issue first.
Areas that need help:
- Private repo authentication
- Alternative AI providers (Ollama, Claude)
- Search implementation
- Mobile UI improvements
- Backend: FastAPI, Uvicorn
- AI: Google Gemini 2.5 Flash
- Frontend: Vanilla JS (no frameworks)
- Styling: CSS variables (Gruvbox theme)
- Desktop: pywebview
- Syntax: highlight.js
- Icons: Inline SVG
MIT License - use it however you want.
See LICENSE for details.
- GitHub: github.com/ashfromsky/gitra
- Issues: github.com/ashfromsky/gitra/issues
- API Keys: aistudio.google.com/app/apikey
Built in Kyiv. Made for developers who read more code than they write.

