Demo_v1.webm
Think in any language. Learn Linux deeply. Execute safely. Never regret a command.
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.
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.”
BashBard understands natural language in any language including Arabic, English, French, Spanish, and more.
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 && BashBardOne command. Zero hassle.
Installs, configures, and launches BashBard even on fresh systems.
- 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
BashBard understands your intent, it’s not just syntax-aware, it’s context-aware.
| 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
- 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.
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.
| 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.
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.
Authors: Khafagy & Elnaggar
Affiliated with: Cyber Force LLC
License: Apache 2.0
Built with ❤️ in Egypt — open to collaborators worldwide.
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 && BashBardUpdated: November 11, 2025 04:15 PM EET • Cairo, Egypt