Skip to content

techtoboggan/librecode

Repository files navigation

LibreCode

Run AI coding agents locally.

Local-first agentic coding assistant for the terminal and desktop.
No account required. No cloud dependency. Your models, your machine.

CI Release npm MIT License

DownloadsWebsiteProvider GuideRoadmap


Quick Start

# 1. Install Ollama (or any local model server)
curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3.2

# 2. Install LibreCode
# Fedora/RHEL
sudo dnf copr enable techtoboggan/librecode && sudo dnf install librecode
# Arch
yay -S librecode
# Nix
nix run github:techtoboggan/librecode

# 3. Start coding
librecode

LibreCode auto-discovers Ollama, LiteLLM, vLLM, and other local model servers. No API keys needed for local models.

What is LibreCode?

LibreCode is an agentic coding assistant that understands your codebase and helps you build software faster. It runs in your terminal or as a desktop app.

Local-first by design:

  • Auto-discovers local servers — Ollama, LiteLLM, vLLM, llama.cpp on known ports
  • No account required — works entirely offline with local models
  • Cloud when you want it — connect Anthropic, OpenAI, or any provider via plugins
  • Community provider ecosystem — install only the providers you need via npm

Why this fork?

LibreCode is a fork of opencode v1.2.27, rebuilt with:

  • Local-first architecture — local model servers are primary, cloud is optional
  • Proper Linux packaging — COPR, AUR, Nix flake
  • Modular provider system — core ships lean, community maintains cloud providers
  • Clean codebase — Effect-ts removed, namespaces migrated, 1358 tests passing

Providers

LibreCode ships with built-in support for local model servers and enterprise providers:

Provider Type Default Port
Ollama Local 11434
LiteLLM Local proxy 4000
Amazon Bedrock Enterprise
Azure OpenAI Enterprise

Cloud providers (Anthropic, OpenAI, OpenRouter, etc.) are available as community plugins. Add them to .librecode/librecode.json:

{
  "plugin": ["@librecode/provider-anthropic@latest"]
}

Or install the bundle for all cloud providers at once:

{
  "plugin": ["@librecode/provider-bundle@latest"]
}

Available provider plugins:

Package Provider
@librecode/provider-anthropic Anthropic (Claude)
@librecode/provider-openai OpenAI
@librecode/provider-openrouter OpenRouter
@librecode/provider-bundle All of the above

See the Provider Guide for adding new providers or writing your own.

Install

Package managers

# Fedora/RHEL (COPR)
sudo dnf copr enable techtoboggan/librecode
sudo dnf install librecode

# Arch (AUR)
yay -S librecode

# Nix
nix run github:techtoboggan/librecode

From source

git clone https://github.com/techtoboggan/librecode.git
cd librecode
scripts/dev-setup.sh --deps    # Auto-detects your distro
source scripts/dev-setup.sh    # Isolated dev environment
bun install
bun run dev

Desktop app

Download from librecode.app or build locally:

scripts/dev-setup.sh --deps    # Installs Rust + GTK + WebKit
source scripts/dev-setup.sh
bun install
bun run dev:desktop

Development

source scripts/dev-setup.sh    # Isolated dev data in .dev/
bun run dev                    # CLI
bun run dev:desktop            # Desktop (Tauri)
bun run typecheck              # Type checking
bun test --timeout 30000       # Tests (1358 passing)
bun run lint                   # Biome linter

See docs/development.md for the full guide.

Architecture

TypeScript monorepo using Bun runtime, Solid.js UI, Tauri desktop.

packages/
  librecode/    Core CLI agent
  desktop/      Tauri desktop app (Rust + Solid.js)
  app/          Shared UI application
  ui/           Component library
  sdk/          TypeScript SDK  →  @librecode/sdk on npm
  plugin/       Plugin API      →  @librecode/plugin on npm
  util/         Shared utilities
  script/       Build tooling

Community packages (separate repo: librecode-3rdparty-providers): @librecode/provider-anthropic · @librecode/provider-openai · @librecode/provider-openrouter · @librecode/provider-bundle

Contributing

License

MIT


Built by techtoboggan. Local models first.

About

LibreCode - AI-powered development tool (fork of opencode)

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors