{"id":37787048,"url":"https://github.com/johnlettman/dotbot-ifhostname","last_synced_at":"2026-01-16T15:13:21.861Z","repository":{"id":188571678,"uuid":"678997611","full_name":"johnlettman/dotbot-ifhostname","owner":"johnlettman","description":"Conditional execution of dotbot directive based on the system hostname","archived":false,"fork":false,"pushed_at":"2025-02-12T16:33:58.000Z","size":155,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-12T17:37:48.904Z","etag":null,"topics":["dotbot","dotbot-plugin"],"latest_commit_sha":null,"homepage":"","language":"Python","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/johnlettman.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-08-15T21:53:53.000Z","updated_at":"2025-02-12T16:33:55.000Z","dependencies_parsed_at":"2023-08-15T23:31:21.456Z","dependency_job_id":"d3f7f93e-7353-4aec-87dc-2ef86ff1b5d1","html_url":"https://github.com/johnlettman/dotbot-ifhostname","commit_stats":null,"previous_names":["johnlettman/dotbot-ifhostname"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/johnlettman/dotbot-ifhostname","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnlettman%2Fdotbot-ifhostname","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnlettman%2Fdotbot-ifhostname/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnlettman%2Fdotbot-ifhostname/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnlettman%2Fdotbot-ifhostname/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnlettman","download_url":"https://codeload.github.com/johnlettman/dotbot-ifhostname/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnlettman%2Fdotbot-ifhostname/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dotbot","dotbot-plugin"],"created_at":"2026-01-16T15:13:20.834Z","updated_at":"2026-01-16T15:13:21.830Z","avatar_url":"https://github.com/johnlettman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eDotbot Hostname Conditional Plugin\u003cbr\u003e\n  \u003csub\u003e\u003csup\u003e\u003ccode\u003edotbot-ifhostname\u003c/code\u003e\u003c/sup\u003e\u003c/sub\u003e\u003c/h1\u003e\n\u003c/div\u003e\n\n[![License][shield-license]][url-license]\n![Programming Language][shield-language]\n[![CI Results][shield-ci]][url-ci]\n[![Code Coverage][shield-codecov]][url-codecov]\n\nA plugin for conditional execution of [Dotbot][url-dotbot] directives based on\nthe hostname of the machine.\n\nInspired by [dotbot-if][url-dotbot-if] and [dotbot-ifplatform][url-dotbot-ifplatform].\n\n\n## Prerequisites\nThis is a plugin for [Dotbot][url-dotbot], requiring it to be available.\n\n## Installation\n1. Add [dotbot-ifhostname][url-repo] as a submodule to your dotfiles repository:\n```bash\ngit submodule add https://github.com/johnlettman/dotbot-ifhostname.git\n```\n\n2. Pass the CLI argument `--plugin-dir path/to/dotbot-ifhostname` when executing the `dotbot` command.\n\n## Usage\nAdd the `ifhostname` directive to the [Dotbot][url-dotbot] YAML configuration file\nto conditionally execute the directives:\n```yaml\n\n- ifhostname:\n  hostname: computer-a\n  met:\n  - shell:\n    - echo on computer A!\n\n- ifhostname:\n  hostname: computer-b\n  met:\n  - shell:\n    - echo on computer B!\n  unmet:\n  - shell:\n    - echo this isn't computer B!\n\n- ifhostname:\n  hostname: [computer-b, other-computer-b]\n  met:\n  - shell:\n    - echo on computer B!\n  unmet:\n  - shell:\n    - echo this isn't computer B!\n\n```\n\n## Details\nThe following configuration options are available for the `ifhostname` directive:\n\n| Option     | Required | Description                                             |\n|------------|----------|---------------------------------------------------------|\n| `hostname` | Yes      | The hostname to match against.                          |\n| `met`      | No       | Directives to execute when the hostname matches.        |\n| `unmet`    | No       | Directives to execute when the hostname does not match. |\n\n\n[url-dotbot]: https://github.com/anishathalye/dotbot\n[url-dotbot-if]: https://github.com/wonderbeyond/dotbot-if\n[url-dotbot-ifplatform]: https://github.com/ssbanerje/dotbot-ifplatform\n\n[url-repo]: https://github.com/johnlettman/dotbot-ifhostname\n[url-license]: https://github.com/johnlettman/dotbot-ifhostname/blob/main/LICENSE\n[url-ci]: https://github.com/johnlettman/dotbot-ifhostname/actions/workflows/ci.yml\n[url-codecov]: https://app.codecov.io/gh/johnlettman/dotbot-ifhostname\n\n[shield-license]: https://img.shields.io/badge/License-MIT-green?style=for-the-badge\n[shield-language]: https://img.shields.io/github/languages/top/johnlettman/dotbot-ifhostname?style=for-the-badge\n[shield-ci]: https://img.shields.io/github/actions/workflow/status/johnlettman/dotbot-ifhostname/ci.yml?style=for-the-badge\u0026label=CI\n[shield-codecov]: https://img.shields.io/codecov/c/github/johnlettman/dotbot-ifhostname?style=for-the-badge\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnlettman%2Fdotbot-ifhostname","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnlettman%2Fdotbot-ifhostname","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnlettman%2Fdotbot-ifhostname/lists"}