git404hub

what is claude-failover fr?

nicedreamzapp/claude-failover — explained in plain English

Analysis updated 2026-05-18

1ShellAudience · developerComplexity · 3/5Setup · moderate

tl;dr

A backup routing layer that switches your Claude Code scripts to a local AI model automatically when you hit a usage cap or Anthropic is down.

vibe map

mindmap
  root((claude-failover))
    What it does
      Routes around Claude outages
      Switches to local model
      Flag file controls mode
    Tech stack
      Python
      mlx-lm
    Use cases
      Keep cron jobs running
      Handle usage caps
      Survive outages
    Audience
      Developers
      Automation users

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 make with this?

VIBE 1

Keep automated cron jobs running when you hit your Claude usage cap.

VIBE 2

Fail over to a local model during an Anthropic service outage.

VIBE 3

Flip back to Claude automatically once the outage or cap resets.

what's the stack?

Pythonmlx-lmClaude Code CLI

how it stacks up fr

nicedreamzapp/claude-failoveranthonyhann/knowledge-wikibaiyuetribe/test-heroku
Stars111
LanguageShellShellShell
Last pushed2021-06-30
MaintenanceDormant
Setup difficultymoderatemoderatehard
Complexity3/53/51/5
Audiencedeveloperdeveloperdeveloper

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

how do i run it?

Difficulty · moderate time til it works · 30min

Requires an Apple Silicon Mac, Python 3.9+, the Claude Code CLI, and the mlx-lm package.

in plain english

claude-failover is a backup routing layer for the Claude Code CLI. When you hit your monthly usage cap or Anthropic's service is temporarily down, you flip a single command and all your scripts that call Claude automatically switch to a local AI model running on your own machine, no code changes required. When Claude is available again, one more command flips everything back. The way it works is through a lightweight shim called agent-llm that you drop into your PATH. Instead of calling the Claude CLI directly in your scripts, you call agent-llm. Every time it runs, it reads a flag file on your computer to decide where to send the request: if the flag says "claude," it passes the call straight to the real Claude CLI as if nothing changed, if it says "local," it sends the request to a locally running AI server instead. You switch modes with llm-failover local or llm-failover claude. The local model is lazy-loaded, meaning it only occupies memory when you are actually in failover mode. Flipping to local mode starts the server and loads the model (which can take 30 to 90 seconds the first time depending on your machine). Flipping back unloads it and frees the RAM. If you want instant failover without the warm-up delay, you can configure the server to stay loaded continuously. You would use this if you run automated scripts or cron jobs that depend on the Claude CLI and you cannot afford those jobs to stop when you hit a usage limit or during an outage. It requires an Apple Silicon Mac, Python 3.9 or later, the Claude Code CLI, and the mlx-lm package. The full README is longer than what was provided.

prompts (copy fr)

prompt 1
Explain how to set up agent-llm as a drop-in replacement for the Claude CLI in my scripts.
prompt 2
Run llm-failover local and tell me what happens to my running scripts.
prompt 3
Configure claude-failover's local server to stay loaded so failover is instant.

Frequently asked questions

what is claude-failover fr?

A backup routing layer that switches your Claude Code scripts to a local AI model automatically when you hit a usage cap or Anthropic is down.

What language is claude-failover written in?

Mainly Shell. The stack also includes Python, mlx-lm, Claude Code CLI.

How hard is claude-failover to set up?

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

Who is claude-failover for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.