Skip to content

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.

CIReleasenpmMIT 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:

ProviderTypeDefault Port
OllamaLocal11434
LiteLLMLocal proxy4000
Amazon BedrockEnterprise
Azure OpenAIEnterprise

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:

PackageProvider
@librecode/provider-anthropicAnthropic (Claude)
@librecode/provider-openaiOpenAI
@librecode/provider-openrouterOpenRouter
@librecode/provider-bundleAll of the above

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

Install

Current release: v1.0.0-preview.1 — see CHANGELOG.md.

One-line installer (universal)

# Linux / macOS
curl -fsSL https://raw.githubusercontent.com/techtoboggan/librecode/main/scripts/install.sh | sh
# Windows (PowerShell)
irm https://raw.githubusercontent.com/techtoboggan/librecode/main/scripts/install.ps1 | iex

Installs the CLI to $HOME/.local/bin (Unix) or %LOCALAPPDATA%\LibreCode (Windows).

Package managers

# Homebrew (macOS + Linux)
brew install techtoboggan/tap/librecode
# Fedora/RHEL (COPR)
sudo dnf copr enable techtoboggan/librecode
sudo dnf install librecode
# Arch (AUR)
yay -S librecode
# Nix
nix run github:techtoboggan/librecode
# Flatpak (desktop only)
flatpak install flathub com.librecode.desktop

Desktop app

Download from the GitHub Releases page:

  • Linux: .deb / .rpm / .AppImage / .flatpak
  • macOS: .app bundle (unsigned in preview — right-click → Open to bypass Gatekeeper)
  • Windows: .exe NSIS installer

Config autocomplete in your editor

Add this $schema line to .librecode/config.json for VS Code / JetBrains autocomplete:

{
"$schema": "https://raw.githubusercontent.com/techtoboggan/librecode/main/schema/config.json"
}

From source

git clone https://github.com/techtoboggan/librecode.git
cd librecode
scripts/dev-setup.sh --deps # Auto-detects your distrosource scripts/dev-setup.sh # Isolated dev environment
bun install
bun run dev # CLI
bun run dev:desktop # Desktop (Tauri)

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

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages