🤖 grugbot420

A simple bot built the grug way. Zero dependencies. Zero complexity. Just works.

🦴 Philosophy: Complexity is the enemy. Ship simple code.

Features

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

CommandDescription
helpShow all commands
wisdomGet grug wisdom
shipShip some code
thinkGrug thoughts
debugDebug protocol
complexityCheck complexity level
jokeTell a grug joke
coffeeCoffee status
yeetDelete something
reviewPR review
standupDaily standup
motivationGet motivated

API Reference

Endpoints

EndpointMethodDescription
/GETPortal web interface
/api/cmd?cmd=wisdomGETRun command (query)
/api/cmdPOSTRun command (JSON body)
/api/healthGETHealth check
/api/commandsGETList 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

FilePurposeFormat
wisdom.txtRandom sayings for /wisdom and unmatched-input fallbackOne quote per line
jokes.txtRandom response to /jokeOne joke per line
smoke.txtRandom response to /smoke and 420 keywordsOne vibe per line
rules.txtKeyword→response, scanned before the hardcoded ladderkw1,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
Pro tip: live counts are printed on every kernel boot in the form [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

❌ Grug No Do

Remember: "Complexity very very bad. Say again: complexity very bad."