🤖 grugbot420
A simple bot built the grug way. Zero dependencies. Zero complexity. Just works.
Features
- Zero npm dependencies
- Works offline
- CLI + Web interface
- Bun.js server included
- No build step required
Installation
One-Click Install
Windows (PowerShell):
irm https://raw.githubusercontent.com/grug-group420/grug-install/main/install.ps1 | iex
Linux/macOS:
curl -fsSL https://raw.githubusercontent.com/grug-group420/grug-install/main/install.sh | bash
Manual Install
# Install Bun
curl -fsSL https://bun.sh/install | bash
# Clone and run
git clone https://github.com/grug-group420/grugbot-server.git
cd grugbot-server
bun run serve
Quick Start
As CLI
$ node index.js wisdom
🦴 "Complexity very very bad. Simple good."
$ node index.js ship
🚀 SHIPPED! Code in production. Grug happy.
As Module
const grugbot = require('grugbot420');
console.log(grugbot.wisdom());
console.log(grugbot.ship());
console.log(grugbot.process('joke'));
As Web Server
bun run serve
# Opens http://localhost:3420
All Commands
| Command | Description |
|---|---|
help | Show all commands |
wisdom | Get grug wisdom |
ship | Ship some code |
think | Grug thoughts |
debug | Debug protocol |
complexity | Check complexity level |
joke | Tell a grug joke |
coffee | Coffee status |
yeet | Delete something |
review | PR review |
standup | Daily standup |
motivation | Get motivated |
API Reference
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/ | GET | Portal web interface |
/api/cmd?cmd=wisdom | GET | Run command (query) |
/api/cmd | POST | Run command (JSON body) |
/api/health | GET | Health check |
/api/commands | GET | List commands |
Example
curl "http://localhost:3420/api/cmd?cmd=wisdom"
# {"success":true,"command":"wisdom","result":"🦴 \"Complexity very very bad...\""}
curl -X POST http://localhost:3420/api/cmd \
-H "Content-Type: application/json" \
-d '{"cmd":"ship"}'
🎓 Training Pipeline
Grug is data-driven. The full corpus of wisdom, jokes, smoke-break vibes, and keyword→response rules lives in plain-text files under apps/grug_training/ in the LateralusOS repo. To teach grug new things you do not need to write any C — just edit the .txt files and rebuild. The build invokes tools/gen_grug_corpus.py which compiles them into a gui/grug_corpus.h header consumed by the kernel.
📁 Training Files
| File | Purpose | Format |
|---|---|---|
wisdom.txt | Random sayings for /wisdom and unmatched-input fallback | One quote per line |
jokes.txt | Random response to /joke | One joke per line |
smoke.txt | Random response to /smoke and 420 keywords | One vibe per line |
rules.txt | Keyword→response, scanned before the hardcoded ladder | kw1,kw2=>response |
Lines starting with # and blank lines are ignored everywhere.
⚡ Rule Format
# apps/grug_training/rules.txt
docker,k8s,helm => container is cage for app. distributed cage less good.
python,pip,django=> snake good. install easy. type loose. ship fast.
rust,cargo,borrow=> borrow checker is grug yelling at past grug. listen to grug.
Matching is case-insensitive substring. First rule that matches wins. The engine scans rules.txt first, then falls back to the hardcoded keyword ladder, then finally to a random wisdom.txt line.
🛠️ Workflow
# 1. edit a training file
vim apps/grug_training/rules.txt
# 2. regenerate the header (also runs automatically during build)
python3 tools/gen_grug_corpus.py
# → [grug-corpus] gui/grug_corpus.h: 60 wisdom, 29 jokes, 22 smoke, 60 rules
# 3. run the unit tests
pytest lateralus-os/tests/test_gen_grug_corpus.py # 8 cases, < 0.1s
# 4. rebuild the OS
./build_and_boot.sh --iso
# 5. boot QEMU and chat to grug
./build_and_boot.sh --gui
# inside the VM: type /stats to see your new counts
[trained] 60w/29j/22s/60r — one quick glance confirms grug picked up your additions.
The Grug Way
We follow the teachings of The Grug Brained Developer.
✅ Grug Do
- Write simple code
- Ship early and often
- Delete unnecessary code
- Use boring technology
- console.log for debugging
❌ Grug No Do
- Over-engineer solutions
- Add "just in case" features
- Create deep abstractions
- Chase new frameworks
- Premature optimization