filiksyos/gitreverse
Reverse engineer any repo into it's original prompt
GitReverse – One‑click synthetic prompt for any public repo
What it does
- Takes a public GitHub repository (URL or
owner/reposhorthand) and creates a short, conversational prompt that could be fed to code‑generation models such as Cursor, Claude Code, or Codex. - The prompt is built from three pieces of data pulled via the GitHub API:
- Repository metadata (description, stars, etc.)
- A shallow file‑tree (top‑level files and folders)
- The repository’s README.
- An LLM then synthesises these inputs into a single, human‑friendly prompt that describes the project well enough for a model to “re‑create” it from scratch.
How you use it
- Open the home page, paste a GitHub URL or
owner/repostring, and hit reverse. - The app fetches the data, calls the configured LLM, and returns the generated prompt.
- You can share the result via a permanent link like
/vercel/next.js; the same flow runs when anyone visits that URL. - Optional features:
- /library – browse cached prompts (requires a Supabase account).
- /history – view your own prompt history when signed in.
- GitHub‑style
/owner/repo/tree/...URLs automatically redirect to the shareable page.
Key technical details
- Frontend: Next.js 16 (App Router) + React 19 + TypeScript + Tailwind CSS 4.
- Backend: Server‑side code runs in the same Next.js app; it calls the GitHub API for repo data and an LLM API for generation.
- LLM providers (quick reverse endpoint):
- xAI Grok (
grok-3) - OpenRouter (default
google/gemini-2.5-pro) - Azure OpenAI (
gpt-5.4) - Google AI Studio (
gemini-2.5-pro) - ApiSmart (
DEEPSEEK_V4_FLASH) - The app auto‑selects the first available key, or you can pin a provider via
GITREVERSE_QUICK_LLM.
- xAI Grok (
- Embeddings / library search: Uses Azure OpenAI embeddings by default; falls back to a generic OpenAI key if needed.
- Optional services:
- Supabase – caches generated prompts and powers the
/librarypage. - Stripe – mentioned in the stack, presumably for sponsorship or paid features.
- Supabase – caches generated prompts and powers the
- Environment configuration:
.env.examplelists all required variables. In production a non‑defaultVIEWS_IP_SALTis mandatory to prevent the app from starting with insecure defaults.
Getting started
# install dependencies
pnpm install
# run locally
pnpm dev # then open http://localhost:3000
Build and start for production with pnpm build && pnpm start. Linting and a regression test suite (pnpm test:library) are also provided.
License
- The source code is released under the MIT License. Third‑party assets retain their original licenses.
Who might find this useful?
- Developers who want a quick, model‑ready description of an open‑source codebase.
- Educators or reviewers needing a concise prompt to feed into AI‑assisted code‑generation tools.
- Anyone building a UI around LLM‑driven code synthesis and needing a reproducible way to turn a repo into a prompt.
Related
- Project
- Project
- Project
- Project
- Project