{"id":18881772,"url":"https://github.com/pcrockett/blarg","last_synced_at":"2026-04-29T14:31:38.721Z","repository":{"id":258764835,"uuid":"860078976","full_name":"pcrockett/blarg","owner":"pcrockett","description":"Target-based configuration management with Bash.","archived":false,"fork":false,"pushed_at":"2025-04-07T11:47:31.000Z","size":99,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-31T08:43:37.852Z","etag":null,"topics":["bash"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pcrockett.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":"2024-09-19T19:29:35.000Z","updated_at":"2025-04-07T11:47:34.000Z","dependencies_parsed_at":"2024-10-20T17:48:42.802Z","dependency_job_id":null,"html_url":"https://github.com/pcrockett/blarg","commit_stats":null,"previous_names":["pcrockett/blarg"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcrockett%2Fblarg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcrockett%2Fblarg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcrockett%2Fblarg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcrockett%2Fblarg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pcrockett","download_url":"https://codeload.github.com/pcrockett/blarg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcrockett%2Fblarg/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259124801,"owners_count":22809037,"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":["bash"],"created_at":"2024-11-08T06:51:42.148Z","updated_at":"2026-04-29T14:31:38.716Z","avatar_url":"https://github.com/pcrockett.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# blarg\n\nTarget-based configuration management with Bash.\n\n## \"Target-based\"\n\nIn the context of build systems or installer frameworks, a **target** is a specific,\ndesired end-state or result that a tool aims to achieve. It represents a named\nobjective, like creating an executable file, installing a software package, or\ngenerating documentation. The tool then figures out the steps needed to reach that\ntarget, handling dependencies and executing commands in the correct order.\n\nWith `blarg` you can easily define targets using plain Bash.\n\n## Features\n\n* simple target format (plain Bash)\n* no installation required\n* no configuration required\n* no dependencies required (beyond what comes in a \"normal\" Linux distribution)\n* easy code sharing between targets via an optional `lib.d` directory\n\n## Example\n\nImagine we have a file called `cowsay-installed.bash`:\n\n```bash\n#!/usr/bin/env blarg\n\ndepends_on apt-updated\n\nsatisfied_if() {\n  command -v cowsay\n}\n\napply() {\n  apt-get install -y cowsay\n}\n```\n\nThis is a `blarg` target, and it has one dependency: `apt-updated`. When `blarg`\nexecutes this target, it will first check to see if the `apt-updated.bash` target has\nbeen satisfied. If not, it will first go apply that target.\n\nWhen `apt-updated` is satisfied, `blarg` will come back to the `cowsay-installed` target\nand see if it has been satisfied by running the `satisfied_if` function. If not, it will\nthen run the `apply` function.\n\n## Real-world example\n\nThe above example was a bit contrived, however one can see how it could be expanded\nby constructing an entire dependency tree of targets. `blarg` will navigate the\ndependency tree and execute the `apply` functions in each target that needs it, and in\nthe correct order. It will also generate an error when there are circular dependencies,\nand it will avoid applying a target more than once.\n\nFor a real-world example involving a much larger dependency tree, see\n[my tinkering laptop configuration repository](https://github.com/pcrockett/lappy).\n\n## Minimalism\n\n`blarg` is a single Python script with less than 500 lines of code. It has three\ndependencies (which are found on almost every Linux distribution out-of-the-box):\n\n* Python 3.7 or newer\n* Bash\n* GNU Coreutils\n* Optional: Git (if you use the [external modules feature](https://github.com/pcrockett/blarg-targets))\n\n`blarg` has three design goals:\n\n1. It should be small and simple enough for one relatively Linux-experienced developer\n   to understand in an afternoon.\n2. It should have zero dependencies that aren't already available on most Linux machines\n   out of the box.\n3. It should be feature-complete, yet allow developers to add whatever additional\n   features they need via Bash (or by creating a fork). Creating and maintaining a fork\n   all by yourself should be simple.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpcrockett%2Fblarg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpcrockett%2Fblarg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpcrockett%2Fblarg/lists"}