{"id":19870226,"url":"https://github.com/alphaolomi/sarufi-php","last_synced_at":"2026-03-09T02:32:20.457Z","repository":{"id":62237154,"uuid":"558313361","full_name":"alphaolomi/sarufi-php","owner":"alphaolomi","description":"Sarufi AI for PHP","archived":false,"fork":false,"pushed_at":"2024-04-29T14:03:01.000Z","size":30,"stargazers_count":9,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-25T18:00:23.704Z","etag":null,"topics":["php","sarufi-php","sarufi-sdk"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alphaolomi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"patreon":"alphaolomi"}},"created_at":"2022-10-27T09:51:58.000Z","updated_at":"2024-09-19T09:50:14.000Z","dependencies_parsed_at":"2024-04-29T15:27:39.530Z","dependency_job_id":"62125673-656e-4756-ac35-4f9d0947128b","html_url":"https://github.com/alphaolomi/sarufi-php","commit_stats":{"total_commits":11,"total_committers":4,"mean_commits":2.75,"dds":0.6363636363636364,"last_synced_commit":"d5f16c9ff7a53e9fa660ef643ef5f4a15c1de10b"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/alphaolomi/sarufi-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphaolomi%2Fsarufi-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphaolomi%2Fsarufi-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphaolomi%2Fsarufi-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphaolomi%2Fsarufi-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alphaolomi","download_url":"https://codeload.github.com/alphaolomi/sarufi-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphaolomi%2Fsarufi-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30280856,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:23:26.802Z","status":"ssl_error","status_checked_at":"2026-03-09T02:22:46.175Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","sarufi-php","sarufi-sdk"],"created_at":"2024-11-12T16:08:22.059Z","updated_at":"2026-03-09T02:32:20.438Z","avatar_url":"https://github.com/alphaolomi.png","language":"PHP","funding_links":["https://patreon.com/alphaolomi"],"categories":[],"sub_categories":[],"readme":"# Sarufi for PHP\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/alphaolomi/sarufi-php.svg?style=flat-square)](https://packagist.org/packages/alphaolomi/sarufi-php)\n[![Tests](https://github.com/alphaolomi/sarufi-php/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/alphaolomi/sarufi-php/actions/workflows/run-tests.yml)\n[![Total Downloads](https://img.shields.io/packagist/dt/alphaolomi/sarufi-php.svg?style=flat-square)](https://packagist.org/packages/alphaolomi/sarufi-php)\n\n\n## Installation\n\nYou can install the package via Composer:\n\n```bash\ncomposer require alphaolomi/sarufi-php\n```\n\n## Usage\n\n```php\nuse Alphaolomi\\Sarufi\\Sarufi;\n\n$sarufi = new Sarufi('your_token');\n\n// Create an Empty bot\n$bot1 = $sarufi-\u003ecreateBot([\n    \"name\" =\u003e \"YOUR AWESOME BOT NAME\",\n    \"description\" =\u003e \"PUT DESCRIPTION HERE\",\n    \"industry\" =\u003e \"YOUR BOT INDUSTRY\",\n    \"intents\" =\u003e [],\n    \"flows\" =\u003e [],\n]);\nprint_r($bot1);\n\n// OR\n// From files with intent and metadata\n$bot2 = $sarufi-\u003ecreateFromFile(\n    intents: __DIR__ . 'data/intents.yaml',\n    flow:  __DIR__ . 'data/flow.yaml',\n    metadata:  __DIR__ . 'data/metadata.yaml'\n);\n\n\nprint_r($bot2);\n```\n\n##  API available\n\n- `Sarufi(string $token)`\n- `public function createBot(string $name, null|string $description = null, string $industry = \"general\", $flows = [], $intents = [], bool $visibleOnCommunity = false)`\n- `public function createFromFile($metadata = null, $intents = null, $flows = null)`\n- `public function updateBot($id, $name, $industry, $description, $intents, $flows, $visibleOnCommunity)`\n- `public function updateFromFile( $id, $intents, $flows, $metadata)`\n- `public function getBot($id)`\n- `public function chat(int $botId, string $chatId, string $message = \"Hello\", string $messageType = \"text\", string $channel = \"general\")`\n- `public function deleteBot($id)`\n\n## Testing\n\nUses [PestPHP](https://pestphp.com/).\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on recent changes.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on reporting security vulnerabilities.\n\n## Credits\n\n- [Alpha Olomi](https://github.com/alphaolomi)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphaolomi%2Fsarufi-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falphaolomi%2Fsarufi-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphaolomi%2Fsarufi-php/lists"}