{"id":18278761,"url":"https://github.com/terminus-plugin-project/terminus-dibs-plugin","last_synced_at":"2025-07-05T02:06:03.079Z","repository":{"id":57066882,"uuid":"78677820","full_name":"terminus-plugin-project/terminus-dibs-plugin","owner":"terminus-plugin-project","description":"Dibs - A terminus plugin to call \"dibs\" on your Pantheon environments.","archived":false,"fork":false,"pushed_at":"2019-02-28T02:23:40.000Z","size":20,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"1.x","last_synced_at":"2025-04-09T04:42:11.478Z","etag":null,"topics":[],"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/terminus-plugin-project.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}},"created_at":"2017-01-11T20:40:11.000Z","updated_at":"2019-02-28T02:21:54.000Z","dependencies_parsed_at":"2022-08-24T14:23:44.301Z","dependency_job_id":null,"html_url":"https://github.com/terminus-plugin-project/terminus-dibs-plugin","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/terminus-plugin-project/terminus-dibs-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminus-plugin-project%2Fterminus-dibs-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminus-plugin-project%2Fterminus-dibs-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminus-plugin-project%2Fterminus-dibs-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminus-plugin-project%2Fterminus-dibs-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terminus-plugin-project","download_url":"https://codeload.github.com/terminus-plugin-project/terminus-dibs-plugin/tar.gz/refs/heads/1.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminus-plugin-project%2Fterminus-dibs-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263647694,"owners_count":23494007,"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":[],"created_at":"2024-11-05T12:25:59.809Z","updated_at":"2025-07-05T02:06:03.060Z","avatar_url":"https://github.com/terminus-plugin-project.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terminus Plugin: Dibs\n\nDibs is a Terminus plugin for \"calling dibs\" on site environments. It can be\nuseful for teams who are working together on a limited number of multidevs, or\nin the context of build automation and continuous integration.\n\n\n## Installation\n\nThe simplest way to install this plugin is via Composer! Run the following\ncommand to install this plugin:\n\n```sh\ncomposer create-project --stability=beta -d ~/.terminus/plugins/ terminus-plugin-project/terminus-dibs-plugin:~1\n```\n\nIf you do not wish to use Composer, place the contents of this repository into\n`~/.terminus/plugins/dibs` or the location of your `$TERMINUS_PLUGINS_DIR`. You\nmay do so either by cloning this repository using git, or by un-compressing the\ntarball from a release on GitHub.\n\nVerify that installation succeeded by running `terminus help env:dibs`\n\n\n## Usage\n\n### Dibs'ing a specific environment\n\nTo call dibs on the `dev` environment on a site called `your-site` run:\n\n```sh\nterminus env:dibs your-site.dev \"Need the dev environment for a thing.\"\n```\n\nIf the call succeeded, you should see a message like the following:\n\n```\n[notice] Called dibs on the dev environment.\n```\n\n...In addition to details about the environment.\n\nNote that you must leave a note when calling dibs. If you or anyone else on your\nteam attempt to call dibs on `dev` again, you'll see an error containing the\nmessage originally used to call dibs. Be sure to leave meaningful notes for your\ncolleagues!\n\n### Un-dibs'ing an environment\n\nOnce you're done using your environment, you can _undibs_ it by running the\nfollowing command:\n\n```sh\nterminus env:undibs your-site.env\n```\n\nIf the call succeeded, you should see a message like the following:\n\n```\n[notice] Undibs'd the dev environment.\n```\n\n...In addition to details about the environment.\n\nAfterward, you or anyone else on your team may call dibs on `dev` again.\n\n### Dibs'ing any available environment\n\nIf you don't care which environment you call, you may run the following command,\nwhich doesn't require an environment name. Dibs will attempt to find an\nenvironment that hasn't already been called.\n\n```sh\nterminus site:dibs your-site \"Testing some layout tweaks\"\n```\n\nIf an environment was found, you'll see the same success message as shown above,\nincluding the name of the dibs'd environment. Additionally, details about the\ndibs'd environment will be returned.\n\nIf all environments are spoken for, you'll see an error message\n\n```\n[error] Unable to find an environment to dibs.\n```\n\nBy default, all environments except for the live environment may be dibs'd.\n\n### Dibs'ing an environment based on a filter\n\nIf you'd like to dibs an environment, but wish to limit the environments made\navailable for dibs'ing, you can do so by providing a regex pattern as a filter.\n\n```sh\nterminus site:dibs your-site \"Experiments\" '^((?!^(dev|test|live)$).)*$'\n```\n\nThe above command would call dibs on a multidev, ignoring the `dev`, `test`, and\n`live` environments.\n\nNote: In both cases where no specific environment is provided, only those\nenvironments that are fully spun-up are dibs'able. If you need to dibs an\nenvironment as it is being spun up, specify the environment name.\n\n### Dibs Report\n\nIf you want to see an overview of environments and their dibs status, you can\nget an environment-by-environment breakdown using the following command:\n\n```sh\nterminus site:dibs:report your-site\n```\n\nDoing so, you'd get a response like this:\n\n```\n ------------- ---------------- ---------- ------------------------ --------------------------\n  Environment   Status           By         At                       Message\n ------------- ---------------- ---------- ------------------------ --------------------------\n  dev           Available\n  test          Not Ready\n  multidev-1    Already called   username   Thu Nov 3rd at 07:23pm   New feature for the boss\n ------------- ---------------- ---------- ------------------------ --------------------------\n```\n\nNote that you can also supply a regex filter to limit the environments returned\nin the report:\n\n```sh\nterminus site:dibs:report your-site '^((?!^(dev|test|live)$).)*$'\n```\n\nYou can also use a flag, ```--older-than```, to further filter down environments that have been dibs'd for a given amount of time (in seconds):\n\n```sh\nterminus site:dibs:report your-site '^((?!^(dev|test|live)$).)*$' --older-than=1800\n```\n\n\n## Use-cases\n\nThis plugin assumes that you have persistent or semi-persistent environments\nspun up on your Pantheon site. It can be useful for a variety of use-cases, both\nhuman and automated.\n\n### Poor man's multidev\n\nSuppose you have a team of two or more and you're working for a client who is\ntoo stingy for multidevs. If two of you want to try out new configurations in\nthe same area of the site, how do you figure out who uses `dev` vs. `test`?\n\nThis plugin can help manage work!\n\n```sh\nterminus env:dibs your-site.test \"New features for the boss\"\n```\n\n### Speed up CI builds\n\nSuppose you run automated tests on a CI server that spin up and tear down\nmultidev environments, but the database is so large that a site create takes\n_forever_.\n\nUse this plugin to speed up your builds! Keep a handful of persistent CI\nenvironments around, named using a convention like `ci1`, `ci2`, etc. Instead of\nspinning up/tearing down environments, just call dibs!\n\n```sh\nexport PENV=`terminus site:dibs --field=id -- your-site \"Using env for build.\" '^ci\\d$'`\n```\n\nNote you can also specify multiple fields (`--fields=id,domain`) (rather than\none) or specify an alternative format (`--format=json`) if desired. For more\ndetails, run: `terminus help site:dibs`\n\n### Multidev management\n\nSuppose you have a large team or a large number of features you're working on\nsimultaneously, but only a handful of multidev environments.\n\nUse this plugin to keep everyone from stepping on each other's toes! Keep your\nmultidev count at max capacity, named using a convention like `dev1`, `dev2`,\netc. Call dibs on an environment before you start working on a feature or as\nsoon as it's ready for QA.\n\n```sh\nterminus site:dibs your-site \"Feature name/number\" '^dev\\d+$'\n```\n\n## Internals\n\nIn order to maintain state about whether or not an environment is _dibs'd_, this\nplugin writes a small JSON file to a publicly accessible location in the site\nenvironment's file system. If you run any file-based workflow operations (like\ncloning from `live` to your dibs'd environment), dibs state will be lost.\n\nThis plugin _is_ smart enough to recognize when an environment has been created\nfrom a previously dibs'd environment (e.g. a clone of db/files from one\nenvironment to another), and will allow the target site to be dibs'd (like if\n`dev` was already dib's and you spun up `multidev-1` from `dev`, even though the\ndibs JSON from `dev` would exist on `multidev-1`, this plugin will still allow\nyou to call dibs on `multidev-1` anyway).\n\n## Notes\n- Compatibility with [`terminus 2.0.x`](https://github.com/pantheon-systems/terminus/releases/tag/2.0.0):\n    - 1.x versions of Dibs is compatible with `1.x` up to `2.0.0` versions of Terminus.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterminus-plugin-project%2Fterminus-dibs-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterminus-plugin-project%2Fterminus-dibs-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterminus-plugin-project%2Fterminus-dibs-plugin/lists"}