Konveyor Coder
AI-powered code assistant using OpenRouter API with Spring Boot.
Features
- Interactive console interface with command history
- Maintains conversation context across requests
- Processes AI responses as XML for file operations
- Tracks token usage and request timing
- Configurable personalities with system instructions
- File operation safety checks (path traversal prevention)
Prerequisites
- Java 21 JDK
- OpenRouter API key
Installation
-
Download coder-x.y.z.jar from maven central
-
Create config file at
~/.coder/coder.conf:{ "openrouterApiKey": "your-api-key-here", "openrouterUrl": "https://openrouter.ai/api/v1/chat", "personalities": [ { "name": "coder", "modelId": "openai/gpt-4", "instructionsFile": "system_instructions.txt" } ] } -
Place system instructions in
~/.coder/system_instructions.txt
Usage
cd <project directory>
java -jar coder-x.y.z.jar
Interactive commands:
/clear- Reset conversation history/history- Show number of messages in conversation/instructions- Show system instructions status/exitor/quit- Exit the program
Configuration
coder.conf
openrouterApiKey: Your OpenRouter API keyopenrouterUrl: OpenRouter API endpointpersonalities: Array of personality configurations
Personality Configuration
name: Personality identifiermodelId: OpenRouter model IDinstructionsFile: Filename of system instructions in ~/.coder
File Operations
AI responses must be valid XML containing file operations:
<root>
<file name="path/to/file.java">// Java code here</file>
<deleted name="path/to/delete.txt"/>
</root>
Security
- All file operations are restricted to project directory
- Path traversal attempts are blocked
- API key stored in user-specific config file
Contributing
Contributions welcome! Please open an issue first to discuss proposed changes.
License
GNU Affero General Public License
