Skip to main content

Local web UI for generating LLM-ready context from any codebase

Project description

ContextForLLM

A local web UI that scans any project folder on your machine, lets you select and annotate files, and generates a structured prompt you can paste directly into any LLM chat — Claude, ChatGPT, Gemini, or any other.


Why this exists

Every other tool in this space is a CLI that dumps your entire repo into one file. ContextForLLM gives you a browser UI where you can:

  • Toggle individual files in or out
  • Add a note to any file that gets embedded into the prompt
  • Generate an AI summary of your project using Groq
  • Automatically split large projects into sequenced prompt parts
  • Set your task so the LLM knows exactly what to do

Demo

Screenshot / GIF coming soon


Installation

You need Python 3.8 or higher installed.

Step 1 — Clone the repo

git clone https://github.com/Desai-23/ContextForLLM.git
cd ContextForLLM

Step 2 — Install dependencies

pip install -r requirements.txt

Step 3 — Run the app

python app.py

Then open your browser at:

http://localhost:5000

How to use it

  1. Paste the path to any project folder on your machine
  2. Click Scan
  3. Review the files — toggle any file off to exclude it from the prompt
  4. Add annotations to files if needed (the LLM will see these notes)
  5. Optionally generate an AI summary of your project using Groq
  6. Set your task — what you want the LLM to do
  7. Click Generate Context Prompt
  8. Copy the prompt and paste it into any LLM chat

Features

  • Local — your code never leaves your machine
  • Browser UI — no terminal required after launch
  • Per-file exclusion — toggle files in or out with a switch
  • Per-file annotations — add notes that get embedded into the prompt
  • Token counter — live token count with a visual usage bar
  • Prompt splitting — large projects automatically split into sequenced parts with handoff instructions
  • AI project summary — uses Groq to generate a project summary injected at the top of every prompt
  • .contextignore support — create a .contextignore file in any project to permanently exclude files

.contextignore

Create a .contextignore file in any project folder to exclude files automatically on scan. Uses the same pattern syntax as .gitignore.

Example:

*.test.js
migrations/
old_auth.py

Groq API key

The AI summary feature requires a free Groq API key.

  1. Get a free key at console.groq.com
  2. Click "Add Groq Key" in the top right of the UI
  3. Paste your key — it is held in memory only and never saved to disk

Tech stack

  • Python / Flask — backend server
  • Vanilla HTML, CSS, JS — frontend UI
  • tiktoken — token counting
  • Groq — AI project summary (optional)

License

MIT

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

contextforllm-0.1.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

contextforllm-0.1.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file contextforllm-0.1.0.tar.gz.

File metadata

  • Download URL: contextforllm-0.1.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for contextforllm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d4f6e07b7079998db61c2be977c24c8467f9c1606e502b17560a421a8825d524
MD5 32b1f45e8375e5e5e23dbfe7c9fbe1b9
BLAKE2b-256 97f350c9288fa7a6f98b3cbbb4bbc5165ed2ecdaf58453ec39ec2cf7216fd09c

See more details on using hashes here.

File details

Details for the file contextforllm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: contextforllm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for contextforllm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 908c3f93ffe002bf7b524617166c037e30f63c306f6ebc4f75f17e2fa185dcad
MD5 19200ece33e98ae4e7f9f9125da5949a
BLAKE2b-256 e254eb35eadf4c8b1801e42f65c6fb990b03020e060e12047d221acfbb91b852

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page