Flux-CLI

Why Flux-CLI?

The AI coding tool landscape is rapidly evolving. Flux-CLI exists to fill a specific niche: an open-source, educational, and extensible AI coding agent that you can truly understand and customize.

The Problem with Black Boxes

Most AI coding assistants are:

The Learning Gap

Many developers use AI coding tools without understanding how they actually work. Flux-CLI was built to bridge this gap — making the internals of an AI coding agent transparent, learnable, and customizable.

Why Flux-CLI Exists

1. Educational Mission

Flux-CLI is first and foremost a learning tool. By reading the source code, you can understand:

2. Complete Extensibility

Unlike closed-source alternatives, Flux-CLI lets you:

3. Terminal-Native Experience

Flux-CLI is built for the terminal, not for a web browser or IDE extension. This means:

4. Safety First

Flux-CLI implements a multi-layered safety system:

LayerProtection
Approval Policies6 configurable policies from YOLO to strict confirmation
Command BlockingHard-coded dangerous patterns (rm -rf /, fork bombs, etc.)
Path ValidationPrevents operations outside the working directory
Environment SanitizationFilters sensitive variables from shell execution
Loop DetectionIdentifies and breaks repetitive agent behavior

How It Differs from Other Tools

FeatureFlux-CLIClaude Code CLIGemini CLI
Open Source✅ Full MIT License❌ Closed❌ Closed
Custom Tools✅ Python plugins❌ No❌ No
MCP Support✅ stdio + SSE✅ Limited❌ No
Custom Hooks✅ 6 trigger points❌ No❌ No
Multi-Provider✅ Any OpenAI-compatible❌ Claude only❌ Gemini only
Streaming✅ Token-level
Sub-Agents✅ Isolated contexts❌ No❌ No

Design Philosophy

Flux-CLI is guided by a few core principles:

  1. Transparency over Magic — Every decision the agent makes should be explainable
  2. Safety over Speed — Always ask before doing something dangerous
  3. Extensibility over Opinionation — Provide hooks, not hard-coded workflows
  4. Terminal-Native over Web-Like — Embrace the terminal, don't fight it
  5. Learning over Polishing — Code should be readable and educational first

If you're curious about how AI coding agents work at a fundamental level, Flux-CLI's source code is the best place to learn. Every component is documented and designed to be understood.

On this page