An AI coding assistant using various LLM models.
Project description
LM Code
LM Code is a powerful AI coding assistant for your terminal supporting multiple LLM models like Qwen, DeepSeek, and Gemini. With LM Code, you can interactively work on coding tasks, automate file operations, and improve your workflow directly from the command line.
Features
- Interactive CLI with AI Assistance:
- Chat with AI models for coding advice, file management, and more.
- Markdown rendering for improved readability.
- Multi-Model Support:
- Qwen, DeepSeek, Gemini, and more.
- Automated Tool Usage:
- File operations:
view,edit,list,grep,glob. - Directory operations:
ls,tree,create_directory. - System commands:
bash. - Quality checks: linting, formatting.
- Test running:
pytestand similar tools.
- File operations:
- Customizable Configurations:
- Easily set default models and API keys.
Installation
Method 1: Install from PyPI (Recommended)
pip install code-lm
Method 2: Install from Source
# Clone the repository
git clone https://github.com/Panagiotis897/lm-code.git
cd lm-code
# Install the package
pip install -e .
Setup
Before using LM Code, you need to set up your API keys for OpenRouter.
Configure API Key
lmcode setup YOUR_OPENROUTER_API_KEY
This saves your API key in the configuration file located at ~/.config/gemini-code/config.yaml.
Usage
Start an Interactive Session
# Start with the default model
lmcode
# Start with a specific model
lmcode --model qwen/qwen-2.5-coder-32b-instruct:free
Manage Models
# Set a default model
lmcode set-default-model deepseek/deepseek-r1:free
# List all available models
lmcode list-models
Supported Models
- Qwen 2.5 Coder 32B:
qwen/qwen-2.5-coder-32b-instruct:free - Qwen QWQ 32B:
qwen/qwq-32b:free - DeepSeek R1:
deepseek/deepseek-r1:free - Gemma 3 (27B Italian):
google/gemma-3-27b-it:free - Gemini 2.5 Pro Experimental:
google/gemini-2.5-pro-exp-03-25:free
Interactive Commands
During an interactive session, you can use these commands:
/exit: Exit the session./help: Display help information.
How It Works
LM Code uses native tools to enhance your coding experience. For instance:
- You ask: "What files are in the current directory?"
- LM Code uses the
lstool to fetch directory contents. - The assistant formats and presents the response.
This seamless integration of tools and AI makes LM Code a powerful coding partner.
Development
LM Code is under active development. Contributions, feature requests, and feedback are welcome!
Recent Changes
v0.1.0
- Rebranded from Gemini to LM Code.
- Integrated OpenRouter's Qwen model as the default.
- Added multi-model support for Qwen, DeepSeek, and Gemini.
- Overhauled CLI commands (
gemini→lmcode).
v0.2.5
- Added some more models to the model list.
- Fixed some crucial bugs over the previous versions.
- Removed Gemini models as of now.
- Updated some models to use their latest versions instead of the outdated ones.
Feture Updates
- Pricing will be introduced along with apropriate rate limits.
- More models will be introduced along with non-free ones.
- MCP Server intergration will be added as well.
- More providers are coming soon.
Known Issues
- If you used earlier versions, you might need to delete your old configuration:
rm -rf ~/.config/gemini-code
License
MIT License
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 code_lm-0.2.5.tar.gz.
File metadata
- Download URL: code_lm-0.2.5.tar.gz
- Upload date:
- Size: 28.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c8deb63042e2755837603af31d561561a8d8a77669637ed4e94e4307f4e9cd5
|
|
| MD5 |
a57cd42d27934cf3a6fe571dd4bdeb53
|
|
| BLAKE2b-256 |
fad8adf7fa0b66093eed76674b0a2a6afc2894a3e793ba2ed836e9d7ba1241d0
|
File details
Details for the file code_lm-0.2.5-py3-none-any.whl.
File metadata
- Download URL: code_lm-0.2.5-py3-none-any.whl
- Upload date:
- Size: 35.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1907921464a4c25c5cdc5405b12e99e54150c9f30cbafab0c42e504c16b36de
|
|
| MD5 |
44bd6cedc3f690d1c3a0e857ce66db7c
|
|
| BLAKE2b-256 |
3404c89812ffb16d2d94928812dc88c8c7ded8c80dd9e1bd37b4a7b499a74ba8
|