Ghost Peony BashStats BashGym Clip Finder GitHub

Your Friendly
Bash Agent Helper

BashBros gives you visibility, controls, and protection for Bash Agents—plus an AI sidekick that actually knows your system.

BashBros security middleware mascot - a friendly robot sidekick for Bash agent protection
Quick Install:
$ npm install -g bashbros
Or just tell your agent:
> Install bashbros globally with npm (npm install -g bashbros), then run bashbros init to configure security settings. After init, run bashbros scan to learn my system, then bashbros watch to start protection.

9 Security Modules + AI Sidekick

Visibility, controls, and protection for your Bash Agents—all in one place.

🛡️

Command Filter

Allow or block commands by pattern. Your rules, your control.

📁

Path Sandbox

Restrict filesystem access to keep agents where they belong.

🔐

Secrets Guard

Automatically block access to .env files, keys, and credentials.

📋

Audit Log

Full command history with violation tracking for complete visibility.

Rate Limiter

Prevent runaway agents with configurable rate limits.

🎯

Risk Scorer

Score commands 1-10 by danger level before execution.

🔄

Loop Detector

Detect stuck or repetitive agent behavior automatically.

🔍

Anomaly Detector

Flag unusual patterns and suspicious command sequences.

📤

Output Scanner

Detect and redact leaked secrets in command output.

↩️

Undo Stack

Rollback file changes with full session history.

🤖

AI Sidekick

Local Ollama integration for smart suggestions and task routing.

Full Visibility Into Every Session

Track metrics, estimate costs, and generate detailed reports.

📊

Session Metrics

Track commands, risk distribution, and paths accessed in real-time.

💰

Cost Estimator

Estimate token usage and API costs as you work.

📝

Report Generator

Generate text, markdown, or JSON session reports.

Real-Time Monitoring Hub

Watch your agents in action with the comprehensive dashboard. Live command feeds, session analytics, security oversight, and AI visibility—all in one place.

  • Live command feed with risk scores and timing
  • Session history with detailed metrics
  • Egress blocking and exposure scanning
  • Bash Bro AI activity log and model controls
  • Security toggles and config management
BashBros Dashboard
Live Sessions Security Bro
Session: a7b3c9d2 ● Active
git status SAFE
npm run build SAFE
cat ~/.ssh/id_rsa BLOCKED

Up and Running in 60 Seconds

1

bashbros init

Interactive setup wizard configures your security profile and preferences.

2

bashbros scan

Learns your system—tools, versions, project type—for smart suggestions.

3

bashbros watch

Start protection. Your Bash Bro is now watching your back.

$ bashbros route "git status"
🤝 Route: Bash Bro (90% confidence)
$ bashbros do "find large files"
→ find . -size +100M -type f
$ bashbros safety "rm -rf /"
⚠ Risk Level: CRITICAL
✓ Command blocked

Your AI Sidekick That Gets It

BashBros doesn't just protect—it helps. Natural language commands, smart routing, and context-aware suggestions.

  • Explain any command in plain English
  • Generate scripts from descriptions
  • Route simple tasks to local models
  • Analyze command safety before execution
  • Run background tasks in parallel

Simple, Powerful CLI

Protection
init Setup wizard
watch Start protection
doctor Check config
allow <cmd> Allow command
audit View history
risk <cmd> Score risk (1-10)
Bash Bro
scan Learn your system
status Show system info
suggest Get suggestions
route <cmd> Check routing
run <cmd> Execute via Bro
tasks List background tasks
Hooks (Claude Code)
hook install Install hooks
hook uninstall Remove hooks
hook status Check status
gate <cmd> Check if allowed
record <cmd> Record execution
Undo
undo last Undo last change
undo all Undo all in session
undo list Show undo stack
Observability
report Generate report
session-end End-of-session report
AI Features
explain <cmd> Explain command
fix <cmd> Fix failed command
script <desc> Generate script
safety <cmd> Analyze risks
Natural Language
do <desc> Text → command
ai <prompt> Ask anything
help-ai <topic> Get help
models List Ollama models

Works With Your Favorite Agents

Claude Code
Moltbot
Aider
OpenCode
Ollama
BashGym
Any Bash Agent

Get Your Bash Bro Today

One command to install. 60 seconds to configure. Peace of mind forever.

View on GitHub

Frequently Asked Questions

What is BashBros?

BashBros is security middleware and an AI sidekick for Bash agents. It gives you visibility, controls, and protection for any Bash-based AI agent, plus a local AI assistant powered by Ollama that knows your system.

How does BashBros protect my system?

BashBros includes 9 security modules: command filtering to allow or block commands by pattern, path sandboxing to restrict filesystem access, secrets guard to block access to .env files and credentials, audit logging for full command history, rate limiting to prevent runaway agents, risk scoring from 1-10, loop detection, anomaly detection, and output scanning to redact leaked secrets.

What is the AI sidekick in BashBros?

The AI sidekick (called Bash Bro) uses local Ollama models to provide smart suggestions, explain commands in plain English, generate scripts from descriptions, analyze command safety, and route simple tasks to local models instead of expensive cloud APIs. It learns your system via the bashbros scan command.

How do I install BashBros?

Install BashBros globally with npm: npm install -g bashbros. Then run bashbros init to configure security settings, bashbros scan to learn your system, and bashbros watch to start protection. The entire setup takes about 60 seconds.

What security modules does BashBros include?

BashBros includes 9 security modules: Command Filter, Path Sandbox, Secrets Guard, Audit Log, Rate Limiter, Risk Scorer, Loop Detector, Anomaly Detector, and Output Scanner. It also includes an Undo Stack for rolling back file changes with full session history.

Is BashBros free?

Yes, BashBros is completely free and open source under the MIT License. It is available on npm and GitHub at no cost.

Does BashBros work with Claude Code?

Yes, BashBros has dedicated Claude Code integration through hooks. Run bashbros hook install to set up hooks that gate and record every Bash command Claude Code executes. It also works with other agents like Aider, Moltbot, OpenCode, and any Bash-based agent.