AI-powered coding assistant in your terminal
Project description
Lora Code
Enterprise-Grade AI Coding Assistant for Your Terminal
Features • Installation • Quick Start • Usage • Configuration • Documentation
Overview
Lora Code is a powerful AI-driven command-line coding assistant that seamlessly integrates into your development workflow. Built for professional developers and teams, it provides intelligent code suggestions, automated refactoring, and comprehensive project understanding directly from your terminal.
Features
Core Capabilities
| Feature | Description |
|---|---|
| 🤖 AI-Powered Coding | Intelligent code generation, refactoring, and explanations |
| 🏗️ Architect Mode | Design-first approach with separate architect and editor models |
| 📊 Context Mode | Automatic identification of relevant files for your task |
| 💬 Ask Mode | Query your codebase without making changes |
| 🗺️ Repository Mapping | Intelligent codebase understanding with customizable token limits |
| 🔄 Git Integration | Automatic commits, diffs, and version control management |
Advanced Features
| Feature | Description |
|---|---|
| 🎤 Voice Input | Record and transcribe voice commands (WAV, MP3, WebM) |
| 💾 Checkpoints | Save and restore session states |
| 🪝 Hooks System | Custom automation triggers for various events |
| ✅ Auto-Approve | Configurable automatic approval for different action categories |
| 🌐 Web Scraping | Fetch and analyze web content with Playwright support |
| 🔐 Authentication | Secure device-flow authentication with credential caching |
| 🌍 Multi-Language UI | Interface available in English and Turkish |
| 📋 Clipboard Integration | Paste images and text directly into chat |
Developer Experience
| Feature | Description |
|---|---|
| 🎨 Syntax Highlighting | Customizable code themes (One Dark, Monokai, Solarized, etc.) |
| ⌨️ VI Mode | Optional VI editing mode in terminal |
| 📝 Multi-line Input | Extended input mode with Meta-Enter submission |
| 🔔 Notifications | Terminal bell or custom command notifications |
| 🧪 Auto-Testing | Automatic test execution after changes |
| 🔍 Auto-Linting | Automatic linting with configurable commands |
Installation
Requirements
- Python 3.10 or higher
- Git (recommended)
- FFmpeg (optional, for MP3/WebM voice recording)
Install via pip
pip install loracode
Install from Source
git clone https://github.com/Lora-Technologies/loracode.git
cd loracode
pip install -e .
Upgrade
# Upgrade to latest stable version
loracode --upgrade
# Install from main branch (development)
loracode --install-main-branch
Quick Start
1. Authentication
# Interactive login with device flow
loracode
# Then use: /auth login
# Or set API key directly
export LORA_CODE_API_KEY="your-api-key"
2. Start a Session
# Start interactive session
loracode
# Work with specific files
loracode src/main.py src/utils.py
# Use a specific model
loracode --model gpt-4
# Single message mode (non-interactive)
loracode -m "Add error handling to main.py"
Usage
Chat Modes
| Mode | Command | Description |
|---|---|---|
| Code | /code |
Make code changes (default) |
| Architect | /architect |
Design changes with architect model, implement with editor |
| Ask | /ask |
Ask questions without making changes |
| Context | /context |
Auto-identify files needed for a task |
| Help | /help |
Get help about Lora Code usage |
In-Session Commands
File Management
| Command | Description |
|---|---|
/add <file> |
Add file(s) to the editable session |
/drop [file] |
Remove file(s) from session (all if no argument) |
/read-only <file> |
Add file(s) as read-only reference |
/ls |
List all files in session and repository |
Git Operations
| Command | Description |
|---|---|
/commit [message] |
Commit pending changes |
/diff |
Show changes since last commit |
/undo |
Undo the last Lora Code commit |
/git <command> |
Run any git command |
Session Management
| Command | Description |
|---|---|
/clear |
Clear conversation history |
/reset |
Clear history and drop all files |
/tokens |
Show token usage breakdown |
/settings |
Display current configuration |
Model Configuration
| Command | Description |
|---|---|
/model [name] |
Switch or display current model |
/editor-model <name> |
Set the editor model |
/weak-model <name> |
Set the weak model (for summaries) |
/think-tokens [value] |
Set thinking token budget |
/chat-mode <mode> |
Switch chat mode |
Checkpoints
| Command | Description |
|---|---|
/checkpoint-save [name] |
Save current session state |
/checkpoint-load <name> |
Restore a saved session |
/checkpoints |
List all saved checkpoints |
/checkpoint delete <name> |
Delete a checkpoint |
Automation
| Command | Description |
|---|---|
/auto-approve <categories> |
Auto-approve specific action categories |
/auto-reject <categories> |
Auto-reject specific action categories |
/auto-ask <categories> |
Reset categories to ask mode |
/auto-status |
Show current auto-approval settings |
/hooks |
List and manage automation hooks |
Utilities
| Command | Description |
|---|---|
/web <url> |
Fetch and add web content to chat |
/voice |
Record voice input (requires OpenAI API key) |
/paste |
Paste clipboard content (text or image) |
/copy |
Copy last assistant message to clipboard |
/copy-context |
Copy current context for external use |
/editor |
Open external editor for input |
/run <command> |
Execute shell command |
/test [command] |
Run tests |
/lint |
Lint and fix files |
/map |
Show repository map |
/report |
Report an issue on GitHub |
/language [code] |
Change UI language (en/tr) |
/auth <login|logout|status> |
Manage authentication |
/help [topic] |
Get help on specific topics |
/quit |
Exit Lora Code |
Configuration
Configuration Files
Lora Code searches for configuration in the following order:
- Command line arguments (highest priority)
- Environment variables (prefixed with
LORACODE_) .loracode.conf.ymlin current directory.loracode.conf.ymlin git root.loracode.conf.ymlin home directory
Configuration File Example
# .loracode.conf.yml
# Model Configuration
model: gpt-4
weak-model: gpt-3.5-turbo
editor-model: gpt-4
edit-format: architect
thinking-tokens: 8096
# API Settings
api-base: https://api.loratech.dev
# Git Settings
auto-commits: true
dirty-commits: true
attribute-co-authored-by: true
git-commit-verify: false
# UI Settings
dark-mode: true
pretty: true
stream: true
code-theme: one-dark
vim: false
multiline: false
notifications: false
# Repository Map
map-tokens: 2048
map-refresh: auto
# Automation
auto-lint: true
auto-test: false
suggest-shell-commands: true
# Language
language: en
chat-language: null
commit-language: null
# Voice Settings
voice-format: wav
voice-language: en
Environment Variables
| Variable | Description |
|---|---|
LORA_CODE_API_KEY |
API key for Lora Code services |
LORA_CODE_API_BASE |
Custom API base URL |
LORACODE_MODEL |
Default model to use |
LORACODE_DARK_MODE |
Enable dark mode (true/false) |
LORACODE_AUTO_COMMITS |
Enable auto-commits (true/false) |
CLI Arguments Reference
Main Model Settings
--model MODEL # Main chat model
--weak-model MODEL # Model for summaries and commits
--editor-model MODEL # Model for editor tasks
--edit-format FORMAT # Edit format (diff, whole, architect, etc.)
--architect # Use architect edit format
--thinking-tokens VALUE # Thinking token budget (0 to disable)
API Settings
--api-key KEY # Lora Code API key
--api-base URL # API base URL
--timeout SECONDS # API call timeout
--verify-ssl / --no-verify-ssl # SSL verification
Cache Settings
--cache-prompts / --no-cache-prompts # Enable prompt caching
--cache-keepalive-pings N # Keep cache warm (ping count)
Repository Map
--map-tokens N # Token limit for repo map (0 to disable)
--map-refresh MODE # Refresh mode: auto, always, files, manual
--map-multiplier-no-files N # Multiplier when no files specified
Git Settings
--git / --no-git # Enable/disable git integration
--auto-commits / --no-auto-commits # Auto-commit changes
--dirty-commits / --no-dirty-commits # Commit with dirty repo
--attribute-co-authored-by / --no-attribute-co-authored-by # Co-author attribution
--commit-prompt PROMPT # Custom commit message prompt
--dry-run # Preview changes without applying
Output Settings
--dark-mode / --light-mode # Color scheme
--pretty / --no-pretty # Colorized output
--stream / --no-stream # Streaming responses
--code-theme THEME # Syntax highlighting theme
--show-diffs # Show diffs when committing
Voice Settings
--voice-format FORMAT # Audio format: wav, mp3, webm
--voice-language LANG # ISO 639-1 language code
--voice-input-device NAME # Input device name
Checkpoint Settings
--load-checkpoint NAME # Load checkpoint at startup
--save-on-exit [NAME] # Save checkpoint on exit
--checkpoint-dir DIR # Custom checkpoint directory
Automation
--auto-approve CATEGORIES # Auto-approve categories (comma-separated)
--auto-reject CATEGORIES # Auto-reject categories
--yes-always # Always confirm prompts
--lint-cmd "LANG: CMD" # Custom lint command per language
--test-cmd CMD # Test command
--auto-lint / --no-auto-lint # Auto-lint after changes
--auto-test / --no-auto-test # Auto-test after changes
Modes
-m, --message MSG # Single message mode
-f, --message-file FILE # Message from file
--gui # Browser-based interface
--copy-paste # Auto copy/paste with web UI
--watch-files # Watch for AI coding comments
Other Options
--vim # VI editing mode
--multiline # Multi-line input mode
--fancy-input / --no-fancy-input # Input with history/completion
--notifications # Enable notifications
--detect-urls # Auto-detect URLs in input
--language LANG # UI language (en, tr)
--encoding ENCODING # I/O encoding (default: utf-8)
--verbose # Verbose output
--version # Show version
--help # Show help
Hooks System
Hooks allow you to run custom commands at specific events during your Lora Code session.
Configuration
Create .loracode/settings.json in your project root:
{
"hooks": {
"BeforeTool": [
{
"name": "pre-edit-check",
"command": "python scripts/validate.py",
"description": "Validate before making changes",
"timeout": 5000
}
],
"AfterTool": [
{
"name": "post-edit-format",
"command": "black .",
"description": "Format code after changes"
}
]
}
}
Hook Events
| Event | Trigger |
|---|---|
BeforeTool |
Before any tool execution |
AfterTool |
After tool execution |
Managing Hooks
/hooks # List all hooks
/hooks enable <name> # Enable a hook
/hooks disable <name> # Disable a hook
/hooks test <name> # Test a hook
Auto-Approval System
Control which actions require confirmation:
Categories
| Category | Description |
|---|---|
file_create |
Creating new files |
file_edit |
Editing existing files |
shell_command |
Running shell commands |
url_add |
Adding URLs to chat |
lint_fix |
Applying lint fixes |
test_fix |
Applying test fixes |
git_repo |
Git operations |
analytics |
Analytics collection |
Usage
# Auto-approve specific categories
/auto-approve file_edit,lint_fix
# Auto-approve everything
/auto-approve all
# Auto-reject categories
/auto-reject shell_command
# Reset to ask mode
/auto-ask all
# View current settings
/auto-status
Authentication
Lora Code uses secure device-flow authentication:
# Start login process
/auth login
# Check authentication status
/auth status
# Logout
/auth logout
Credentials are securely cached locally. Use --no-cache-credentials to disable caching.
Project Structure
loracode/
├── loracode/ # Main package
│ ├── coders/ # Edit format implementations
│ ├── locales/ # i18n translations
│ ├── resources/ # Model settings and assets
│ ├── main.py # Entry point
│ ├── commands.py # In-session commands
│ ├── args.py # CLI argument parsing
│ └── ...
├── tests/ # Test suite
├── requirements/ # Dependency specifications
├── scripts/ # Utility scripts
└── docs/ # Documentation
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
# Clone the repository
git clone https://github.com/Lora-Technologies/loracode.git
cd loracode
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run linting
flake8 loracode tests
Security
For security concerns, please see our Security Policy or contact security@loratech.dev.
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Support
| Channel | Link |
|---|---|
| support@loratech.dev | |
| 🐛 Issues | GitHub Issues |
| 💬 Discussions | GitHub Discussions |
| 📖 Documentation | docs.loratech.dev |
Built with ❤️ by Lora Technologies
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file loracode-0.1.2.tar.gz.
File metadata
- Download URL: loracode-0.1.2.tar.gz
- Upload date:
- Size: 203.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
019f3828ab1027e599a9e7c3c7ded43afe719e5c5fc081ff457c214d9e931e15
|
|
| MD5 |
e60e90a1d4a8420a546663c4c32c3400
|
|
| BLAKE2b-256 |
1426d299284c212184802dabbc71a5fb77db8c5ea7ea29cff29c775ee799de91
|
Provenance
The following attestation bundles were made for loracode-0.1.2.tar.gz:
Publisher:
publish.yml on Lora-Technologies/LoraCode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
loracode-0.1.2.tar.gz -
Subject digest:
019f3828ab1027e599a9e7c3c7ded43afe719e5c5fc081ff457c214d9e931e15 - Sigstore transparency entry: 790930353
- Sigstore integration time:
-
Permalink:
Lora-Technologies/LoraCode@5d342491ac162a26a1e8b29cd0a6a87990bb5662 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Lora-Technologies
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5d342491ac162a26a1e8b29cd0a6a87990bb5662 -
Trigger Event:
release
-
Statement type:
File details
Details for the file loracode-0.1.2-py3-none-any.whl.
File metadata
- Download URL: loracode-0.1.2-py3-none-any.whl
- Upload date:
- Size: 229.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d342f4f272714702afd4376dc616987a05a4a73289df10fcd0324321c1b22ea1
|
|
| MD5 |
a307b093bfe50d1a70cea96f875e6493
|
|
| BLAKE2b-256 |
9f6df0e9b40f5cce1c0bf58025456f63613d55d8db666aeb58928bf43925dba4
|
Provenance
The following attestation bundles were made for loracode-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on Lora-Technologies/LoraCode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
loracode-0.1.2-py3-none-any.whl -
Subject digest:
d342f4f272714702afd4376dc616987a05a4a73289df10fcd0324321c1b22ea1 - Sigstore transparency entry: 790930356
- Sigstore integration time:
-
Permalink:
Lora-Technologies/LoraCode@5d342491ac162a26a1e8b29cd0a6a87990bb5662 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Lora-Technologies
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5d342491ac162a26a1e8b29cd0a6a87990bb5662 -
Trigger Event:
release
-
Statement type: