BanriFlow is an elite, AI-driven Cloud Security Posture Management (CSPM) and Infrastructure as Code (IaC) auditing CLI tool. It leverages advanced Large Language Models (LLMs) to perform deep architectural analysis, network topology checks, and security audits on Kubernetes (.yaml) and Terraform (.tf) configurations.
- AI-Powered Analysis: Automatically detects security flaws, cost inefficiencies, architectural anti-patterns, and availability risks.
- Holistic Topology Mode: Scans your entire directory and analyzes how microservices communicate with each other, uncovering hidden network vulnerabilities.
- Dynamic Language Support: Ask questions or provide custom instructions in any language, and BanriFlow will respond in that language.
- Multi-Provider Support: Seamlessly use Gemini, OpenAI, Anthropic/Claude, OpenRouter, or Groq.
- Interactive Setup Wizard: Save API keys and configurations interactively, never touch an export command again!
The easiest way to install BanriFlow is using our one-line installer (requires Go to be installed):
curl -sSL https://raw.githubusercontent.com/thebanri/BanriFlow/main/install.sh | bashTo Uninstall:
curl -sSL https://raw.githubusercontent.com/thebanri/BanriFlow/main/uninstall.sh | bashAlternatively, you can build from source manually:
git clone https://github.com/thebanri/BanriFlow.git
cd BanriFlow
go build -o banri
sudo mv banri /usr/local/bin/Configure your AI provider and API keys interactively. This securely saves your preferences to ~/.banriflow.env.
banri setScan a directory for Kubernetes and Terraform files. The AI will analyze each file individually.
banri scan ./my-infrastructure-dirAnalyze the entire architecture as a whole. This checks if your frontend can securely communicate with your backend, verifies NetworkPolicies, and audits AWS VPC/IAM structures.
banri scan ./my-infrastructure-dir --topology
# or
banri scan ./my-infrastructure-dir -tGive the AI specific tasks or ask it to focus on a particular issue. If you write your instruction in Turkish, Spanish, etc., the AI will adapt and output the analysis in that language.
banri scan ./my-infrastructure-dir --ask "Focus ONLY on IAM roles and Kubernetes RBAC permissions."
# or
banri scan ./my-infrastructure-dir -t -a "Bütün veritabanı açıklarını bul ve bana detaylı anlat."Connects directly to your active Kubernetes cluster (~/.kube/config) and performs a massive live audit of all running Deployments, Services, and NetworkPolicies!
banri live
# or with custom instruction:
banri live -a "Find all pods missing resource limits and explain in Turkish"Run the tool using local static rules (without an AI provider). (Note: Static rules are currently placeholders and are meant to be expanded).
banri scan ./my-infrastructure-dir --manualLaunch an embedded, stunning 3D Graphical User Interface (GUI) in your browser that visualizes your live Kubernetes cluster topology.
banri serveThen open http://localhost:3005 to interact with the 3D topology map and view AI-generated architectural analysis.
Run in Background (Daemon Mode): If you don't want to hang your terminal, run it in the background:
banri serve -d(Note: An AI provider MUST be configured via banri set before launching the GUI).
Troubleshooting: "Kritik Hata: Kubernetes Bağlantısı Başarısız"
If you are running BanriFlow on a Raspberry Pi or a machine using K3s and you see a Kubernetes connection error in the UI (or CLI), it means the application cannot find your ~/.kube/config file. K3s stores this securely by default. To fix this, run:
mkdir -p ~/.kube
sudo k3s kubectl config view --raw > ~/.kube/config
chmod 600 ~/.kube/configThen restart banri serve.
Here is a visual walkthrough of the BanriFlow Dashboard:
Visualizes your cluster topology dynamically, showing namespaces, service-pod bindings, and node statuses:
Figure 1: test-realworld namespace with running, warning, and crashed pods.
Figure 2: kube-system core network connections showing CoreDNS pods linked with DNS services.
Monitors CPU, Memory, and Network Bandwidth in real-time, detecting potential network bottlenecks and resource shortages:
Figure 3: Real-time charts showing CPU & RAM metrics alongside incoming/outgoing Network bandwidth.
Clicking on any node in the topology graph opens a sidebar inspect panel with status diagnostics, resource limits, and the latest events:
Figure 4: Pod inspector sidebar for a crashed node application showing high restart counts and recent container events.
Apply automated resolutions directly from the dashboard. The AI Assistant determines the fix, drafts a patch, executes it, and verifies the pod state:
Figure 5: The DevSecOps Copilot panel executing self-healing actions, applying environmental fixes, and confirming status.
BanriFlow is built with state-of-the-art prompt engineering and API optimizations to guarantee zero hallucination:
- Chain of Thought (CoT): Enforces a hidden
thought_processmechanism, forcing the AI to reason logically before returning results. - Deterministic Output: Uses
Temperature=0.1andTop-P=0.7for strict, robotic, and highly accurate JSON schema compliance. - Token Efficiency: Handles massive topologies flawlessly with an
8192max token buffer.
Developed by thebanri