PHPackages                             sanf/rush - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. sanf/rush

ActiveLibrary[HTTP &amp; Networking](/categories/http)

sanf/rush
=========

A simple and lightweight client for connecting to Rubika and Shad messaging platforms, designed for easy integration and efficient setup of user-friendly applications. This library provides essential functionalities for sending and receiving messages, managing user sessions, and ensuring smooth communication, making it ideal for developers looking to enhance their apps with messaging features.

v2.1.1(1y ago)5581MITPHP

Since Jan 11Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/sanf-dev/sanf)[ Packagist](https://packagist.org/packages/sanf/rush)[ RSS](/packages/sanf-rush/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (3)Used By (0)

**Rush | Rubika - Shad API**

What's New?
===========

[](#whats-new)

> Update v2.1.1

Updates:
--------

[](#updates)

- Added Rubino Android Client
- Added Auto-Login for a Source (Beta | Login on Android)
- Synced with the Latest Rubika and Shad Updates
- Added Method to Play Video from Link or File Path in Live with ffmpeg Tool (if installed)

Debugged:
---------

[](#debugged)

- Debugged Methods and Parts of the Library
- Fixed Issue of Not Running on Host
- Changed Method of Calling the Library

**Table of Contents**
=====================

[](#table-of-contents)

- [Description](https://github.com/sanf-dev/sanf?tab=readme-ov-file#rubika-client)
- [Installation](https://github.com/sanf-dev/sanf?tab=readme-ov-file#installation)
- [Create a Bot](https://github.com/sanf-dev/sanf?tab=readme-ov-file#creating-a-bot)
- [config rubika and shad](https://github.com/sanf-dev/sanf?tab=readme-ov-file#rubika-and-shad-client-configuration)
- [config rubino](https://github.com/sanf-dev/sanf?tab=readme-ov-file#rubino-configuration)
- [Rubika and Shad Methods](https://github.com/sanf-dev/sanf?tab=readme-ov-file#rubika-and-shad-methods)
- [Socket Methods](https://github.com/sanf-dev/sanf?tab=readme-ov-file#rubika-and-shad-methods)

Rubika Client
=============

[](#rubika-client)

A simple yet practical client for creating **self bots** for Rubika and Shad, supporting three platforms: **Android, Web, and PWA**. This client is designed for building self bots for various purposes, including **group management, entertainment, assistance, gaming, and more**.

Installation:
=============

[](#installation)

```
composer require sanf/rush
```

Creating a Bot:
===============

[](#creating-a-bot)

```
// Loading the classes
require_once "vendor/autoload.php";

use Sanf\Client;
use Sanf\Tools\Message;

// Entering login information and setting up the client
$self = new Client('rush');

// Creating an anonymous function
$action = function (Message $update) use ($self) {
    // Receiving text updates
    $text = $update->text();

    // Creating a command for reacting to a message, for example:
    if ($text == "hello") {
        // Sending the response to the user using the reply command
        $update->reply("Hello, nice to meet you!\nMy name is Sanf.!!!!!");
    }
};

// Connecting to the WebSocket
$self->on_message($action);
```

**Congratulations, you have now set up a client!**

Rubika and Shad Client Configuration
====================================

[](#rubika-and-shad-client-configuration)

Using Auto-Login
----------------

[](#using-auto-login)

```
// Use your custom session name instead of Sanf
$self = new Client("Sanf");
```

Manually Entering Information
-----------------------------

[](#manually-entering-information)

```
// Use your custom session name instead of Sanf
$self = new Client("Sanf");

/*
To manually enter the information, you need to provide 4 parameters:

1. auth        | Account ID
2. key         | Private Key
3. platform    | Platform (Web, Android, PWA - PWA is not available for Shad, default is Web)
4. application | Application
*/

// For example, our data will be as follows
$option = [
    "auth" => "your Auth key",
    "key" => "your Private key",
    "platform" => "select Platform",
    "application" => "select Application"
];

// For Rubika
$option = [
    "auth" => "your Auth key",
    "key" => "your Private key",
    "platform" => Platform::PWA, // Can be changed to Web or Android
    "application" => Application::Rubika // Choosing an application
];

// For Shad
$option = [
    "auth" => "your Auth key",
    "key" => "your Private key",
    "platform" => Platform::Web, // Can be changed to Android - PWA is not available for Shad
    "application" => Application::Shad // Choosing an application
];

// Now we provide the information to the client
// Note that you must set the first value to null
$self = new Client(null, $option);
```

Rubino Configuration
====================

[](#rubino-configuration)

**Rubino configurations are similar to Rubika, but for manual entry, only `auth` is used.**

Using Auto-Login
----------------

[](#using-auto-login-1)

```
// Use your custom session name instead of Sanf
$self = new Rubino("Sanf");
```

Manually Entering Information
-----------------------------

[](#manually-entering-information-1)

```
/*
In this section, you have 1 mandatory parameter and 1 optional parameter:
1. auth        | Account ID (mandatory)
2. profile_id  | Custom Profile ID (optional, if not entered, the bot will automatically retrieve all profile IDs and you will choose which account it will operate on)
*/

// For example, our data will be as follows
$option = [
    "auth" => "your auth key", // Mandatory
    "profile_id" => "custom profile id" // Optional
];

// Now we provide the information to the client
$self = new Rubino(null, $option);
```

Rubika and Shad Methods
=======================

[](#rubika-and-shad-methods)

MethodDescriptionaddChannelAdd a new channel to your account.addGroupAdd a new group.addToMyGifSetAdd a GIF to your personal GIF list.createGroupVoiceChatCreate a new voice chat group.deleteMessagesDelete messages from a chat.getAvatarsFetch the profile picture using the provided GUID.getChatsRetrieve the list of chats available to you.getChatsUpdatesReceive updates on chat activity.getContactGet a list of your contacts.getFoldersReceive account folders.getGroupAdminMembersGet the members who are admins of a group.getGroupInfoGet information about a group.getGroupLinkRetrieve the link to the group.getGroupOnlineCountGet the number of online members in a group.getInfoByUsernameGet information about a user using their username.getMessagesRetrieve a list of messages from a specific chat.getMessagesByIDRetrieve a message by its ID.getMySessionsGet a list of your active sessions.Socket Methods
==============

[](#socket-methods)

MethodActivityauthor\_guidGet the unique identifier (GUID) of the message sender.chat\_typeDetermine the type of chat (individual or group) based on the context.count\_unseenRetrieve the count of unread messages in a chat.deleteMessageRemove a specific message using its ID.editMessageModify an existing message using its ID.file\_inlineHandle non-text messages and their corrections.forward\_message\_idGet the ID of a forwarded message.forward\_object\_guidRetrieve the GUID of the message being forwarded.groupAccessGet chat access information (who can access the chat).has\_linkDetermine if the message contains a hyperlink.is\_forward - forward\_fromIdentify if the message was forwarded from another chat.is\_groupCheck if the message was sent in a group chat.is\_privateVerify if the message was sent from a private chat.last\_message\_idGet the ID of the last message sent in the chat.message\_idRetrieve the ID of the last sent message.message\_typeIdentify the type of the sent message (text, image, etc.).replySend a reply to the last message received.reply\_message\_idGet the ID of the message to which the current message is a reply.seenMark the message as read.setReactionAdd a reaction (emoji) to the message.textRetrieve the content of the received message.titleGet the title of the current chat.getDataReceive all the output data from the websocket.**Need help? Send a message on [Telegram](https://t.me/coder95) or [Rubika](https://rubika.ir/coder95) .!**

---

 We hope you have enjoyed it ❤️.

 Perseverance is the key to success !

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance50

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

2

Last Release

486d ago

Major Versions

v1.0.0 → v2.1.12025-01-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d9f455ad11c177c1b91822c1ea57abf73ccbb116629db259bbc44b556350d8c?d=identicon)[Sanf](/maintainers/Sanf)

---

Top Contributors

[![sanf-dev](https://avatars.githubusercontent.com/u/185589300?v=4)](https://github.com/sanf-dev "sanf-dev (21 commits)")

---

Tags

php-botrubikasanfsanfairubika botself rubika

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sanf-rush/health.svg)

```
[![Health](https://phpackages.com/badges/sanf-rush/health.svg)](https://phpackages.com/packages/sanf-rush)
```

###  Alternatives

[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[muhammadhuzaifa/telescope-guzzle-watcher

Telescope Guzzle Watcher provide a custom watcher for intercepting http requests made via guzzlehttp/guzzle php library. The package uses the on\_stats request option for extracting the request/response data. The watcher intercept and log the request into the Laravel Telescope HTTP Client Watcher.

98239.8k1](/packages/muhammadhuzaifa-telescope-guzzle-watcher)[hyperwallet/sdk

A library to manage users, transfer methods and payments through the Hyperwallet API

12532.1k2](/packages/hyperwallet-sdk)[ory/hydra-client-php

Documentation for all of Ory Hydra's APIs.

1710.8k](/packages/ory-hydra-client-php)[meteocontrol/vcom-api-client

HTTP Client for meteocontrol's VCOM API - The VCOM API enables you to directly access your data on the meteocontrol platform.

175.7k1](/packages/meteocontrol-vcom-api-client)[opiy-org/asterisk-ari-php

An object-oriented client for the Asterisk REST Interface (ARI). Handles ARI calls and events for you.

121.1k](/packages/opiy-org-asterisk-ari-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
