BashBard
An AI-powered Linux shell tutor and command storyteller
Links
README
From the repo.
🧠 BashBard
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 Point | BashBard Solution |
|---|---|
| "What was that command again?" | /e find config files modified today → find /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
.envat~/.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
BashBard understands your intent, it’s not just syntax-aware, it’s context-aware.
Core Features
| Feature | How to Use | Live Example |
|---|---|---|
| Natural Language → Command | /e <request> | /e list all .log files older than 7 days |
| Auto-Repair (Interactive) | /repair on | gti status |
| Auto-Repair (Silent) | /repair auto | lsf |
| Disable Auto-Repair | /repair off | No AI fixes, default mode |
| Dry-Run Mode | /dry on | /e delete temp files |
| Dry-Run Status | /dry status | DRY-RUN: ENABLED |
| Quick Aliases | /alias basic | ll → ls -alF |
| Replan on Failure | Choose [p]lan after error | docker run -p 80:80 app |
| Universal Safety Gate | All commands (even typed) | rm -rf /home |
| Help & Exit | /help or /quit | Shows full command reference |
Pro Workflow:
- Start with
/repair on+/dry on→ explore safely- Trust the flow? →
/repair autofor speed- 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 onto let BashBard automatically fix simple typos likegti→git.
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, andfcntl)
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
| Feature | Description |
|---|---|
| Multi-model support | Gemini + OpenAI + local models (cost/latency balance) |
| Session memory | Retain context across commands, privacy-first |
| Offline mode | Run fully on-prem or air-gapped |
| Plugin API | Extend with Docker, K8s, AWS, pentest modules |
| Safe sandboxes | Test risky commands in isolation |
| Pentester mode | Evidence capture, checklists, exploit guidance |
| History intelligence | Auto-refactor repeated tasks |
| Explainability | Show 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 GitHub • Wiki • Discussions
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.