langchain-code  by zamalali

Unified AI coding assistant CLI

Created 3 months ago
417 stars

Top 70.2% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides a unified command-line interface (CLI) for interacting with multiple large language models (LLMs) like Gemini, Claude, OpenAI, and Ollama. It targets developers seeking to integrate AI assistance directly into their coding workflows, offering features for code understanding, automated task implementation, bug fixing, and refactoring, all managed through an interactive launcher or direct commands.

How It Works

LangCode employs a hybrid approach with two primary reasoning engines: ReAct for fast, interactive chat and targeted edits, and a Deep Agent utilizing a LangGraph-style architecture for complex, multi-step tasks. A sophisticated, rule-augmented LLM router intelligently selects the optimal LLM for each prompt based on factors like complexity, context size, latency, and cost, with user-configurable priorities (cost, speed, quality). The Deep Agent can operate in an "autopilot" mode for fully autonomous, end-to-end execution of tasks.

Quick Start & Requirements

  • Installation: pip install langchain-code
  • Prerequisites: Requires API keys for supported LLMs (e.g., ANTHROPIC_API_KEY, GOOGLE_API_KEY), which can be managed via a .env file.
  • Usage: Launch the interactive launcher by running langcode in the terminal.
  • Documentation: Core commands and configuration details are provided within the README.

Highlighted Details

  • Interactive Launcher: A user-friendly TUI simplifies configuration, LLM selection, and task management.
  • Multi-LLM Support: Seamlessly integrates with Google Gemini, Anthropic Claude, OpenAI, and Ollama.
  • Smart Routing: Automatically selects the best LLM for each task based on configurable priorities.
  • Automated Coding: Implements features, fixes bugs, and refactors code with safe, reviewable diffs.
  • Deep Agent Autopilot: Enables fully autonomous, end-to-end task execution for complex workflows.
  • MCP Integration: Extensible with custom tools via the Model Context Protocol (MCP).
  • Multimodal Support: Allows image analysis within chat sessions using the /img directive.

Maintenance & Community

Issues and Pull Requests are welcomed, with a recommendation to open an issue for substantial changes before submitting a PR. Contribution guidelines are available in CONTRIBUTING.md. No specific community channels (e.g., Discord, Slack) or notable contributors/sponsors are mentioned.

Licensing & Compatibility

  • License: Apache 2.0.
  • Compatibility: The Apache 2.0 license is permissive, generally allowing for commercial use and integration within closed-source projects.

Limitations & Caveats

The "Deep Agent Autopilot" mode requires caution due to its autonomous nature. For large monorepos, users may need to narrow the scope or specify include directories. Troubleshooting may involve ensuring provider API keys are correctly configured in the .env file.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
3
Issues (30d)
3
Star History
175 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.