Skip to main content

A powerful Git-aware repository assistant powered by LiteLLM and smolagents.

Project description

👁️ repo-lens

Your repository's third eye.

Forget manually digging through git logs and grepping for context. repo-lens combines deep Git history analysis with advanced AI reasoning to give you instant clarity on your codebase. Whether you're hunting for the origin of a bug or summarizing years of commits, repo-lens sees what you might miss.

Powered by smolagents for iterative reasoning and LiteLLM for universal model support (OpenAI, Anthropic, Ollama, Qwen, and more).


🛠️ Prerequisites

Before you start peering into your repos, ensure you have:

  • Python 3.11 or higher.
  • Git installed and available in your PATH.
  • Access to an LLM provider:
    • Cloud: OpenAI, Anthropic, etc. (API Key required).
    • Local: LM Studio, Ollama, or vLLM (OpenAI-compatible server running).

🚀 Installation

Install repo-lens directly from this repository for the latest features:

# Using uv (recommended)
uv tool install repo-lens

# Using pip
pip install repo-lens

To build from source:

git clone https://github.com/satishjasthi/repo-lens.git
cd repo-lens
uv sync

⚙️ Getting Started

repo-lens is configured via environment variables or a .env file in your current directory.

Create a .env file:

# LLM Configuration
REPO_LENS_PROVIDER=openai               # openai, anthropic, ollama, etc.
REPO_LENS_MODEL=openai/gpt-oss-20b      # Your model identifier
REPO_LENS_API_BASE=http://localhost:1234/v1  # Base URL for local SLMs
REPO_LENS_API_KEY=sk-...                # Your API key (if needed)

# Repo Settings
REPO_LENS_REPO=/path/to/your/repo        # Optional defaults to current dir
REPO_LENS_TIMEOUT=60                     # HTTP timeout

🤖 Running the Agent

The agent command (Iterative Reasoning)

The agent command is the powerhouse of repo-lens. It doesn't just guess; it reasons. It plans Git commands, observes the results, and refines its search until it finds the answer.

repo-lens agent "Who added the bedrock support and what files did they change?"

The ask command (Quick Context)

For simple questions based on the recent history and current state:

repo-lens ask "Summarize the changes in the last 5 commits"

Thin Git Wrappers

repo-lens also includes thin wrappers for common Git tasks:

repo-lens git status
repo-lens git log --limit 5
repo-lens shell "ls -la"

📦 PyPI Publishing

Built with uv, repo-lens is ready for the world. To publish your own version:

  1. Update pyproject.toml with your details.
  2. Build the package:
    uv build
    
  3. Publish to PyPI:
    uv publish
    

Author: Satish Jasthi
License: MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repo_lens-0.1.2.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repo_lens-0.1.2-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file repo_lens-0.1.2.tar.gz.

File metadata

  • Download URL: repo_lens-0.1.2.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for repo_lens-0.1.2.tar.gz
Algorithm Hash digest
SHA256 82a99ff52b4bc39b9181ebeea19d2082e5516a2b736e6fb8ea40374d00e5c660
MD5 5be3e976ca29233a5c9042458dfddaca
BLAKE2b-256 3d31e3bc3ae4d5fcfed3c99ea5fb497d5a5e19a545fa4598cefc5e09a7e9500f

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_lens-0.1.2.tar.gz:

Publisher: release.yaml on satishjasthi/repo_lens

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repo_lens-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: repo_lens-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for repo_lens-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8b5dc4009b6a1c34e58f86dc4adffe3aafa839d1282c521f4a5f9cf8cd55078e
MD5 814d184f6b24e374079b06df7407e3b4
BLAKE2b-256 b2ed5067587bf30ac848da62c828fc7684bc29bad4ee1bb8b21897bf0ab9787d

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_lens-0.1.2-py3-none-any.whl:

Publisher: release.yaml on satishjasthi/repo_lens

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page