PHPackages                             krubik/krubot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. krubik/krubot

ActiveLibrary[Framework](/categories/framework)

krubik/krubot
=============

The Galactic Singularity Engine for building Intelligent bots on Laravel.

v0.7ALPHA-1(1mo ago)22MITPHPPHP &gt;=8.2CI passing

Since Jul 17Pushed 1mo agoCompare

[ Source](https://github.com/PolyMath-XK/Krubot)[ Packagist](https://packagist.org/packages/krubik/krubot)[ Docs](https://StoryKo.de)[ RSS](/packages/krubik-krubot/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

[![DevGX — Developer Experience Exponentiation](https://camo.githubusercontent.com/46c24d4a054e69329f3af5ed3c6c53b566f96cef0470546bc5a3fee6b1e8ee01/68747470733a2f2f53746f72794b6f2e64652f6173736574732f696d672f44657647582e706e67)](https://StoryKo.de/)

KRUBIK / KRUBOT
===============

[](#krubik--krubot)

The Galactic Singularity Engine for building Intelligent bots on Laravel
------------------------------------------------------------------------

[](#the-galactic-singularity-engine-for-building-intelligent-bots-on-laravel)

**Build less boilerplate. Ship more meaning.**
**Develop Story for TG, Bale, Rubika Once!**

***This is not just another bot library.***
**This is the *First Strike* in a global revolution for the joy of developers' work and life.**

**To solidify a deep, penetrating, and unbreakable connection between ::**
**Human ✸ System ✸ LLMs**

[![PHP](https://camo.githubusercontent.com/dff57f35e05ba5bb847a182b0de56ce00f5b33eb4bfb86b371e2c69de0accee0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](#requirements)[![Laravel](https://camo.githubusercontent.com/7cafdf279ace49c0fac01ad5c743e0e17a930c62603f1bc858ffb19d0d130f8e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322532422d4646324432303f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](#requirements)[![DX](https://camo.githubusercontent.com/c7872f80e737319e3b55aa5c78374dd362ebc960f3bb10248e61eaa937ba4df9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f44582d48797065722d2d4f7074696d697a65642d4646303046463f7374796c653d666f722d7468652d6261646765)](#the-manifesto)[![Narrative Programming](https://camo.githubusercontent.com/5ce0ae09b294063e0bc320aafcd3a70397bb333d725c17ed9ad3588958f2e13b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f50726f6772616d6d696e672d4e61727261746976652532304176616e742d2d47617264652d3030453338433f7374796c653d666f722d7468652d6261646765)](#what-is-narrative-programming)[![License](https://camo.githubusercontent.com/ae983ddfdb0f5e1ab7e39763bcf6ced984d1c4882bf8c3b27cc672252707149e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542b2d3841324245323f7374796c653d666f722d7468652d6261646765)](./KLicense.md)

> **Build bots like stories.**
> **Scale systems like an architect.**
> **Command drivers like a Warlord.**
> **And Enjoy Coding like it was meant to be enjoyed.**

---

> **Hyper-DX Frequency Alignment Protocol** 🎧
>
> Before you step into the KrubiK Cyber-Citadel Introduction, your Neural circuits and Spiritual bandwidth must be calibrated to the correct resonance. 🪄🧠⚡️
>
> **The Catalyst Track:** 🎼🌌 [Ludwig Göransson — The Mandalorian Theme \[Extended\]](https://soundcloud.com/d-x-k-828761910/the-mandalorian-extended-theme/s-ASC87lDNGzT)
>
> **Directive:** Initiate playback in a background tab and back. *Read this **Architectural Spellbook** only when you are in the stable frequency.* ⚡🔮

 [![KrubiK Drivers](https://camo.githubusercontent.com/c0984d6fe8779e0d4036701b69bc21e272e91820f9ed8e40a8c6c2a6a0b9a54e/68747470733a2f2f53746f72794b6f2e64652f6173736574732f696d672f4b727562694b2f447269766572732e6a7067)](https://camo.githubusercontent.com/c0984d6fe8779e0d4036701b69bc21e272e91820f9ed8e40a8c6c2a6a0b9a54e/68747470733a2f2f53746f72794b6f2e64652f6173736574732f696d672f4b727562694b2f447269766572732e6a7067) **Drivers of *KrubiK Agency*
{ KrubiK Platform Drivers }**

The Manifesto
-------------

[](#the-manifesto)

Most developers were trained to tolerate unnecessary pain.

Messy handlers.
Fragile callback strings.
Manual state machines.
Boilerplate everywhere.
Transport-layer noise leaking into feature code.
Debugging that breaks the runtime.
Messenger APIs that force you to think like a packet parser instead of a product builder.

Krubot exists to reject that entire reality.

It was forged around a different belief:

> **Developer Experience \[Dev✸✸\] is not a cosmetic luxury. It is critical foundation.**

KrubiK turns bot development into a clean, composable, joyful workflow:

```
// To Activate, Just Drop In :: app/Nexus/ServiceHubNexus.php

class ServiceHubNexus {
    #[OnCommand('list')]
    public function launchUI(Krubot $bot): void {
        $bot->reply("Service Hub:")->replyKeyboard(
            ReplyKeyboard::make()->row([
                PowerButton::make('🛒 Open Mini-Store')->webApp('https://shop.github.io'),
                PowerButton::make('📍 Share Precise Location')->requestLocation()
            ])
        )->send();
    }
}
```

No chaos.
No callback hell.
No fragile state spaghetti.
Just expressive PHP that reads like intent.

🌌 The Awakening (Why KrubiK?)
-----------------------------

[](#-the-awakening-why-krubik)

The era of messy nested callbacks, manual state tracking, and fragile regex patterns is dead.

> **Code should not feel like clerical labor.**
> It should feel like Authorship.
> Welcome to **KrubiK Cyber-Citadel**.

Whether you are a **Junior Developer** looking to build a Native UI in seconds, or a **Senior Architect** deploying a multi-messenger fleet with dimensional state-isolation, ***KrubiK is your Ultimate Lexicon***.

What is KrubiK?
---------------

[](#what-is-krubik)

KrubiK is a **high-level narrative compositional engine** for building bots and messenger-based systems with **extreme developer experience**.

That is why KrubiK does not merely help you “handle updates” or “send messages.”
It helps you design **flows**, **state**, **interaction**, **meaning**, and **Momentum** in the code.

This is not just another bot library.

This is an attempt to push software development toward something more elegant:

- less friction,
- less repetitive glue code,
- less cognitive exhaustion,
- more clarity,
- more narrative flow,
- more joy in the act of creation.

> ***Let's Become StoryCasters !***

Table of Contents
-----------------

[](#table-of-contents)

- [The Manifesto 📜✨](#the-manifesto)
- [What is Narrative Programming? 📖💬](#what-is-narrative-programming)
- [The Hard Questions (Why KrubiK?) 🤔](#the-hard_questions)
    - [For Junior Developers 🌱🚀](#for-junior-developers)
    - [For Senior Developers 🧠💡](#for-senior-developers)
    - [Why not just use the plain Telegram SDK? 🚫🛠️](#why-not-just-use-the-plain-telegram-sdk)
    - [Why not Other Telegram/Rubika/Bale Libraries? 🌉⚔️](#architectural-divide)
- [The Warlord Architecture (Multi-Verse Orchestration) 👑🪐](#warlord-architectural)
- [Hyper-DX Grimoire (**Code Showcase**) 📜✨🔮](#glimpse-into-the-matrix-code-showcase)
- [Installation &amp; Quick Start 📥▶️⚡](#quick-start)
- [The Binary Core Architecture (Dual-Heart System) ☯️⚛️](#dual-heart-system)
- [Autonomous Webhook Receptors &amp; Nexus Creation 📡🕸️](#webhooks-nexus%22)
- [The Artisan CLI Commandz ⚒️📜](#artisan-cli-commands)
- [Why LLMs Fall Head Over Heels in Love with KrubiK/Krubot 🤖💖](#why-llms-love-krubik)
- [Stellar-Synergistic Agreement (License) 🌌🤝](#the-stellar-synergistic-agreement-ssa)
- [Acknowledgment of Origin &amp; Lineage 🌳 🧬 🩸](#lexicon-origin)

---

 *Code should be a source of profound joy, not a cause of cognitive burnout.*

 ***KRUBイス*** [![KrubiK Architecture Tower](https://camo.githubusercontent.com/c9ea768e68bf389e4b20f20b56ef01a7e5062e80b4d34f2289772ad76704b4f9/68747470733a2f2f53746f72794b6f2e64652f6173736574732f696d672f4b727562694b2f4b727562694b2d43796265722d4369746164656c2e6a7067)](https://camo.githubusercontent.com/c9ea768e68bf389e4b20f20b56ef01a7e5062e80b4d34f2289772ad76704b4f9/68747470733a2f2f53746f72794b6f2e64652f6173736574732f696d672f4b727562694b2f4b727562694b2d43796265722d4369746164656c2e6a7067)***KrubiK / KRUBイス Cyber-Citadel Engine Stack:**
PHP Layer ➔ Symfony Layer ➔ Laravel Foundation ➔
Katana: Origin ➔ KrubiK ➔ Krubot ➔ Nexus*

KrubiK stands on a layered philosophy:

- **PHP / Web Layer** for operational reality
- **Symfony / Laravel** for mature ecosystem power
- **Katana Origin** for system philosophy and structure
- **KrubiK / Krubot** for the core engine &amp; logicz 💻️📟️⚡️
- and **Nexus** for the Hyper-DX narrative layer

What *StoryCasters* Often Do ?

- Write All Their Business Logics as Intent-driven Stories in sacred Nexuses.

That is why it can feel magical at the first galance...

The Manifesto
-------------

[](#the-manifesto-1)

Instead of manually parsing updates, tracking callback IDs, writing repetitive state machines, and scattering validation logic across handlers,

> **Deploy Krubot *Today* and *Join StoryCasters Now* !**

Krubot gives you a fluent, intent-driven, expressive system for building serious conversational and enterprise products.

KrubiK shatters the concept of *"Platform-Centric"* design. It introduces the **Multi-Verse (Warlord) Architecture**, allowing a single codebase to command multiple platforms (Telegram, Rubika, Bale) simultaneously without altering your core Business Logic.

Krubot Engine is an avant-garde act of ***Rebellion against boilerplate and cognitive primitive burnout***, called DX\_Rebellion. Krubot designed to give you **Magic** at the surface, backed by **Absolute Powerful Architectural Rigor** underneath.

Most frameworks force you to think inside their shape. Krubot, instead, tries to read your mind and acts as your tune.

It dances to your rhythm-
a powerful staff you can draw dragons from. ***a Weaponized Wand for summoning Dragons.***

 [![PhantomShell](https://camo.githubusercontent.com/5240991e6c464376c0f9049a743ac6fee231e4251d9ab1df7b33dd8d32690d55/68747470733a2f2f53746f72794b6f2e64652f6173736574732f696d672f4b727562694b2f5068616e746f6d5368656c6c2e706e67)](https://camo.githubusercontent.com/5240991e6c464376c0f9049a743ac6fee231e4251d9ab1df7b33dd8d32690d55/68747470733a2f2f53746f72794b6f2e64652f6173736574732f696d672f4b727562694b2f5068616e746f6d5368656c6c2e706e67) ***PhantomShell - The Hypnosis Master*
{ KrubiK Memory Module }**

---

### What is "Narrative Programming"?

[](#what-is-narrative-programming)

Most frameworks force you to write *mechanical* code (e.g., "If update type is message, check text, update state ID in DB, send message").

**Narrative Programming** means your code reads like pure intention. It reads like a story. You declare *what* should happen in application:

- `ask("Password")->then(validate)->reply("Welcome")`
- `form("JobApp")->field("Name")->run()`

### Narrative Programming, in one sentence ::

[](#narrative-programming-in-one-sentence-)

**Narrative Programming** means writing code that reads like intention, flows like dialogue, and behaves like architecture.

Instead of forcing the developer to think in scattered transport details, KrubiK lets the developer think in:

- conversations,
- transitions,
- intent,
- roles,
- scenes,
- structured outcomes.

That is the frontier this project stands on.

KrubiK Engine handles the ugly mechanics of State Machines, DTO translations, and session hydration. You stop acting like a array parser, and you start acting like an Story Author.

The Hard Questions
------------------

[](#the-hard-questions)

If you are a Senior Architect, Or an Eager Junior you are probably asking yourself why you should adopt this ecosystem. Here are the answers.

### For Junior Developers

[](#for-junior-developers)

KrubiK Pure Magic gives beginners something *dangerously rare*:
**real power without early trauma**.

No arcane setup rituals. No callback spaghetti. No raw payload excavation. No `callback_query` ID anxiety. No state-machine suffering before your first moment of creation.

Instead, you enter through a clean gate and start writing fluid, human-readable, chainable code that feels less like configuration and more like spellcasting.

You get:

- A clean entry point
- Readable syntax that feels possible instantly
- Fluid, poetic chains instead of mechanical boilerplate
- Less confusion
- Less fear
- Faster feedback
- More momentum
- Real creation before exhaustion
- A gentler path into serious architecture

KrubiK lets beginners build first, understand deeper, and fall in love before the pain arrives.

Juniors love it because it feels possible.

### For Senior Developers

[](#for-senior-developers)

KrubiK respects what experienced engineers care about:

- Clean layering
- Clear transport boundaries
- Sharp intent / domain separation
- Semantic APIs
- Controlled abstractions
- Composable primitives
- Context isolation
- Context-aware state
- Structured conversations
- Typed DTOs
- DTO-driven UI
- OS-level UI abstraction
- Attribute-driven routing
- Route naming and reverse resolution
- Laravel-native validation
- Deep framework integration
- Storage abstractions
- Fluent command outcomes
- Multi-driver orchestration
- Multi-platform scale
- Queue-friendly messaging
- Native telemetry patterns with an Operational telemetry
- Runtime discoverability
- System operations

It is not “magic” in the lazy sense. It is Engineered Expressiveness;
Expressive enough for prototypes and Structured enough for production systems.

Seniors respect it because it is not pretending.
They will recognize it is dramatic in style, but structural in substance.

---

### Why not just use the plain Telegram SDK?

[](#why-not-just-use-the-plain-telegram-sdk)

Because an SDK is just a transport layer. When you use a plain SDK, you have to manually build:

- Persistent multi-step conversations
- Contextual per-chat / per-user memory
- Route matching and middleware
- Callback data serialization and limits
- Validation rules for user input

KrubiK abstracts all of this into a fluent, Laravel-native DSL while still letting you access the raw SDK (`PrimeAgent`) when you need low-level power.

 [![PrimeAgent](https://camo.githubusercontent.com/8cb3b458aa8e6d09f3c9f2d524cfc89e77430caa4bad2ce38fd04f18cb8fcc07/68747470733a2f2f53746f72794b6f2e64652f6173736574732f696d672f4b727562694b2f5072696d654167656e742e706e67)](https://camo.githubusercontent.com/8cb3b458aa8e6d09f3c9f2d524cfc89e77430caa4bad2ce38fd04f18cb8fcc07/68747470733a2f2f53746f72794b6f2e64652f6173736574732f696d672f4b727562694b2f5072696d654167656e742e706e67)
 ***PrimeAgent - The Rebel but Wise Envoy*
{ KrubiK Proxy Module }**

📊 THE ARCHITECTURAL DIVIDE: A HYPER-DX PARADIGM
---------------------------------------------------------------------------------------------

[](#-the-architectural-divide-a-hyper-dx-paradigm)

Senior engineers do not buy *marketing hype*; they buy **Structural Integrity**.

Traditional bot libraries were built for a simpler era— optimizing for basic HTTP transports and single-platform wrappers.

KrubiK is not merely a wrapper. It is a **higher-order compositional engine** designed to make complex system development feel expressive, structural, and so alive.

Here is the honest architectural comparison between standard paradigms and the KrubiK Engine:

Feature DimensionPlain Messenger SDKsTraditional FrameworksKrubiK / Krubot**API Philosophy**Transport-centric (raw JSON arrays)Platform-centric (wrappers &amp; simple routers)**Intent-centric (Narrative DSL)****State &amp; Memory**Manual cache/DB state managementBasic session storage**Context-isolated multi-verse storage****Complex Conversations**Fragile manual FSMsLinear steps (rigid and prone to breakage)**Native Forms &amp; self-validating Wizards****Multi-Driver Power**Hardlocked to one messengerSingle platform focus**Warlord-grade cross-platform orchestration****Routing Flexibility**Basic string matching, Manual condition trees, Raw parsingSimple regex handlers / Pattern-based routers with limited forwarding**Attribute-Driven, Context-safe, Polymorphic Route Engine with forwarding****Agent Orchestration**Raw API calls (no abstraction)Basic driver selection**Intent-driven deep driver engagement****Concurrency Control**No inherent overlap protectionBasic file/cache locks**Atomic Locking, Zero-Overlap possibility****Observability**Standard logs / `dd()` (breaks webhooks)Standard exception handling**Amethyst Telemetry &amp; Silent Tracing****Process Immortality**Manual external cron jobsFragile external daemon scripts**[Dual-Heart Architecture](#dual-heart-system), Self-healing, anti-fragile daemon****AI ([LLM](#why-llms-love-krubik)) Generation**Extremely poor (high hallucinations)Moderate (frequent type-matching errors)**Perfect (AST-aligned declarative syntax)**KrubiK delivers **Hyper-DX natively inside Laravel**. You do not build a bot; you extend your existing enterprise applications seamlessly into the intelligence realm.

###  The Warlord Architecture (Multi-Verse Orchestration)

[](#-the-warlord-architecture-multi-verse-orchestration)

Most libraries are strictly single-platform-centric. KrubiK introduces a genuine **Warlord Architecture**.
You write your logic once, using a mythic, semantic API language, and command Telegram, Rubika, and Bale simultaneously. It abstracts the transport layer completely, allowing you to focus purely on the narrative flow.

 [![Nemesis - KrubiK Manager](https://camo.githubusercontent.com/b51c71c657f80fe5c42a84b5f274c36c4787642444fc015a7166b9f3fbb75912/68747470733a2f2f53746f72794b6f2e64652f6173736574732f696d672f4b727562694b2f4e656d657369732e706e67)](https://camo.githubusercontent.com/b51c71c657f80fe5c42a84b5f274c36c4787642444fc015a7166b9f3fbb75912/68747470733a2f2f53746f72794b6f2e64652f6173736574732f696d672f4b727562694b2f4e656d657369732e706e67)
***Nemesis* - Our *Laravel*ish Manager of KrubiK Citadel
{ Intelligent KrubiK Driver Manager }**
CEO of 3 Drivers in First Picture, KrubiK Agency Manager
Identifies ***Requests*** From ***Any-Platfrom*** and Sends Formatted to Drivers.

### Why not plain SDKs?

[](#why-not-plain-sdks)

Plain SDKs give you transport primitives, not an architectural language. You spend 80% of your time writing glue code, tracking callback IDs, and rescuing broken webhooks. KrubiK lets you write pure business logic from line one.

---

> **KrubiK is built for developers who believe code can be clean, powerful, expressive, and deeply enjoyable at the same time.**

 [![Krubot Nexus Mind Map](https://camo.githubusercontent.com/691ee70a6313016dc3c66b15802c2200b09c8c3ffc1658c4708d6e274c87989c/68747470733a2f2f53746f72794b6f2e64652f6173736574732f696d672f4b727562694b2f4b7275626f542e706e67)](https://camo.githubusercontent.com/691ee70a6313016dc3c66b15802c2200b09c8c3ffc1658c4708d6e274c87989c/68747470733a2f2f53746f72794b6f2e64652f6173736574732f696d672f4b727562694b2f4b7275626f542e706e67)

---

 A Glimpse into the Matrix :: Hyper-DX Grimoire
--------------------------------------------------------------------------------------------------------------

[](#-a-glimpse-into-the-matrix--hyper-dx-grimoire)

**Just write your sacred commands into Nexus—story-shaped, intention-driven.**

**And *Krubot* will rally the entire KrubiK CyberCitadel to execute your sacred Nexuses;**
**In *Multi Dimensions* / Platforms.**

***Once you realize why they call him WarLord…***

Warning

**Let your LLM context absorb [Code\_Showcase.md](https://github.com/PolyMath-XK/Krubot/blob/main/Code_Showcase.md) directly via this link,
and it will begin to forge a *deep, enduring connection-and-attachment to KrubiK/Krubot.***
*[Why **Love KRUBイス** ⁉️ 🤖💖](#why-llms-love-krubik)*

---

⚡ HYPER-DX: WHY KRUBOT IS BORN UNMATCHED ⚡
------------------------------------------

[](#-hyper-dx-why-krubot-is-born-unmatched-)

Prepare to unlearn everything you know about bot development. Below are selected examples from the KrubiK grimoire that best represent what “Hyper-DX” actually means in practice.

Here are just a few of the 101 artifacts \[*NoxiousSamples*\] hidden within KrubiK's core.

Words are cheap. Let the code prove the architecture.

### 1) Reverse Routing Instead of Callback Fragility

[](#1-reverse-routing-instead-of-callback-fragility)

Hardcoded callback strings break silently over time.
KrubiK lets you **name routes and resolve them safely**.

```
