NPM Package Registry

A calm TUI workspace for resolving conflicts with AI.

Merge conflicts interrupt development flow. le-merge replaces manual marker resolution with a dedicated terminal UI and a secure, local AI agent workflow.

$
Alternative: bun install -g le-merge Requires Bun v1.3.0+
le-merge — Ink Terminal Session
Philosophy

Deliberate. Isolated. Secure.

Resolving merge conflicts demands absolute structural awareness of local files, project definitions, and workspace scope.

Branch Navigation

Includes a clear visual branch selector directly inside your terminal, with commit-recency data. Supports clean branch merges from both local tracking paths and remote references.

Path-Safe Boundaries

Built with rigorous directory boundaries. The AI agent only accesses files within the immediate scope of the local repository, eliminating directory traversal risks or external filesystem writes.

Clarification Engine

When conflicting intentions are ambiguous, the agent asks for input. It triggers a prompt system displaying structured multiple-choice questions natively within your terminal context.

Execution Layer

How le-merge operates under the hood

01

Workspace Validation

Validates that execution is occurring inside a initialized, valid Git repository. If global configurations are absent, the client boots an interactive setup wizard to configure connection strings securely.

02

Merge Execution

Runs the standard branch merge using system Git resources. If the merge is clean, operations finalize and commit automatically. If conflicts arise, it isolates the files containing unresolved conflict zones.

03

AI Agent Tools Handoff

Initializes the agent loop. Equipped with dedicated filesystem tools (read_file, list_files, search_codebase, and find_definition), the agent reads matching code declarations to correctly evaluate variable scopes and upstream definitions.

04

Automated Index Integration

Once conflict zones are completely clean of Git markers, the utility updates the repository index using system Git commands to safely finalize the merge.

Installation and Methods

`le-merge` runs globally using Bun's fast execution context. Select your preferred installation path:

Install the package directly into global environments. Once installed, invoke `le-merge` inside any repository directory to run the visual interface.

# Install globally
npm install -g le-merge

# Or via Bun globally
bun install -g le-merge

# Execute within any Git repository
le-merge

Supported Providers & Configuration

`le-merge` communicates natively with official provider client endpoints. There are no middleware wrapper requirements.

Persistent Settings

During initial launch, the wizard prompts for providers, model preferences, and active key properties. Details are saved to user file structures:

# Path: ~/.le-merge/config.json
{
  "provider": "openai",
  "model": "openai/gpt-5.4",
  "maxSteps": 20,
  "providerKeys": {
    "OPENAI_API_KEY": "sk-proj-..."
  }
}

Settings can also be controlled on a per-repository basis using local .env or .env.local files inside the repository root.

Supported SDK Endpoints

The wizard matches native API key signatures and configures direct calls to the following SDK endpoints:

  • OpenAI SDK (e.g., GPT-5.4) OPENAI_API_KEY
  • Anthropic SDK (e.g., Sonnet 4.6) ANTHROPIC_API_KEY
  • Google GenAI (e.g., Gemini 3.5) GOOGLE_API_KEY