{"id":19703489,"url":"https://github.com/orbitale/rymfony","last_synced_at":"2025-04-29T14:30:47.440Z","repository":{"id":39679423,"uuid":"272655989","full_name":"Orbitale/Rymfony","owner":"Orbitale","description":"A command-line tool built in Rust to run an HTTP+PHP server for development (and production? 😉)","archived":false,"fork":false,"pushed_at":"2022-12-23T13:16:04.000Z","size":856,"stargazers_count":153,"open_issues_count":2,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-26T09:14:27.941Z","etag":null,"topics":["caddyserver","cli","hacktoberfest","php","rust","rust-lang","symfony","web-server"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Orbitale.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"pierstoval"}},"created_at":"2020-06-16T08:43:44.000Z","updated_at":"2025-04-23T03:54:48.000Z","dependencies_parsed_at":"2023-01-30T18:30:23.381Z","dependency_job_id":null,"html_url":"https://github.com/Orbitale/Rymfony","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Orbitale%2FRymfony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Orbitale%2FRymfony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Orbitale%2FRymfony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Orbitale%2FRymfony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Orbitale","download_url":"https://codeload.github.com/Orbitale/Rymfony/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251518793,"owners_count":21602211,"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","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":["caddyserver","cli","hacktoberfest","php","rust","rust-lang","symfony","web-server"],"created_at":"2024-11-11T21:18:01.437Z","updated_at":"2025-04-29T14:30:43.830Z","avatar_url":"https://github.com/Orbitale.png","language":"Rust","readme":"[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/Orbitale/Rymfony)\n\nRymfony\n=======\n\nRymfony is a command-line tool to mimic the behavior of the Symfony CLI binary.\n\n## Install\n\nTo install Rymfony, [download your version from the latest release on the Releases page](https://github.com/Orbitale/Rymfony/releases).\n\n### Download latest dev builds\n\nThe binary is built on every push to the `main` branch, if the binary can be built of course, and pushed to [nightly.link](https://nightly.link).\n\nThis allows you to test the latest version right away!\n\nHere are the links to download them:\n\n| [![nightly.ubuntu-latest](https://img.shields.io/badge/Ubuntu%20nightly-download-brightgreen)](https://nightly.link/Orbitale/Rymfony/workflows/CI.yaml/main/rymfony.ubuntu.zip) |\n|:--|\n| [![nightly.windows-latest](https://img.shields.io/badge/Windows%20nightly-download-brightgreen)](https://nightly.link/Orbitale/Rymfony/workflows/CI.yaml/main/rymfony.windows.zip) |\n| [![nightly.macOS-latest](https://img.shields.io/badge/MacOS%20nightly-download-brightgreen)](https://nightly.link/Orbitale/Rymfony/workflows/CI.yaml/main/rymfony.macOS.zip) |\n| [![All nightly releases](https://img.shields.io/badge/All%20releases-download-brightgreen)](https://nightly.link/Orbitale/Rymfony/workflows/CI.yaml/main) |\n\nUnzip the file and put the `rymfony` executable file in your `PATH`, and you're set!\n\nIf you need more architectures and OSes, feel free to check the [CI.yaml](.github/workflows/CI.yaml) Github Action and contribute for more!\n\n#### Download on Linux\n\n```\ncurl -sSL https://nightly.link/Orbitale/Rymfony/workflows/CI.yaml/main/rymfony.ubuntu.zip -o rymfony.zip \u0026\u0026 unzip rymfony.zip \u0026\u0026 sudo mv rymfony /usr/bin/rymfony \u0026\u0026 sudo chmod a+x /usr/bin/rymfony \u0026\u0026 rm rymfony.zip\n```\n\n#### Download on Windows\n\nWith `cmd` (`powershell` must be accessible):\n```\npowershell Invoke-WebRequest https://nightly.link/Orbitale/Rymfony/workflows/CI.yaml/main/rymfony.windows.zip -OutFile rymfony.zip \u0026\u0026 powershell Expand-Archive -Force rymfony.zip . \u0026\u0026 rm rymfony.zip\n```\n\nWith Powershell directly:\n```\nInvoke-WebRequest https://nightly.link/Orbitale/Rymfony/workflows/CI.yaml/main/rymfony.windows.zip -OutFile rymfony.zip \u0026\u0026 Expand-Archive -Force rymfony.zip . \u0026\u0026 rm rymfony.zip\n```\n\nThen, add the `rymfony.exe` executable somewhere in your PATH.\n\n#### Download on MacOS\n\n```\ncurl -sSL https://nightly.link/Orbitale/Rymfony/workflows/CI.yaml/main/rymfony.macOS.zip -o rymfony.zip \u0026\u0026 unzip rymfony.zip \u0026\u0026 sudo mv rymfony /usr/local/bin/rymfony \u0026\u0026 sudo chmod a+x /usr/local/bin/rymfony \u0026\u0026 rm rymfony.zip\n```\n\n### Manual build\n\n* First, install Rust following the [Official guide](https://www.rust-lang.org/tools/install).\n* Clone the repository on your machine with this command:\u003cbr\u003e\n  `git clone git@github.com:Orbitale/Rymfony.git`.\n* Then, run `cargo build --release`.\n* Done!\u003cbr\u003e\n  The binary will be stored in `./target/release/rymfony` (with `.exe` extension on Windows), you can use it directly!\n\n## Usage\n\nRun `rymfony help` to see the list of available commands:\n\n```\n$ rymfony\nrymfony 0.1.0-dev\nAlex Rock \u003calex@orbitale.io\u003e\n\nA command-line tool to spawn a PHP server behind an HTTP FastCGI proxy,\ninspired by Symfony CLI, but open-source.\n\nhttps://github.com/Orbitale/Rymfony\n\nUSAGE:\n    rymfony [FLAGS] [SUBCOMMAND]\n\nFLAGS:\n    -h, --help       Prints help information\n    -q, --quiet      Do not display any output. Has precedence over -v|--verbose\n    -V, --version    Prints version information\n    -v, --verbose    Set the verbosity level. -v for debug, -vv for trace, -vvv to trace executed modules\n\nSUBCOMMANDS:\n    help                   Prints this message or the help of the given subcommand(s)\n    new:symfony            Create a new Symfony project\n    php:list               List all available PHP executables.\n    server:ca:install      Create and install a local Certificate Authority for serving HTTPS\n    server:ca:uninstall    Uninstall the local Certificate Authority\n    server:start           Runs an HTTP server\n    stop                   Stops a potentially running HTTP server\n```\n\n**Note:** For any command, you can use the `-h|--help` flag to display its details too. If you are familiar with the Symfony console component it is very much similar.\n\n## Commands\n\n### `rymfony serve` (or `server:start`)\n\nThis command allows you to run a web server, in foreground or background, and you can customize the port to listen to.\n\n```\n$ rymfony serve --help\nrymfony-server:start\nRuns an HTTP server\n\nUSAGE:\n    rymfony server:start [FLAGS] [OPTIONS]\n\nFLAGS:\n        --allow-http              Do not redirect HTTP request to HTTPS\n    -d, --daemon                  Run the server in the background\n    -s, --expose-server-header    Add server header into all response\n    -h, --help                    Prints help information\n        --no-tls                  Disable TLS. Use HTTP only.\n    -V, --version                 Prints version information\n\nOPTIONS:\n        --document-root \u003cdocument-root\u003e    Project's document root\n        --passthru \u003cpassthru\u003e              The PHP script all requests will be passed to\n        --port \u003cport\u003e                      The TCP port to listen to [default: 8000]\n```\n\n### `rymfony stop`\n\nIf a server is running in the background running for the current project, it will be stopped.\n\nNote that this is checked via a `.pid` file, containing the PID of the running server.\n\n### `rymfony php:list`\n\nThis will list all existing `php` binaries in your environment.\n\nIt will actually search in the `PATH` directories for any binary that matches some patterns like these:\n\n* On Windows:\n  * `php.exe`\n  * `phpX.Y.exe`\n  * `php-cgi.exe`\n  * `phpX.Y-cgi.exe`\n  * `php-cgiX.Y.exe`\n* On other platforms:\n  * `php`\n  * `phpX.Y`\n  * `php-fpm`\n  * `php-cgi`\n  * `phpX.Y-fpm`\n  * `phpX.Y-cgi`\n  * `php-fpmX.Y`\n  * `php-cgiX.Y`\n\nMore locations for standard PHP installations that are searched can be found in [binaries.rs](src/php/binaries.rs).\n\n\u003e ℹNote: if your PHP binary is not detected, please **open an issue** so we can add support for it!\n\nHere is the output from an Ubuntu 20.04 machine:\n\n```\n$ rymfony php:list\n┌─────────┬─────────────────┬──────────────────────┬─────────┬────────┐\n| Version | PHP CLI         | PHP FPM              | PHP CGI | System |\n├─────────┼─────────────────┼──────────────────────┼─────────┼────────┤\n| 7.4.11  | /usr/bin/php7.4 | /usr/sbin/php-fpm7.4 |         | *      |\n└─────────┴─────────────────┴──────────────────────┴─────────┴────────┘\n```\n\nWindows 10:\n\n```\n\u003e rymfony php:list\n┌─────────┬──────────────────────┬─────────┬──────────────────────────┬────────┐\n| Version | PHP CLI              | PHP FPM | PHP CGI                  | System |\n├─────────┼──────────────────────┼─────────┼──────────────────────────┼────────┤\n| 7.4.2   | E:\\dev\\php74\\php.exe |         | E:\\dev\\php74\\php-cgi.exe | *      |\n└─────────┴──────────────────────┴─────────┴──────────────────────────┴────────┘\n```\n\nmacOS Catalina (using Homebrew): \n\n```\n$ rymfony php:list\n┌─────────┬───────────────────────────────────────────────┬──────────────────────────────────────────┬───────────────────────────────────────────────────┬────────┐\n| Version | PHP CLI                                       | PHP FPM                                  | PHP CGI                                           | System |\n├─────────┼───────────────────────────────────────────────┼──────────────────────────────────────────┼───────────────────────────────────────────────────┼────────┤\n| 5.5.5   | /usr/local/php5-5.5.5-20131020-222726/bin/php |                                          | /usr/local/php5-5.5.5-20131020-222726/bin/php-cgi |        |\n| 7.3.11  | /usr/bin/php                                  | /usr/sbin/php-fpm                        |                                                   |        |\n| 7.3.21  | /usr/local/Cellar/php@7.3/7.3.21/bin/php      |                                          | /usr/local/Cellar/php@7.3/7.3.21/bin/php-cgi      |        |\n| 7.4.9   | /usr/local/Cellar/php/7.4.9/bin/php           | /usr/local/Cellar/php/7.4.9/sbin/php-fpm | /usr/local/Cellar/php/7.4.9/bin/php-cgi           | *      |\n└─────────┴───────────────────────────────────────────────┴──────────────────────────────────────────┴───────────────────────────────────────────────────┴────────┘\n```\n\n*ℹ Note:* To search for PHP executables in a custom folder, you can define the `RYMFONY_PATH` environment variable.\n\nOn *nix systems, you must use the colon `:` path separator.\u003cbr\u003e\nOn Windows systeme use the semi-colon `;` path separator.\n\n```\n# *nix\n$ export RYMFONY_PATH=/home/php/php-dev:/var/local/php-dev\n\n# Windows\n\u003e set RYMFONY_PATH=c:\\php7.4;d:\\php8.0;d:\\php7.3\n```\n\n## Roadmap\n\n**If you want to contribute to any of these points, feel free to do it!**\n\n- 🟩 : Done\n- 🟨 : In progress (a PR should be linked)\n- 🟥 : Planned, but not started yet\n\nTo do (order of priority, done first):\n\n- Commands and command-line options\n    - 🟩 Add a `stop` command.\n    - 🟥 Create `open:local` command.\n    - 🟩 Create `server:logs` command (needs #81 first).\n    - 🟥 Create `server:list` command.\n    - 🟥 Create `server:status` command.\n    - 🟥 Create `config` command, to display project's config, and maybe change it.\n    - 🟥 Create `php` command (should use the configured PHP version).\n    - 🟥 Create `console` command for Symfony (should use the configured PHP version, and be compatible with SF 2+).\n    - 🟥 Create `artisan` command for Laravel (should use the configured PHP version).\n    - 🟥 Propagate global app arguments so they can be used in subcommands (like `rymfony serve -v`, because if you want verbosity today, you need to pass the option before the subcommand, like this: `rymfony -v serve`). Maybe this can be in the `clap` crate itself (the CLI app package used by Rymfony).\n- Releases\n    - 🟩 Publish nightly builds of the binary as artifacts by using Github Actions.\n    - 🟩 Add support for verbosity levels in output logging, like `-v`, `-vv`, `-vvv` and `-q`.\n    - 🟩 Add version hash to nightly builds.\n    - 🟩 Publish releases of the binary as artifacts by using Github Actions. For now, only \"nightly\" builds are released.\n- HTTP server\n    - 🟩 Make sure we can run a web server using Hyper and Tokio.\n    - 🟩 Put the web-server execution in a separate `serve.rs` file.\n    - 🟩 Execute the server in the background.\n    - 🟩 Make sure the web server's IP and port can be customized through a `--listen ip:port` option. \n    - 🟩 Once a \"way to start PHP\" is found (either via CGI on Windows, FPM on Linux, or PHP's native server for other cases), make sure we can start a background PHP process.\n    - 🟩 Transform the standard web server into an HTTP proxy to PHP using a FastCGI client\n    - 🟩 #81 Tail logs to a file when server is run in the background\n    - 🟥 Make sure the server process is **totally** detached from the terminal in Windows. There are some issues about this, and it needs more investigation. Check [this blog post section](https://www.orbitale.io/2020/06/25/being-a-php-developer-on-windows-10-cool-snippets.html#3-symfony-binary-the-http-server) for more information.\n    - 🟥 Make sure that Caddy server has the proper capabilities to run with port 80 at runtime instead of installation-time (to make sure the port can be used as a flag to whether this `setcap` feature must be used or not).\u003cbr\u003eCheck the `set_http_capabilities()` function in the `caddy.rs` file for more details.\n    - 🟥 When the server is stopped (via Ctrl+C or via a panic), make sure PHP is stopped too.\n        - Note: on Windows, it seems that the `ctrlc` package does not work, something must be done on this!\n    - 🟥 Allow listing running servers globally, without necessarily using a `.pid` file.\n    - 🟥 Allow stopping a server globally, without necessarily using a `.pid` file.\n    - 🟩 (note: handled by Caddy) Find a way to force the entire request-response workflow to be streamed instead of buffered (will make better performances and memory usage)\n- PHP server\n    - 🟩 Create a tool to discover the `php` binary if none of the two above are detected.\n    - 🟩 Create a tool to discover the `php-fpm` binary if on Linux.\n    - 🟩 Create a tool to discover the `php-cgi` binary (I'm developing on Windows and it is therefore easier).\n    - 🟥 Properly search for PHP binaries in the current machine\n        - 🟩 When searching for PHP binaries, be able to flag their type (native, cgi, fpm) and their version. \n        - 🟩 Implement a way to retrieve the current PHP version based on the \"System\" PHP script\n        - 🟥 Search for PHP binaries elsewhere than in `PATH`, such as with Homebrew or phpenv. This will need many checks about the \"standard locations\" where PHP can be found.\n            - 🟩 Search in `/usr/bin` for most Ubuntu defaults\n            - 🟩 Search in `/usr/local/Cellar` for most Homebrew defaults on Mac\n            - 🟥💡 Please [suggest](https://github.com/Pierstoval/rymfony/issues/new) more places where PHP could be present!\n        - 🟩 Flag the current path-based `php` script to check its version and mark it as \"System\" (just like in Symfony CLI)\n        - 🟩 Store a list of all PHP binaries in `~/.rymfony/php_versions.json`\n        - 🟩 Deserialize the `php-versions.json` config file if it exists when using `binaries::all()` or `binaries::current()` to make the command faster\n        - 🟩 Add an option to the `php:list` command such as `--refresh` that will make another lookup and save the `~/.rymfony/php-versions.json` file again 😄\n        - 🟩 Implement a way to retrieve the current PHP version based on a local `.php-version` file\n    - 🟥 Allow passing environment variables to PHP via an `-e|--env` option.\n    - 🟥 Allow passing a custom option to specify which method the user wants to use to start PHP (like `--use-fpm` or `--use-native`, something like that).\n    - 🟥 (utopia) Support setups that have multiple PHP versions installed (such as on Ubuntu/Debian with deb-sury's repo, or with Homebrew on OSX), and allow customizing the version.\n    - PHP Server\n        - 🟩 Don't rewrite the `fpm-conf.ini` configuration file each time a server is launched.\n        - 🟩 Find a way to differenciate servers configurations, in case multiple servers are started: Done by creating a specific PHP-FPM configuration for each project 🙂\n- Going way further\n    - 🟥 (utopia) Detect whether the project uses Docker Compose\n    - 🟥 (utopia) Be able to dynamically create environment variables for some common use-cases (database, redis, rabbitmq, mailcatcher).\n","funding_links":["https://github.com/sponsors/pierstoval"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbitale%2Frymfony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forbitale%2Frymfony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbitale%2Frymfony/lists"}