explaingit

hadihonarvar/flock

Analysis updated 2026-05-18

16GoAudience · ops devopsComplexity · 4/5LicenseSetup · moderate

TLDR

A self-hosted Go gateway that lets your team's AI coding tools use local or cloud language models through one shared URL, with quotas and audit logs.

Mindmap

mindmap
  root((Flock))
    What it does
      Shared LLM gateway
      Routes to local or cloud
      One endpoint for the team
    Tech stack
      Go
      Ollama and vLLM
      llama.cpp
    Use cases
      Run local open-weight models
      Per-user keys and quotas
      Connect Cursor or Claude Code
    Audience
      DevOps teams
      Developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run open-weight models like Llama or Qwen on your own hardware instead of paying per-request to a cloud API.

USE CASE 2

Give each team member a separate API key with a daily request quota and a shared audit log.

USE CASE 3

Point tools like Cursor or Claude Code at one internal endpoint that falls back to a cloud model when your hardware cannot handle the request.

What is it built with?

GoOllamavLLMllama.cpp

How does it compare?

hadihonarvar/flockb404dev/gitm8home-operations/flate
Stars161616
LanguageGoGoGo
Setup difficultymoderateeasyeasy
Complexity4/52/52/5
Audienceops devopsdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Needs a Mac or Linux machine and a local inference engine such as Ollama, vLLM, MLX-LM, or llama.cpp installed alongside the Flock binary.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

Flock is a self-hosted service written in Go that sits between your team's AI coding tools and the language models they talk to. Instead of each developer connecting directly to OpenAI or Anthropic with separate accounts and uncontrolled spending, Flock gives you one internal URL that everything points to. Flock then routes each request to a model running on your own machines, or to a paid cloud API, depending on how you configure it. You install Flock as a single binary on a Mac or Linux machine. It works with several local AI engines, including Ollama, vLLM, MLX-LM, and llama.cpp. Once running, you can load open-weight models such as Llama, Qwen, or DeepSeek onto your hardware. Flock can spread requests across multiple machines if you have more than one, and can split a model too large for any single machine across several machines using llama.cpp-RPC sharding. For team management, Flock lets you issue per-user API keys and set daily request quotas per user. Every request goes into an audit log so you can see who sent what and when. A built-in web dashboard at the same port shows activity and lets you manage keys without touching any config files. Connecting existing tools is straightforward because Flock speaks the same API format as OpenAI and Anthropic. Tools like Cursor, Claude Code, Aider, or any Python or JavaScript SDK can point to Flock instead of the real vendor URL, with no changes needed in the tool itself. If a request is for a model only available from a cloud vendor, Flock proxies it through. If your local hardware can handle it, the request stays in-house and costs nothing in API fees. Getting started takes about three commands: install the binary, install a local engine such as Ollama, then run flock up with a model name. A built-in diagnostic command called flock doctor inspects your hardware and tells you exactly what to install if anything is missing.

Copy-paste prompts

Prompt 1
Install Flock and start it with a small local model using flock up.
Prompt 2
Explain how Flock decides whether to route a request to my local hardware or a cloud API.
Prompt 3
Walk me through setting per-user API keys and daily quotas in Flock's admin dashboard.
Prompt 4
How do I point Claude Code at my local Flock instance instead of the real Anthropic API?

Frequently asked questions

What is flock?

A self-hosted Go gateway that lets your team's AI coding tools use local or cloud language models through one shared URL, with quotas and audit logs.

What language is flock written in?

Mainly Go. The stack also includes Go, Ollama, vLLM.

What license does flock use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is flock to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is flock for?

Mainly ops devops.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.