A simple web-based GPT-like coding agent that allows users to describe code requirements in natural language and receive generated code responses with syntax highlighting and download options.
- Chat interface for code generation prompts
- Syntax-highlighted code blocks in responses
- Download buttons for generated code files
- Connects to local LLM at http://127.0.0.1:1234 (OpenAI-compatible API)
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open http://localhost:5173 in your browser
- Ensure your local model is running on http://127.0.0.1:1234
- Enter natural language descriptions of the code you want to generate
- Receive responses with formatted code blocks
- Download generated code using the buttons on each code block
The local model should support the OpenAI chat completions endpoint:
- POST /v1/chat/completions
- Request: { "model": "local-model", "messages": [{ "role": "user", "content": "prompt" }] }
- Response: { "choices": [{ "message": { "content": "response text" } }] }
npm run build- React 18
- Vite
- Tailwind CSS
- Axios
- React Syntax Highlighter