{"id":15873869,"url":"https://github.com/phronmophobic/clirun","last_synced_at":"2025-04-01T22:43:35.071Z","repository":{"id":143868425,"uuid":"338711109","full_name":"phronmophobic/clirun","owner":"phronmophobic","description":"Run any function from clojure's cli.","archived":false,"fork":false,"pushed_at":"2021-02-14T20:31:23.000Z","size":11,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T19:42:13.826Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phronmophobic.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":"2021-02-14T02:06:15.000Z","updated_at":"2021-09-16T17:44:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"49aee777-c506-4e24-8739-a532002499d7","html_url":"https://github.com/phronmophobic/clirun","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"dc473e6e70f00cb18c75ac6f1528ac9af24afda9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phronmophobic%2Fclirun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phronmophobic%2Fclirun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phronmophobic%2Fclirun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phronmophobic%2Fclirun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phronmophobic","download_url":"https://codeload.github.com/phronmophobic/clirun/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246724796,"owners_count":20823543,"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-10-06T01:07:50.150Z","updated_at":"2025-04-01T22:43:35.052Z","avatar_url":"https://github.com/phronmophobic.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clirun\n\nRun any function from clojure's cli.\n\n## Usage\n\nAdd an alias to your `deps.edn`:\n\n```clojure\n  :run\n  {:extra-deps {com.phronemophobic/clirun {:mvn/version \"1.0.0\"}}\n   :main-opts [\"-m\" \"com.phronemophobic.clirun\"]}\n```\n\nRun any clojure function from the command line. Arguments are parsed as edn.\n\n\n```bash\n$ clj -M:run my.ns/foo arg1 arg2 \n```\n\nExamples:\n\n\n```bash\n# Write to a file using clojure.core/split\n$ clj -M:run clojure.core/spit '\"foo.txt\"' '[1 2 3]'\n$ cat foo.txt\n[1 2 3]\n\n# prn the return value by\n# adding -p as the first argument\n$ clj -M:run -p clojure.core/+ 1 2 3 4\n10\n\n# pretty print the return value by\n# adding -pp as the first value\n$ clj -M:run -pp  clojure.core/macroexpand-1 '(time (+ 1 2 3))'\n(clojure.core/let\n [start__6153__auto__\n  (. java.lang.System (clojure.core/nanoTime))\n  ret__6154__auto__\n  (+ 1 2 3)]\n (clojure.core/prn\n  (clojure.core/str\n   \"Elapsed time: \"\n   (clojure.core//\n    (clojure.core/double\n     (clojure.core/-\n      (. java.lang.System (clojure.core/nanoTime))\n      start__6153__auto__))\n    1000000.0)\n   \" msecs\"))\n ret__6154__auto__)\n \n# mix and match\n$ clj -M -e \"(range 50)\" | xargs -0 clj -M:run -pp clojure.core/partition 5\n((0 1 2 3 4)\n (5 6 7 8 9)\n (10 11 12 13 14)\n (15 16 17 18 19)\n (20 21 22 23 24)\n (25 26 27 28 29)\n (30 31 32 33 34)\n (35 36 37 38 39)\n (40 41 42 43 44)\n (45 46 47 48 49))\n\n```\n\n## License\n\nCopyright © 2021 Adrian\n\nDistributed under the Eclipse Public License version 1.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphronmophobic%2Fclirun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphronmophobic%2Fclirun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphronmophobic%2Fclirun/lists"}