PHPackages                             aad/telgraf - 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. aad/telgraf

ActiveProject

aad/telgraf
===========

1202PHP

Since Aug 3Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ademalidurmus/telgraf)[ Packagist](https://packagist.org/packages/aad/telgraf)[ RSS](/packages/aad-telgraf/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Telgraf
-------

[](#telgraf)

Simple live support server with PHP Swoole Websocket and Telegram API.

### Usage

[](#usage)

#### Server Setup

[](#server-setup)

1. Clone repository with following command. ```
    git clone https://github.com/ademalidurmus/telgraf.git

    ```
2. Enter project folder with `cd telgraf` command.
3. Update initial credentials (*BOT\_TOKEN*, *APP\_SECRET* and *APP\_CHAT\_IDS*) from `.env.example` file via any text editor.
4. You can use some makefile commands for configurations. Makefile commands like **make \[COMMAND\]**, for details you can run `make help`.
    1. Use `make env` command for create environment file. > You need update initial credentials from `.env.example` file before using makefile commands. If you were run `make .env` command, you may need update `.env` and `.env.example` files at the same times.
    2. Run `make build` for building telgraf application. This command also run `composer install` for dependency installation and serves the application.
    3. If you are already built app, and you need just serve app you can run `make up`. For restart app server you can run `make restart`, for stop app server you can also run `make stop`.
    4. For access to cli or container bash you can run `make cli`.
    5. `make status` command is shows containers status like `docker ps`. If you want to show telgraf logs you can use `make logs` command.
    6. `make set_webhook` command setting telegram bot webhook using defined environments.
    7. `make delete_webhook` command delete telegram bot webhook using defined environments.
    8. `make clean` command stops telgraf server, delete `.env` file and clear all log files.

#### Telegram Bot Commands

[](#telegram-bot-commands)

- `/start` command is for the starting agent session to accept any client connections.
- `/stop` command is for the stopping agent session.
- `/close` command is for the stopping current client connection. The agent will continue to wait for any connection.
- `/add [CHAT_ID]` command is used to add a new agent to the agent access control list.
- `/remove [CHAT_ID]` command for removing the agent from the agent access control list.

#### API Docs

[](#api-docs)

`wss://{your_webserver_url}`

- `type`: *enum(message|info)*, action type
- `content`: *string*, message text or action details
- `attributes`: *object*, message attributes
    - `attributes.name`: *string*, client name

Sample websocket message history:

```
❌ Disconnected from wss://telgraf.durmus.me
⬇️ {"type":"info","content":"connection unassigned","attributes":[]}
⬆️ {"type":"message","content":"Test Client Message 2","attributes":{"name":"Client 1"}}
⬇️ {"type":"message","content":"Test Message 2","attributes":{"name":"Adem Ali D."}}
⬆️ {"type":"message","content":"Test Client Message 1","attributes":{"name":"Client 1"}}
⬇️ {"type":"message","content":"Test Message 1","attributes":{"name":"Adem Ali D."}}
⬇️ {"type":"info","content":"connection assigned","attributes":[]}
✔️ Connected to wss://telgraf.durmus.me

```

### License

[](#license)

MIT

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity31

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f5fcb264e69a9b32cdff14a58e670e317ce5dafa863dc2ff4eddf5bef08340e?d=identicon)[ademalidurmus](/maintainers/ademalidurmus)

---

Top Contributors

[![ademalidurmus](https://avatars.githubusercontent.com/u/22513266?v=4)](https://github.com/ademalidurmus "ademalidurmus (12 commits)")

### Embed Badge

![Health badge](/badges/aad-telgraf/health.svg)

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

PHPackages © 2026

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