{"id":28194246,"url":"https://github.com/monkey-projects/aero-ext","last_synced_at":"2025-09-12T03:40:26.530Z","repository":{"id":246813335,"uuid":"822996939","full_name":"monkey-projects/aero-ext","owner":"monkey-projects","description":"Extensions to use with the Aero config lib","archived":false,"fork":false,"pushed_at":"2025-06-12T07:50:24.000Z","size":34,"stargazers_count":20,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-11T21:17:18.503Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","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/monkey-projects.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,"zenodo":null}},"created_at":"2024-07-02T08:27:33.000Z","updated_at":"2025-05-14T11:31:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"b7f7989a-9358-488a-9e47-5d1b6b8450e3","html_url":"https://github.com/monkey-projects/aero-ext","commit_stats":null,"previous_names":["monkey-projects/aero-ext"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/monkey-projects/aero-ext","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkey-projects%2Faero-ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkey-projects%2Faero-ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkey-projects%2Faero-ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkey-projects%2Faero-ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monkey-projects","download_url":"https://codeload.github.com/monkey-projects/aero-ext/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkey-projects%2Faero-ext/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274005304,"owners_count":25205934,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-05-16T13:11:42.202Z","updated_at":"2025-09-12T03:40:26.507Z","avatar_url":"https://github.com/monkey-projects.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aero Extensions\n\n[![Clojars Project](https://img.shields.io/clojars/v/com.monkeyprojects/aero-ext.svg)](https://clojars.org/com.monkeyprojects/aero-ext)\n\nThis is a Clojure lib that adds some more tag readers to use with [Aero](https://github.com/juxt/aero?tab=readme-ov-file).  This is a configuration library that reads `.edn` files but adds\nsome additional functionality to it.  For use with our own projects, we have\ncreated this library, that adds some more extensions.\n\n## Usage\n\nFirst include the library:\n```clojure\n;; deps.edn\n{:deps {com.monkeyprojects/aero-ext {:mvn/version \"0.3.0\"}}}\n```\nOr with Leiningen:\n```clojure\n:dependencies [[com.monkeyprojects/aero-ext \"0.3.0\"]]\n```\n\nThen enable the readers just by requiring the ns:\n```clojure\n(require '[monkey.aero])\n\n;; Load something with aero\n(require '[aero.core :as ac])\n\n;; This will automatically process any extension readers\n(ac/read-config \"path/to/edn/file\")\n```\n\n## Available Readers\n\nThese are the readers that are provided by this library.\n\n### to-edn\n\nSerializes the argument to an `edn` string.\n```clojure\n{:config-str #to-edn {:key \"value\"}}\n```\n\n### from-edn\n\nOpposite of `#to-edn`, parses an `edn` string:\n```clojure\n{:config-str #from-edn \"{:key \\\"value\\\"}\"}\n```\n\nThis is useful when you want to process an edn file before including it in your config\n(like decrypting it).\n\n### meta-merge\n\nSimilar to Aero's `#merge`, this performs a deep merge using\n[meta-merge](https://github.com/weavejester/meta-merge).  Existing maps don't overwrite\neachother, but are merged again:\n```clojure\n{:value #meta-merge [{:first {:second \"value\"}}\n                     {:first {:third \"other value\"}}]}\n```\nThis will result in a map like this:\n```clojure\n{:value\n {:first\n  {:second \"value\"\n   :third \"other value\"}}}\n```\n\nSee the [meta-merge docs](https://github.com/weavejester/meta-merge) for more details.\n`#deep-merge` is a synonym, for backwards compatibility.\n\n### deep-merge\n\nSee `meta-merge`.\n\n### file\n\nTo include any file as a string in your config, use `#file`:\n```clojure\n{:log-config #file \"path/to/file\"}\n```\nThis is not the same as the Aero-provided `#include`, because `#include`\nwill parse the file as `edn`, whereas `#file` will just read it as raw text.\nThis will use the `:resolver` as configured when reading the config.\n\n### to-b64\n\nThis will encode the argument to Base64.\n```clojure\n{:password #to-b64 #env PASSWORD}\n```\nUseful for including binary data.\n\n### from-b64\n\nSimilar to `#to-b64`, this will decode from Base64\n```clojure\n{:password #from-b64 #env PASSWORD}\n```\n\n### privkey\n\nWill parse the argument as a PEM-encoded private key.  The result is a `java.security.PrivateKey`.\n```clojure\n{:private-key #privkey #file \"ssh/private-key.pem\"}\n```\n\nIf the key is encrypted, you can specify the password by using a vector:\n```clojure\n{:private-key #privkey [#file \"ssh/private-key.pem\" \"verysecretpass\"]}\n```\n\nReturns a `java.security.PrivateKey`.\n\n### pubkey\n\nThe counterpart of `privkey` for public `PEM` keys:\n```clojure\n{:public-key #pubkey #file \"ssh/public-key.pem\"}\n```\n\nReturns a `java.security.PublicKey`.\n\n### str\n\nConverts the argument to a string.  Useful in combination with `#from-b64`, which returns\na byte array.\n```clojure\n{:password #str #from-b64 #env PASSWORD}\n```\n\n### random\n\nSelects an item at random from the argument list.\n```clojure\n{:continent #random [\"europe\" \"asia\" \"africa\" \"north-america\" \"south-america\" \"oceania\"]}\n```\nIt has its uses ;-).\n\n## License\n\nCopyright (c) 2024 by [Monkey Projects BV](https://www.monkey-projects.be)\n\n[MIT License](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonkey-projects%2Faero-ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonkey-projects%2Faero-ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonkey-projects%2Faero-ext/lists"}