Coders is an AI-powered terminal user interface (TUI) tool that helps you edit code with any LLM on OpenRouter.
- Interactive TUI Interface: Fully navigable terminal interface with keyboard shortcuts
- Model Selection: Choose between Claude, Gemini, or any OpenRouter model
- Cost Tracking: Monitor your OpenRouter credit usage directly in the app
- File Browser: Easily navigate and select files to modify
- Multi-File Context: Select multiple files to provide better context for AI prompts
- Side-by-Side Diff View: Compare original and modified code before accepting changes
- Explanation Panel: View AI explanations for each code change
- Context Window Tracking: Track the total prompt size and progress of the context window
- Clone the repository:
git clone https://github.com/0xKoda/coders.git && cd coders
- Launch the application with
cargo run
- On first run, you'll be prompted to enter your OpenRouter API key
- Navigate the file browser to select a file to modify
- Press the appropriate key to perform actions (as shown in the command bar)
The application has several modes, each with its own set of controls:
h
: Access help screen from most modes
Enter
: Continue to configuration or file browserq
: Quit the application
↑/↓
: Navigate between available modelsEnter
: Select model and proceedCtrl+A
: Set API key
↑/↓
: Navigate between filesEnter
: Open selected filem
: Switch to multi-file selection modec
: View credits informationq
: Quit the applications
: Select File
↑/↓
: Navigate between filesSpace
: Toggle selection of current fileEnter
: Confirm selection and proceed to promptEsc
: Return to file browser
↑/↓
: Scroll through file contentp
: Enter prompt mode to modify the fileq
: Return to file browser
- Type your request for code modifications
Enter
: Submit promptEsc
: Cancel and return to previous screen
Tab
: Switch between original and modified code panelse
: Toggle explanation panely
: Accept changes and apply themn
: Reject changes and return to editorq
: Return to file browser without applying changes←/→
: Navigate between files when viewing multi-file diffs↑/↓
: Scroll Files
q
: Return to previous screen
- Select a File: Navigate the file browser and press
Enter
to open a file - Provide Context (Optional): Press
m
to enter multi-file selection, choose additional files withSpace
, then confirm withEnter
- Modify Code: With a file open, press
p
to enter a prompt describing the changes you want - Review Changes: In the diff view, examine the proposed changes and explanation
- Apply Changes: Press
y
to accept changes orn
to reject them - Continue Iterating: Make additional changes or select different files
Press c
in the file browser to view your OpenRouter credits information:
- Total credits available
- Total usage so far
- Last updated time
By default, the application uses Claude 3.7 Sonnet. To select a different model:
- Start the application
- In the configuration screen, use
↑/↓
to select a model - Select "custom" to enter any OpenRouter model ID
Your OpenRouter API key is securely stored in your system's configuration directory:
- To change your API key, press
Ctrl+A
in the configuration screen - Enter your new API key and press
Enter
Make sure you have a valid OpenRouter API key. The application will prompt you to enter it if it's not already saved.