OSCAR - GitHub-Specialized AI Coding Assistant
Project description
OSCAR — GitHub-Specialized AI Coding Assistant
A VS Code extension and CLI powered by the Asterix agentic framework and Gemini 2.5 Flash via Vertex AI. Specialized for GitHub workflows: branch comparison, PR review, diff analysis, and git automation.
Architecture
┌─────────────────────────────────────────────────────┐
│ VS Code Extension (TypeScript) │
│ ├── Sidebar WebviewViewProvider (chat UI) │
│ ├── Branch comparison widget │
│ └── HTTP/SSE client → FastAPI backend │
├─────────────────────────────────────────────────────┤
│ FastAPI Server (Python) │
│ ├── /chat, /branches, /compare, /review, /history │
│ └── SSE streaming for real-time progress │
├─────────────────────────────────────────────────────┤
│ OSCAR Agent Layer (Python) │
│ ├── Asterix Agent (ReAct loop, memory, state) │
│ ├── asterix_patch.py (Vertex AI Gemini integration) │
│ ├── Safety callbacks (on_before_tool_call) │
│ └── Audit logging (on_after_tool_call) │
├─────────────────────────────────────────────────────┤
│ Tools (registered via @agent.tool()) │
│ ├── git_* (status, compare, review, log, diff, ...) │
│ ├── shell (subprocess with safety checks) │
│ ├── web_search (Tavily with dual-key fallback) │
│ └── browser (Playwright: navigate, extract, search) │
├─────────────────────────────────────────────────────┤
│ LLM: Gemini 2.5 Flash via Vertex AI (ADC auth) │
│ Project: oscar-490517 | Region: us-central1 │
└─────────────────────────────────────────────────────┘
Features
- Git-specialized tools — status, branch compare, PR review, log, diff, checkout, commit, push
- Browser automation — navigate, search, extract content, download files (Playwright)
- Web search — Tavily-based with dual API key fallback
- Shell execution — cross-platform command runner with safe-command allowlist
- Human-in-the-loop safety — auto-approve low risk, confirm medium/high, typed
CONFIRMfor dangerous ops - Persistent memory — session context, knowledge base, user preferences via Asterix memory blocks
- Streaming progress — Server-Sent Events through FastAPI for real-time updates
- VS Code sidebar — chat UI with branch comparison widget (in development)
Installation
Prerequisites
- Python >= 3.10
- Google Cloud CLI (for Vertex AI auth)
Python Backend
git clone https://github.com/adityasarade/OSCAR.git
cd OSCAR
pip install -e .
playwright install chromium
Vertex AI Authentication
gcloud auth application-default login
Environment Variables
cp .env.example .env
Edit .env and set:
| Variable | Required | Description |
|---|---|---|
TAVILY_API_KEY1 |
Optional | Tavily web search API key |
TAVILY_API_KEY2 |
Optional | Fallback Tavily key for rate-limit rotation |
Vertex AI auth uses Application Default Credentials — no API key needed if gcloud auth is configured.
VS Code Extension (in development)
cd vscode-oscar
npm install
npm run compile
# Press F5 in VS Code to launch Extension Development Host
Usage
CLI
oscar # Start interactive session
oscar --debug # Debug mode
oscar --dry-run # Dry run (no destructive ops)
oscar --config-check # Verify configuration
Example session:
OSCAR> git status
OSCAR> compare main and feature-branch
OSCAR> review feature-branch against main
OSCAR> search for Python async best practices
OSCAR> navigate to https://docs.python.org
VS Code (in development)
Open the OSCAR sidebar from the activity bar to chat with the agent. The extension communicates with the FastAPI backend over HTTP/SSE.
Project Structure
src/oscar/
├── cli/main.py # CLI entry point
├── config/settings.py # Configuration and safety patterns
├── core/
│ ├── agent.py # Asterix agent orchestrator
│ ├── asterix_patch.py # Vertex AI + Gemini runtime bridge
│ └── safety.py # Human-in-the-loop safety callbacks
└── tools/
├── git_tool.py # Git operations (9 functions)
├── shell.py # Shell command execution
├── web_search.py # Tavily web search
└── browser.py # Playwright browser automation
Built With
- Asterix — Agentic framework (ReAct loop, memory, tool management)
- Gemini 2.5 Flash — LLM via Google Vertex AI
- FastAPI — HTTP backend with SSE streaming
- Playwright — Headless browser automation
- Tavily — Web search API
- Rich — Terminal UI and formatting
- Click — CLI framework
- TypeScript — VS Code extension
License
MIT
Author
Built by Aditya Sarade — Final year AI & Data Science, AISSMS IOIT, Pune.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oscar_agent-0.5.0.tar.gz.
File metadata
- Download URL: oscar_agent-0.5.0.tar.gz
- Upload date:
- Size: 35.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8005056bdac669118cc08ee48110c987581e78cbb9c6953f36a4886a7faf11d1
|
|
| MD5 |
c2ec13e06f92141e10716504af265a23
|
|
| BLAKE2b-256 |
035cfc3df0fa62e496d1f571128a3c653381071416a7c142ff5b616521a65490
|
File details
Details for the file oscar_agent-0.5.0-py3-none-any.whl.
File metadata
- Download URL: oscar_agent-0.5.0-py3-none-any.whl
- Upload date:
- Size: 41.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b59af580444e2e0f9efb0bddba4d971a97a693eb3ff4bee8b7f904b952125ee1
|
|
| MD5 |
41005c767519734d48e686aff3895764
|
|
| BLAKE2b-256 |
6b5ca2deab9a004215d6c420cec106950663acd8b133604096b905a84b67151f
|