官方包 · 框架
在 Laravel Pulse 面板上查看 Hibira 用量
一张 Pulse 卡片,把连接数、消息数和发送数据量与套餐上限并列显示,附上跟随 Pulse 时段切换的走势图,以及此刻最活跃的频道。
hibira-io/pulsePackagist ↗GitHub ↗
最快的方式:装好 Hibira 插件,粘贴一段提示词
在你的 AI 编程助手装好插件,再粘贴提示词。助手会帮你登录、需要时创建免费应用、写好代码并发送测试事件。 GitHub ↗
安装插件
claude plugin marketplace add hibira-io/agent-plugin claude plugin install hibira@hibira粘贴这段提示词
Add Hibira Laravel Pulse (hibira-io/pulse) to this project. Follow https://hibira.io/guides/pulse, adapted to how this project is already set up. If I have no Hibira app yet, create a Free one that allows http://localhost so I can test right away. Keep the app key and secret in environment variables, add placeholders to .env.example, and never commit real values or send the secret to a browser. When you are done, send a test event, show me it arriving, and list the files you changed.
- 当前连接数和时段内峰值对照套餐上限,今日消息数对照每日上限,让你比用户更早发现快到上限。
- 按订阅人数排序的最活跃频道,用 app 的 key 和 secret 从 Channels HTTP API 读取。
- 不会写入 Pulse 的数据表:每次数值都从 Hibira 获取,并缓存 60 秒。

登录后,示例代码会自动填入您的集群主机。 登录
安装
composer require hibira-io/pulse配置
# A personal API token with read access, from https://hibira.io/portal/api-tokens HIBIRA_API_TOKEN=hkb_pat_... HIBIRA_APP_ID=YOUR_APP_ID # Optional: the key and secret turn on the channel list HIBIRA_APP_KEY=YOUR_APP_KEY HIBIRA_APP_SECRET=YOUR_APP_SECRET使用
{{-- resources/views/vendor/pulse/dashboard.blade.php --}} <x-pulse> <livewire:hibira.usage cols="6" rows="2" /> ... </x-pulse>
开始之前
- 请把 API token 限定在这个 app,并只给读取权限:卡片不会修改任何东西。
- 如果你的 app 还没有 Pulse 面板的 view,请先运行 php artisan vendor:publish --tag=pulse-dashboard。
请使用控制台中应用的 Key;Secret 只放在你的服务器上。频道、事件与授权端点的用法与 Pusher 完全相同。 免费创建账号 →