{"id":16371020,"url":"https://github.com/liquidz/dad","last_synced_at":"2025-03-16T15:33:03.329Z","repository":{"id":41448330,"uuid":"207175040","full_name":"liquidz/dad","owner":"liquidz","description":"Small configuration management tool for Clojure","archived":false,"fork":false,"pushed_at":"2022-09-02T22:40:01.000Z","size":250,"stargazers_count":137,"open_issues_count":2,"forks_count":7,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-27T11:20:17.680Z","etag":null,"topics":["clojure","graalvm","infrastructure-as-code"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liquidz.png","metadata":{"files":{"readme":"README.adoc","changelog":"CHANGELOG.adoc","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":"2019-09-08T21:19:27.000Z","updated_at":"2025-01-08T11:09:01.000Z","dependencies_parsed_at":"2023-01-17T18:35:12.142Z","dependency_job_id":null,"html_url":"https://github.com/liquidz/dad","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidz%2Fdad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidz%2Fdad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidz%2Fdad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidz%2Fdad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liquidz","download_url":"https://codeload.github.com/liquidz/dad/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822309,"owners_count":20353498,"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":["clojure","graalvm","infrastructure-as-code"],"created_at":"2024-10-11T03:06:44.928Z","updated_at":"2025-03-16T15:33:03.067Z","avatar_url":"https://github.com/liquidz.png","language":"Clojure","readme":"= Dad\n\nimage:https://github.com/liquidz/dad/workflows/test/badge.svg[link=\"https://github.com/liquidz/dad/actions/workflows/test.yml\"]\nimage:https://github.com/liquidz/dad/actions/workflows/lint.yml/badge.svg[link=\"https://github.com/liquidz/dad/actions/workflows/lint.yml\"]\nimage:https://github.com/liquidz/dad/actions/workflows/dependency.yml/badge.svg[link=\"https://github.com/liquidz/dad/actions/workflows/dependency.yml\"]\nimage:https://img.shields.io/github/release/liquidz/dad.svg?logo=Github[link=\"https://github.com/liquidz/dad/releases\"]\n\n\u003e My father is a greate chef :)\n\nDad is a small configuration management tool for Clojure.\nThis project is heavily inspired by https://github.com/itamae-kitchen/mitamae[mitamae].\n\n== Concept\n\n=== 🤯 Minimum to remember\n* May not write code for Dad often.\n//* Minimum to remember -- May not write code for Dad often\n* Write codes as a https://github.com/babashka/pods[babashka pod].\n** You can gain benefits from code completion and docstring references.\n//* Easy to start -- Download single binary and run it.\n\n=== 🍟 Easy to start\n* Download single binary and run it.\n* Run the code written as a babashka pod as it is.\n** Dad ignores codes related to loading pods.\n\n\n== Getting Started\n\nDownload binary from https://github.com/liquidz/dad/releases[releases].\n[source,terminal]\n----\n# Download latest dad to the current working directory\ncurl -L https://raw.githubusercontent.com/liquidz/dad/main/script/download | bash\n./dad your_task.clj\n----\n\nHere is a example to install Clojure https://clojure.org/guides/deps_and_cli[command line tools].\n\nYou can generate a template file by `./dad --init example.core`.\n\n// cf. example/clojure/cli.clj\n[source,clojure]\n----\n#!/usr/bin/env dad --no-color --dry-run\n(ns example.core\n  (:require\n   [babashka.pods :as pods]))\n\n;; Load dad as a babashka pod\n(pods/load-pod \"dad\")\n(require '[pod.liquidz.dad :as dad])\n\n(dad/package {:name [\"curl\" \"rlwrap\"]})\n\n;; You can define function as you like\n(defn curl [m]\n  (let [{:keys [path url]} m]\n    ;; `file-exists?` is a built-in function in dad.\n    (when (and (not (dad/file-exists? path))\n               (string? url))\n      (dad/execute {:command (str \"curl -sfLo \" path \" \" url)}))))\n\n(curl {:path \"/tmp/install.sh\"\n       :url \"https://download.clojure.org/install/linux-install-1.10.3.1087.sh\"})\n\n(dad/file {:path \"/tmp/install.sh\" :mode \"755\"})\n(dad/execute {:cwd \"/tmp\" :command \"./install.sh\"})\n(dad/file {:path \"/tmp/install.sh\" :action :delete})\n----\n\n== Supports\n\n- [x] Ubuntu (`apt`)\n- [x] macOS (link:https://brew.sh[Homebrew])\n\n== Example\n\n- link:./example/vim[Building vim by source]\n- link:./test/resources/test_task/tasks.clj[Test task]\n\n== Reference\n\nNOTE: You can refer all documents in *codes*. (evaluate `(dad/doc)` or `(help)`)\n\n=== Built-in vars / functions\n\n|===\n| Name | Var/Func | Description\n\n| link:doc/doc.md[doc]\n| Func\n| Print dad documents.\n\n| link:doc/file-exists.md[file-exists?]\n| Func\n| Return true if the specified path exists.\n\n| link:doc/os-type.md[os-type]\n| Func\n| OS name string such as `\"linux\"` or `\"mac\"`.\n\n| link:doc/render.md[render]\n| Func\n| Render a template string with a data.\n\n| link:doc/load-file.md[load-file]\n| Func\n| Load another recipe file.\n\n|===\n\nSee https://github.com/borkdude/sci/blob/master/src/sci/impl/namespaces.cljc[sci/impl/namespaces.cljc] for other core functions.\n\n=== Resources\n\n|===\n| Resource name | Description\n\n| link:doc/directory.md[directory] | Create directories.\n| link:doc/download.md[download] | Download a file from remote host.\n| link:doc/execute.md[execute] | Execute a shell command.\n| link:doc/file.md[file] | Create a file.\n| link:doc/git.md[git] | Execute `git` command.\n| link:doc/link.md[link] | Create a symbolic link.\n| link:doc/package.md[package] | Install packages.\n| link:doc/template.md[template] | Create a text file from the specified template files.\n\n|===\n\n== REPL\n\nDad also provides REPL mode that does not affect your environment. (same as `--dry-run` option)\n\n[source,console]\n----\n$ dad --repl\n\nuser=\u003e (println \"hello from dad\")\nhello from dad\nnil\n\nuser=\u003e (+ 1 2 3)\n6\n\nuser=\u003e (package \"sl\")\napt-update [sl] ... will change\npackage-install [sl] ... will change\n\nuser=\u003e (package \"sl\" {:action :uninstall})\npackage-uninstall [sl] ... WILL NOT change\n----\n\n== License\n\nCopyright © 2019-2022 https://twitter.com/uochan[Masashi Iizuka]\n\nThis program and the accompanying materials are made available under the\nterms of the Eclipse Public License 2.0 which is available at\nhttp://www.eclipse.org/legal/epl-2.0.\n\nThis Source Code may also be made available under the following Secondary\nLicenses when the conditions for such availability set forth in the Eclipse\nPublic License, v. 2.0 are satisfied: GNU General Public License as published by\nthe Free Software Foundation, either version 2 of the License, or (at your\noption) any later version, with the GNU Classpath Exception which is available\nat https://www.gnu.org/software/classpath/license.html.\n// vim:fdm=marker:fdl=0\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliquidz%2Fdad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliquidz%2Fdad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliquidz%2Fdad/lists"}