{"id":13566573,"url":"https://github.com/anystack-sh/porter","last_synced_at":"2025-05-15T01:08:39.558Z","repository":{"id":65126612,"uuid":"582139428","full_name":"anystack-sh/porter","owner":"anystack-sh","description":"Spin up your development background processes with ease 🪄","archived":false,"fork":false,"pushed_at":"2024-10-21T06:59:18.000Z","size":35297,"stargazers_count":534,"open_issues_count":8,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-14T13:20:06.852Z","etag":null,"topics":["background-service","development-tools","development-workflow","laravel","laravel-package","php","productivity","supervisor"],"latest_commit_sha":null,"homepage":"https://anystack.sh/tools/porter","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anystack-sh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-12-25T20:57:08.000Z","updated_at":"2025-04-24T14:08:14.000Z","dependencies_parsed_at":"2024-01-15T18:47:05.148Z","dependency_job_id":"ebc6cd4a-88f4-4a94-ac59-e4cb72386e45","html_url":"https://github.com/anystack-sh/porter","commit_stats":{"total_commits":24,"total_committers":6,"mean_commits":4.0,"dds":"0.33333333333333337","last_synced_commit":"19a06d93969634bf7a2e3b8a077b0ba8f4730e7b"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anystack-sh%2Fporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anystack-sh%2Fporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anystack-sh%2Fporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anystack-sh%2Fporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anystack-sh","download_url":"https://codeload.github.com/anystack-sh/porter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254159113,"owners_count":22024546,"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":["background-service","development-tools","development-workflow","laravel","laravel-package","php","productivity","supervisor"],"created_at":"2024-08-01T13:02:12.308Z","updated_at":"2025-05-15T01:08:34.518Z","avatar_url":"https://github.com/anystack-sh.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://packagist.org/packages/anystack-sh/porter\"\u003e\u003cimg src=\"https://img.shields.io/packagist/dt/anystack-sh/porter\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/anystack-sh/porter\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/anystack-sh/porter\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/anystack-sh/porter\"\u003e\u003cimg src=\"https://img.shields.io/packagist/l/anystack-sh/porter\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## About Porter\n\nPorter is a command-line interface (CLI) tool that makes it easy to run background services by adding a few lines to a configuration file.\nThese services are managed by Supervisord, a process control system that ensures that all processes are kept up and running. \nWith Porter, you don't have to manually start and manage background services in multiple terminal tabs. \nInstead, you can simply use the `porter` command to manage all of your services in a single place.\n\n### Installation\n\nTo install Porter, you can use `composer` or download the build manually from this repository.\n\n```shell\ncomposer global require anystack-sh/porter\n```\n\n#### Requirements\nTo use Porter you must install `supervisord`:\n- macOS: `brew install supervisor`\n- Linux: `apt install supervisor`\n\nIf you want to use the watch feature to restart services when files change you will also need to install:\n- chokidar: `npm install --global chokidar`\n\n### Add your first project\nIn your terminal navigate to your project and run `porter init` to create a boilerplate `porter.yml`:\n\n```shell\n~/Developer/anystack: $ porter init\n\n Create porter.yml in /Users/Developer/anystack? (yes/no) [yes]:\n \u003e yes\n\nCreating porter.yml boilerplate: ✔\nRun \"porter add\" to add your product and start your services.\n```\n\nModify `porter.yml` and add the services you want to run. In your terminal navigate to your project and run `porter add`:\n\n```shell\n~/Developer/anystack: $ porter add\n\nAdding /Users/Developer/anystack: ✔\nRestarting Porter: ✔\n```\n\nA new `porter.yml` has been created. This file contains all the services you want to run in the background, for example:\n\n```yaml\nservices:\n  - name: Queue\n    command: php artisan horizon\n    processes: 3 # Optional, number of parallel processes. Defaults to 1\n    restart:\n        watch:\n            - app/Jobs\n            - app/Mail/WelcomEmail.php\n    \n  - name: Vite\n    directory: Users/developer/anystack/front-end\n    command: npm run dev\n    environment:\n        FOO: \"BAR\"\n\n  - name: Octane\n    command: php artisan octane:start --port=8000 --no-interaction\n\n  - name: Stripe\n    command: stripe listen --forward-to localhost:8000/webhooks/stripe\n    restart:\n      minutes: 5\n```\n\nThe following properties are available per command:\n\n| Property    | Description                                                                          | Required |\n|-------------|--------------------------------------------------------------------------------------|----------|\n| name        | Shortname that describes your service.                                               | Yes      |\n| directory   | Set the working directory, defaults to porter.yml directory.                         | No  |\n| command     | The command to run relative to the root of your project or custom defined directory. | Yes      |\n| restart     |                                                                                      |          | \n| - minutes   | After how many minutes the service should restart.                                   | No       | \n| - watch     | Restart service if files or directories are modified.                                | No       | \n| processes   | Set the number of parallel processes for the service. Defaults to 1.                 | No  |\n| environment | Set custom environment variables                                                     | No  |\n\nIf you have made changes to your `porter.yml` you can use the `porter restart` command to apply your changes.\n\n### Monitoring services\nTo monitor your services you can use the `porter status` command.\n\n```shell\n~/Developer/anystack: $ porter status\n+----------+-----------------+---------+---------------------------+\n| App      | Name            | Status  | Description               |\n+----------+-----------------+---------+---------------------------+\n| anystack | anystack-octane | RUNNING | pid 41277, uptime 0:03:29 |\n| anystack | anystack-queue  | RUNNING | pid 41275, uptime 0:03:29 |\n| anystack | anystack-vite   | RUNNING | pid 41276, uptime 0:03:29 |\n+----------+-----------------+---------+---------------------------+\n```\n\n### Tail service logs\n\n#### Basic tail usage\nYou can tail one or more services (unified) using the `porter tail` command.\n\nThis command is context-aware and will automatically ask which services you want to tail:\n\n```shell\n~/Developer/anystack: $ porter tail\n\n Which service do you want to tail?:\n  [0] anystack-octane\n  [1] anystack-queue\n  [2] anystack-vite\n \u003e 0,1\n \n Use CTRL+C to stop tailing.\n \n Horizon started successfully.\n \n INFO  Server running…\n Local: http://127.0.0.1:8000\n 200    GET / ... 33.38 mb 79.10 ms\n ```\n\n#### Tail all available services\n\nTo automatically tail all available services, pass the `--all` option:\n\n```shell\n~/Developer/anystack: $ porter tail --all\n Use CTRL+C to stop tailing.\n \n Horizon started successfully.\n \n INFO  Server running…\n Local: http://127.0.0.1:8000\n 200    GET / ... 33.38 mb 79.10 ms\n```\n\n#### Tail one or more services\n\nYou can specify one or more services that you would like to tail by passing  \nthe `--services` option with a comma-separated list of service indexes or service names.\n\nYou can find the index and name of each available service by running `porter tail` with no arguments:\n\n```shell\n~/Developer/anystack: $ porter tail\n\n Which service do you want to tail?:\n  [0] anystack-octane\n  [1] anystack-queue\n  [2] anystack-vite\n```\n\nThe following examples reference the service names and indexes found above:\n\n```shell\n~/Developer/anystack: $ porter tail --services=0,2\n```\n\n```shell\n~/Developer/anystack: $ porter tail --services=anystack-octane,anystack-vite\n```\n\n_The above two commands are functionally equivalent._\n\n```shell\n~/Developer/anystack: $ porter tail --services=1\n```\n\n```shell\n~/Developer/anystack: $ porter tail --services=anystack-queue\n```\n\n_The above two commands are functionally equivalent._\n\n### All available commands\n\n| Command          | Description                                 |\n|------------------|---------------------------------------------|\n| `porter add`     | Add current directory as a new application. |\n| `porter remove`  | Remove current application services.        |\n| `porter start`   | Start all services.                         |\n| `porter restart` | Restart one or multiple services.           |\n| `porter stop`    | Stop all services.                          |\n| `porter tail`    | Tail service logs.                          |\n\n### Brought to you by Anystack\nAnystack is the all-in-one product platform that helps you make a living by writing code. Push your code to GitHub, and we will take care of everything else.  [Start your adventure today](https://anystack.sh?utm_source=github\u0026utm_campaign=porter\u0026utm_medium=repository). \n\n## License\nPorter is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanystack-sh%2Fporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanystack-sh%2Fporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanystack-sh%2Fporter/lists"}