{"id":21466556,"url":"https://github.com/permafrost-dev/ray-cli","last_synced_at":"2025-10-09T13:36:43.056Z","repository":{"id":43065853,"uuid":"328355605","full_name":"permafrost-dev/ray-cli","owner":"permafrost-dev","description":"A command line interface to spatie/ray and the Ray app (https://myray.app).","archived":false,"fork":false,"pushed_at":"2023-11-23T04:11:44.000Z","size":89,"stargazers_count":28,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-09T13:36:40.584Z","etag":null,"topics":["cli","debugging","debugging-tools","phar","ray","ray-cli","spatie"],"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/permafrost-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"permafrost-dev"}},"created_at":"2021-01-10T10:24:06.000Z","updated_at":"2022-07-25T17:52:27.000Z","dependencies_parsed_at":"2024-01-16T14:03:53.517Z","dependency_job_id":"f5ef00f2-4da3-4b1c-b9c5-16ec49ee9690","html_url":"https://github.com/permafrost-dev/ray-cli","commit_stats":{"total_commits":90,"total_committers":3,"mean_commits":30.0,"dds":"0.022222222222222254","last_synced_commit":"f09cae29fed94f536822e1bbe83463408e7dfe53"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/permafrost-dev/ray-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permafrost-dev%2Fray-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permafrost-dev%2Fray-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permafrost-dev%2Fray-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permafrost-dev%2Fray-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/permafrost-dev","download_url":"https://codeload.github.com/permafrost-dev/ray-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permafrost-dev%2Fray-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001491,"owners_count":26083102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cli","debugging","debugging-tools","phar","ray","ray-cli","spatie"],"created_at":"2024-11-23T08:14:37.004Z","updated_at":"2025-10-09T13:36:43.025Z","avatar_url":"https://github.com/permafrost-dev.png","language":"PHP","readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://static.permafrost.dev/images/ray-cli/ray-cli-logo-01.png\" alt=\"Permafrost Dev\" height=\"100\" style=\"block\"\u003e\n\u003cbr\u003e\u003cbr\u003e\n  \u003ccode style=\"font-size:2.2rem;\"\u003e\u003cstrong\u003eray-cli\u003c/strong\u003e\u003c/code\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://img.shields.io/packagist/v/permafrost-dev/ray-cli\" alt=\"version\"/\u003e  \u003cimg src=\"https://img.shields.io/packagist/l/permafrost-dev/ray-cli\" alt=\"license\"/\u003e \u003cimg src=\"https://img.shields.io/packagist/dt/permafrost-dev/ray-cli?logo=packagist\" alt=\"downloads\"/\u003e \u003cimg src=\"https://img.shields.io/github/workflow/status/permafrost-dev/ray-cli/Run%20Tests/main?logo=github\" alt=\"Run Tests\"/\u003e \u003cimg src=\"https://shields.io/coveralls/github/permafrost-dev/ray-cli\" alt=\"Coverage Status\" /\u003e\n\u003c/p\u003e\n\nThis package provides a command-line interface for interacting with the [Ray](https://myray.app) application by [Spatie](https://github.com/spatie).\n\n---\n\nSupported PHP versions: `7.4`, `8.0`.\n\n## Installation\n\nYou may install the package using composer:\n\n`composer require permafrost-dev/ray-cli --dev`\n\nAlso available is a download for  a `phar` executable from the [releases](https://github.com/permafrost-dev/ray-cli/releases) page.  The primary advantage of using a `phar` is that **you don't need to install the package** into your project.\n\nIf you download  a `phar`, replace _`vendor/bin/ray`_ with the filename of the `phar` in the examples, i.e.:\n\n```bash\nvendor/bin/ray 'test message' --green --large\n```\n\n_would become:_\n\n```bash\nray-1.6.0.phar 'test message' --green --large\n```\n\n_Note: Some users may need to set the phar as executable using `chmod`. Example: `chmod +x ray-1.6.0.phar`_\n\n---\n\n## Usage\n\nSending data to Ray is as simple as calling the `ray` script and providing a single argument, either a string or a filename:\n\n`vendor/bin/ray 'hello world'` \n\nYou can provide a JSON string and Ray will format it for you:\n\n`vendor/bin/ray '{\"message\": \"hello world\"}'`\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://static.permafrost.dev/images/ray-cli/json-decoded.png\" alt=\"Decoded JSON\" height=\"200\" style=\"block\"\u003e\n  \u003c/p\u003e\n\nYou're also able to pass a valid filename instead of a string. The contents of the file will be sent instead, with automatic JSON detection.\n\n```bash\nvendor/bin/ray \"testfile.json\" -c green\nvendor/bin/ray \"readme.txt\"\n```\n\nYou can even pass a valid URL - it will be downloaded and sent to Ray, with automatic JSON detection.\n\n```bash\nvendor/bin/ray \"https://github.com/permafrost-dev/ray-cli\" -c green\nvendor/bin/ray \"https://api.github.com/repos/permafrost-dev/ray-cli\"\n```\n\n---\n\n## Available Options\n\nThe `ray` script offers several flags for sending additional payloads to Ray:\n\n### `--update-check`\n\nArguments: `none`\n\nDefault: `false`\n\nDescription: Checks for an updated version of `ray-cli`.  If specified, all other flags are ignored.\n\nExample:\n\n```bash\nvendor/bin/ray --update-check\n```\n\n### `--exec`\n\nArguments: `none`\n\nDefault: `false`\n\nDescription: Treats the argument as a script or executable, executes it, and sends the output to Ray.  Supported interpreters for scripts are `PHP`, `Python`, and `NodeJS`.  If the file is executable, such as a binary or `.sh` script, it will also be executed.  JSON content is automatically detected.\n\nExample:\n\n```bash\n# refresh the display of app.log every 5 seconds\nvendor/bin/ray --exec \"random.sh\"\nvendor/bin/ray --exec \"random-number.php\"\n```\n\n### `--refresh`\n\nArguments: `integer` or `decimal`\n\nDefault: `none`\n\nDescription: Refreshes the payload display in Ray every N seconds, where N is either a whole number (i.e., `10`) or a decimal (i.e., `7.5`).  If a file is specified, it is re-read every N seconds; if a URL is specified, it is re-retrieved.\n\nExample:\n\n```bash\n# refresh the display of app.log every 5 seconds\nvendor/bin/ray --refresh=5 \"storage/logs/app.log\"\n# ...or refresh every 2.5 seconds\nvendor/bin/ray --refresh=2.5 \"storage/logs/app.log\"\n```\n\n### `--color` or `-c`\n\nArguments: `string`\n\nDefault: `none`\n\nDescription: sends a \"color\" payload along with the data.\n\nExample:\n\n```bash\nvendor/bin/ray -c red \"hello world\"\n```\n\n### `--large` or `--lg`\n\nArguments: `none`\n\nDefault: `false`\n\nDescription: sends the payload as large-sized text.\n\nExample:\n\n```bash\nvendor/bin/ray --large \"hello world\"\nvendor/bin/ray --lg \"hello world\"\n```\n\n### `--small`or `--sm`\n\nArguments: `none`\n\nDefault: `false`\n\nDescription: sends the payload as small-sized text.\n\nExample:\n\n```bash\nvendor/bin/ray --small \"hello world\"\nvendor/bin/ray --sm \"hello world\"\n```\n\n### `--size` or `-S`\n\nArguments: `string`\n\nDefault: `normal`\n\nPossible Values: `large`, `lg`, `small`, `sm`, `normal`\n\nDescription: sends a payload with the specified text size.  See `--large` and `--small`.  _Note that while included for completeness, specifying `normal` is not necessary as it is the default text size._\n\nExample:\n\n```bash\nvendor/bin/ray -S sm \"hello world\"\nvendor/bin/ray -S large \"hello world\"\nvendor/bin/ray --size=normal \"hello world\"\n```\n\n### `--label` or `-L`\n\nArguments: `string`\n\nDefault: `none`\n\nDescription: sends a \"label\" payload along with the data.  Only works when sending plain _(non-JSON and non-delimited)_ strings.\n\nExample:\n\n```bash\nvendor/bin/ray -L \"my label\" \"hello world\"\n```\n\n### `--notify` or `-N`\n\nArguments: `none`\n\nDefault: `false`\n\nDescription: sends a \"notification\" payload, causing Ray to display an OS notification instead of logging the data in its window.\n\nExample:\n\n```bash\nvendor/bin/ray -N \"hello from ray-cli\"\n```\n\n### `--csv`\n\nArguments: `none`\n\nDefault: `false`\n\nDescription: causes the payload data to be treated as a comma-separated list of values, and will `explode()` the data and send the resulting array of values instead.\n\nExample:\n\n```bash\nvendor/bin/ray --csv \"one,two,three\"\n```\n\n### `--delimiter` or `-D`\n\nArguments: `string`\n\nDefault: `none`\n\nDescription: causes the payload data to be treated as a list of values delimited by the provided delimiter string, and will `explode()` the data and send the resulting array of values instead.\n\nExample:\n\n```bash\nvendor/bin/ray -D '|' \"one|two|three\"\n```\n\n### `--json` or `-j`\n\nArguments: `none`\n\nDefault: `false`\n\nDescription: Forces the payload data to be treated as a JSON string. Note that this flag is unnecessary in most cases because JSON strings are automatically detected.\n\nExample:\n\n```bash\nvendor/bin/ray --json '[\"one\",\"two\",\"three\"]'\n```\n\n### `--stdin`\n\nArguments: `none`\n\nDefault: `false`\n\nDescription: Reads the payload data from the standard input instead of as a command line parameter.  Note that the payload data can be specified as as dash _(`\"-\"`)_ instead of specifying the `--stdin` flag.\n\nExample:\n\n```bash\necho \"hello world\" | vendor/bin/ray --stdin\necho \"hello world\" | vendor/bin/ray -\n```\n\n### `--raw`\n\nArguments: `none`\n\nDefault: `false`\n\nDescription: Forces the payload data be pre-processed and to display the raw, unrendered content.  The data is processed to encode HTML entities, spaces, and converts new lines to `\u003cbr\u003e` tags _(this is done to display HTML source code)_.\n\nExample:\n\n```bash\ncat sample.html | vendor/bin/ray --stdin --raw\nvendor/bin/ray --raw sample.html\n```\n\n### `--screen` or `-s`\n\nArguments: `string`\n\nDefault: `none`\n\nDescription: causes a new screen to be created in Ray, with the argument being the \"name\" of the new screen.  Passing an empty string or a string value of `\"-\"` will cause the screen to be unnamed _(the same effect as calling `ray()-\u003eclearScreen()`)_.  Passing `--screen` or `-s` as the last argument on the command line is the same as providing a screen name of `\"-\"`.\n\nExample:\n\n```bash\n# create a screen named \"debug #1\":\nvendor/bin/ray -s 'debug #1' \"hello world\"\nvendor/bin/ray --screen='debug #1' \"hello world\"\n\n# create a screen with no name:\nvendor/bin/ray -s- \"hello world\"\nvendor/bin/ray --screen=- \"hello world\"\nvendor/bin/ray --screen= \"hello world\"\nvendor/bin/ray \"hello world\" -s\n\n# create a named screen without sending data:\nvendor/bin/ray --screen=\"my screen 2\"\nvendor/bin/ray -s \"my screen 3\"\n```\n\n### `--clear` or `-C`\n\nArguments: `none`\n\nDefault: `none`\n\nExample:\nDescription: causes Ray the clear the screen _(it's really just creating a new screen with no name)_. **If both `--screen` and `--clear` are provided, `--clear` takes precedence.**\n\nExample:\n\n```bash\n# clear the screen and send some data:\nvendor/bin/ray -C \"hello world\"\nvendor/bin/ray --clear \"hello world\"\n\n# clear the screen without sending any data:\nvendor/bin/ray -C\nvendor/bin/ray --clear\n```\n\n### `--clear-all`\n\nArguments: `none`\n\nDefault: `none`\n\nDescription: causes Ray to clear all screens.\n\nExample:\n\n```bash\nvendor/bin/ray --clear-all\n```\n\n### `--image` or `-i`\n\nArguments: `none`\n\nDefault: `none`\n\nDescription: causes the payload to be treated as an image.  The payload must be either a URL or an existing filename.\n\nExample:\n\n```bash\nvendor/bin/ray --image https://static.permafrost.dev/images/ray-cli/ray-cli-logo-01.png\n\nvendor/bin/ray -i my-image-file.png\n```\n\n## `--blue`, `--gray`, `--green`, `--orange`, `--purple`, `--red`\n\nArguments: `none`\n\nDefault: `false`\n\nDescription: causes the payload to be sent with the indicated color.  Alias for  the `--color=N` flag.\n\nExample:\n\n```bash\nvendor/bin/ray --red \"hello world\"\nvendor/bin/ray --orange \"hello world\"\n\n# only the first flag is used when multiple flags are provided.\n# sent as green:\nvendor/bin/ray --green --red --blue \"hello world\"\n```\n\n## `--bg-blue`, `--bg-gray`, `--bg-green`, `--bg-orange`, `--bg-purple`, `--bg-red`\n\nArguments: `none`\n\nDefault: `false`\n\nDescription: causes the payload to be sent with the indicated background color.\n\nExample:\n\n```bash\nvendor/bin/ray --bg-purple --large \"hello world\"\n```\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://static.permafrost.dev/images/ray-cli/with-background-color.png\" alt=\"Purple Background\" height=\"200\" style=\"block\"\u003e\n  \u003c/p\u003e\n\n---\n\n## Examples\n\nSend the contents of a JSON file to Ray with a blue marker:\n\n```bash\ncat my-data.json | vendor/bin/ray --stdin -c blue\nvendor/bin/ray 'my-data.json' --blue\n```\n\nSend the contents of `test.json` with small text, a red marker, and to a new screen named \"my data\": \n\n```php\nvendor/bin/ray --screen='my data' --red --small 'test.json'\n```\n\n---\n\n## Testing\n\nThis package uses PHPUnit for unit tests.  To run the test suite, run:\n\n`./vendor/bin/phpunit`\n\n---\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n---\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n","funding_links":["https://github.com/sponsors/permafrost-dev"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermafrost-dev%2Fray-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpermafrost-dev%2Fray-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermafrost-dev%2Fray-cli/lists"}