← Discover MCPs and Agents
B
MCPAI & MLGitHub

BashBard

An AI-powered Linux shell tutor and command storyteller

Links

README

From the repo.

License: Apache-2.0 LLM: Google Gemini Python 3.12+ Wiki Languages Visitors

🧠 BashBard

Demo_v1.webm

AI-Powered Shell Intelligence & Safety & Learning Layer

Think in any language. Learn Linux deeply. Execute safely. Never regret a command.

⚡Overview

BashBard is an AI-augmented terminal assistant that embeds Google Gemini intelligence directly into your Linux shell via a true PTY environment.

It transforms ambiguous intent into optimized, vetted bash commands, repairs failed executions in real time, and enforces proactive safety, all without leaving your terminal.

Designed for:

  • Beginners learning Linux → Understand why commands work, not just memorize
  • Developers writing scripts under pressure
  • Sysadmins managing critical infrastructure
  • Security engineers auditing and responding at speed
  • DevOps teams automating with precision
  • Power users who demand fluency and control

BashBard delivers smarter automation, zero-trust execution, context-aware correction, and interactive learning, all in your terminal.


💡Why BashBard Exists: Safety + Education

The terminal is powerful and dangerous.
One typo = data loss. One bad curl | bash = compromise.

BashBard fixes this and teaches you along the way.

Pain PointBashBard Solution
"What was that command again?"/e find config files modified todayfind /etc -type f -mtime -1 + explains each part
"I don’t understand the output"AI breaks down results, flags risks, suggests next steps
"I typed gti instead of git"Auto-corrects + teaches the difference
"I ran rm -rf / by mistake"BLOCKS + explains: “This deletes root. Use /tmp instead.”
"I’m new to Linux"Guides you step-by-step, builds muscle memory safely

“Your terminal, now with judgment and a teacher.”

Multilingual Input Support

BashBard understands natural language in any language including Arabic, English, French, Spanish, and more.

⚙️ Quick Start (30 Seconds)

BashBard ships with an automated installer that sets up everything for you.

curl -sSL https://github.com/5afagy/BashBard/raw/refs/heads/main/install.sh | bash && BashBard

One command. Zero hassle.
Installs, configures, and launches BashBard even on fresh systems.

What the installer does:

  • Creates a dedicated virtual environment
  • Installs dependencies from requirements.txt
  • Prompts for your Google Gemini API key (on first run)
  • Auto-generates .env at ~/.local/share/bashbard/.env
  • Installs launcher to ~/.local/bin/BashBard

Example first-run output:

Configuring BashBard environment...
Installation complete.
Enter your Google Gemini API key: ??
Saved API key to /root/.local/share/bashbard/.env

Usage Examples

image

BashBard understands your intent, it’s not just syntax-aware, it’s context-aware.

Core Features

FeatureHow to UseLive Example
Natural Language → Command/e <request>
/e list all .log files older than 7 days
→ find /var/log -name "*.log" -mtime +7
Auto-Repair (Interactive)/repair on
gti status
AI: Did you mean git status?
[r]un / [e]dit / [c]ancel
Auto-Repair (Silent)/repair auto
lsf
→ ls -F (runs automatically)
Disable Auto-Repair/repair offNo AI fixes, default mode
Dry-Run Mode/dry on
/e delete temp files
Would execute: rm -rf /tmp/*
Dry-Run Status/dry statusDRY-RUN: ENABLED
Quick Aliases/alias basic
ll → ls -alF
la → ls -A
l → ls -CF
Replan on FailureChoose [p]lan after error
docker run -p 80:80 app
AI Plan:
[1] docker pull app
[2] docker run -p 8080:80 app
Universal Safety GateAll commands (even typed)
rm -rf /home
DANGEROUS: Targets root-owned path
Why risky: irreversible data loss
Proceed? [y/N]
Help & Exit/help or /quitShows full command reference

Pro Workflow:

  1. Start with /repair on + /dry on → explore safely
  2. Trust the flow? → /repair auto for speed
  3. Need full control? → /dry off + manual approval

⚙️ Advanced Features

  • Context-aware auto-repair with re-planning (/repair auto)
  • Intelligent output filtering for clean AI feedback
  • Quick alias injection (/alias basic)
  • Customizable dry-run, quiet, and auto-repair modes
  • Built-in danger heuristics to prevent destructive actions

💡 Pro Tip: Run /repair on to let BashBard automatically fix simple typos like gtigit.

Technology Overview

BashBard is engineered with a modular architecture built on modern AI and system libraries.

Stack:

  • Python 3.12+
  • Google Gemini (default) via LangChain / LangGraph
  • PTY shell system (using pty, termios, and fcntl)

Core engine: terminal.py runs the real-time AI terminal. CLI wrapper: cli.py decides mode (interactive, legacy, one-shot). LLM logic: llm.py, nodes.py, and safety.py handle intelligence and protection.

Future Roadmap

FeatureDescription
Multi-model supportGemini + OpenAI + local models (cost/latency balance)
Session memoryRetain context across commands, privacy-first
Offline modeRun fully on-prem or air-gapped
Plugin APIExtend with Docker, K8s, AWS, pentest modules
Safe sandboxesTest risky commands in isolation
Pentester modeEvidence capture, checklists, exploit guidance
History intelligenceAuto-refactor repeated tasks
ExplainabilityShow prompt + reasoning for every suggestion
Team sync (opt-in)Share policies, not data

All telemetry and cloud features are opt-in only.

🤝 How You Can Help (Open to Contributors)

BashBard is a community project, contributions are welcome. Ways to contribute:

  • ⭐ Star & fork the repo
  • 🐛 Open issues for bugs or improvement ideas
  • ✍️ Submit pull requests (features, docs, tests)
  • 💬 Join Discussions to propose roadmap items or plugins
  • 🔒 Help with security reviews and safe execution patterns

Contribution guide: Fork → branch → PR → review. Keep changes focused and well-documented.

🌟 Contributors

👨‍💻 Authors & License

Authors: Khafagy & Elnaggar
Affiliated with: Cyber Force LLC
License: Apache 2.0

Built with ❤️ in Egypt — open to collaborators worldwide.


BashBard: Intelligence Meets the Command Line.

View on GitHubWikiDiscussions

Star. Fork. Build. Secure.

curl -sSL https://github.com/5afagy/BashBard/raw/main/install.sh -o install.sh && bash install.sh && BashBard

Updated: November 11, 2025 04:15 PM EET • Cairo, Egypt

Collected info

  • 19 stars
  • 8 forks
  • Language: Python
  • Source updated: 8/15/2026

Config for your environment

Replace {MCP_ENDPOINT_URL} with this MCP’s endpoint URL (from its repo or docs above). No API key — you connect directly.

Tool

OS

Config file: ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp-server": {
      "url": "{MCP_ENDPOINT_URL}"
    }
  }
}

Paste into mcpServers in the config file. Restart Cursor after saving.

If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.