{"id":15529009,"url":"https://github.com/alexander-schranz/mono","last_synced_at":"2025-04-23T12:35:36.595Z","repository":{"id":176707364,"uuid":"659448436","full_name":"alexander-schranz/mono","owner":"alexander-schranz","description":"Mono helps to manage your PHP Mono Repositories","archived":false,"fork":false,"pushed_at":"2025-03-13T11:44:02.000Z","size":19,"stargazers_count":14,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T23:41:18.600Z","etag":null,"topics":["monorepo","monorepository","php"],"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/alexander-schranz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-27T21:28:13.000Z","updated_at":"2025-02-25T14:25:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"13822cca-0118-4899-b1c9-29a6cfed5bd5","html_url":"https://github.com/alexander-schranz/mono","commit_stats":null,"previous_names":["alexander-schranz/mono"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-schranz%2Fmono","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-schranz%2Fmono/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-schranz%2Fmono/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexander-schranz%2Fmono/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexander-schranz","download_url":"https://codeload.github.com/alexander-schranz/mono/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250436003,"owners_count":21430390,"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":["monorepo","monorepository","php"],"created_at":"2024-10-02T11:15:55.625Z","updated_at":"2025-04-23T12:35:36.572Z","avatar_url":"https://github.com/alexander-schranz.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mono helps to manage your PHP Mono Repositories\n\nManaging a monorepository?\n\nMono helps you to initialize subtree split and run composer and other commands for all your package directories.\n\n## Installation\n\n```bash\ncomposer require schranz/mono --dev\n```\n\n## Usage\n\n## Init Split Command\n\nFirst create your mono repository and push it to Github.\n\nCreate your packages into different directories make sure\nfor to create for all packages you want to split a `composer.json` with a `name` in it.\n\nThen run:\n\n```bash\nvendor/bin/mono init-split\n```\n\nIt will create the configuration for [frankdejonge/use-subsplit-publish](https://github.com/frankdejonge/use-subsplit-publish)\nGithub Action. Make sure to configure your `PERSONAL_ACCESS_TOKEN` as a secret in your Github repository.\nAnd configure the user in the newly created `.github/workflows/publish-subsplits.yml` file.\n\n## Run Command\n\nTo install the dependencies of all your mono repositories, just run:\n\n```bash\nvendor/bin/mono run composer install\n```\n\nTo update them run:\n\n```bash\nvendor/bin/mono run composer update\n```\n\nTo run a custom custom composer script use:\n\n```bash\nvendor/bin/mono run composer fix # runs in my case rector + php-cs-fixer\n\nvendor/bin/mono run composer lint # runs in my case various linters (phpstan, php-cs, ...)\n```\n\nMono is used and was build for managing [schranz-search monorepository](https://github.com/php-cmsig/search).\n\n## Upgrade dependency\n\nIf you have one dependency used in multiple packages and want to upgrade it in all packages you can use:\n\n```bash\nvendor/bin/mono upgrade-dependency phpstan/phpstan\n```\n\nMono search for all packages which has then `phpstan/phpstan` in it and update it to the latest stable version.\n\n## Rename branch\n\nIf you want to rename a branch on all your packages in your mono repository you can use the following command:\n\n```bash\nPERSONAL_ACCESS_TOKEN=\u003ctoken\u003e vendor/bin/mono rename-branch 0.3 0.4\n```\n\nMono search for all your packages and uses the Github API to rename a specific given branch to the new name.\n\n\u003e You require at least a `PERSONAL_ACCESS_TOKEN` with `contents:write` or `admins:write` (default branch) scope.  \n\n## Projects using mono\n\n - [schranz-search](https://github.com/php-cmsig/search)\n - [modelflow-ai](https://github.com/modelflow-ai/.github)\n\nLet me know via [an issue](https://github.com/alexander-schranz/mono) if you are using mono.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexander-schranz%2Fmono","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexander-schranz%2Fmono","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexander-schranz%2Fmono/lists"}