{"id":15873842,"url":"https://github.com/phronmophobic/tryit","last_synced_at":"2025-03-16T04:30:46.493Z","repository":{"id":49384811,"uuid":"474777171","full_name":"phronmophobic/tryit","owner":"phronmophobic","description":"Create cli snippets for quickly trying clojure libraries.","archived":false,"fork":false,"pushed_at":"2022-03-28T18:47:44.000Z","size":703,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-27T05:02:52.709Z","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}},"created_at":"2022-03-27T22:40:28.000Z","updated_at":"2023-07-25T14:55:51.000Z","dependencies_parsed_at":"2022-08-25T13:31:51.574Z","dependency_job_id":null,"html_url":"https://github.com/phronmophobic/tryit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phronmophobic%2Ftryit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phronmophobic%2Ftryit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phronmophobic%2Ftryit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phronmophobic%2Ftryit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phronmophobic","download_url":"https://codeload.github.com/phronmophobic/tryit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243802943,"owners_count":20350316,"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:23.217Z","updated_at":"2025-03-16T04:30:46.061Z","avatar_url":"https://github.com/phronmophobic.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tryit\n\nCreate cli snippets for quickly trying clojure libraries.\n\n![example usage](/example-usage.gif?raw=true)\n\n## Try it!\n\n### Create a command that invokes a function\n```sh\nclj -Sdeps {:deps\\ {com.phronemophobic/tryit\\ {:mvn/version\\ \\\"1.1\\\"}}} -X com.phronemophobic.tryit/exec\n```\n\n### Create a command that invokes a namespace's main\n```sh\nclj -Sdeps {:deps\\ {com.phronemophobic/tryit\\ {:mvn/version\\ \\\"1.1\\\"}}} -M -m com.phronemophobic.tryit\n```\n\n### Create a command that evals expressions in a namespace\n```sh\nclj -Sdeps {:deps\\ {com.phronemophobic/tryit\\ {:mvn/version\\ \\\"1.1\\\"}}} -M -e \\(require\\ \\(quote\\ com.phronemophobic.tryit\\)\\)\\(ns\\ com.phronemophobic.tryit\\)\\(eval\\)\n```\n\n## Alias Usage\n\n```clojure\n\n{\n :aliases {\n```\n```clojure\n           :tryit\n           {:exec-fn com.phronemophobic.tryit/cli\n            :replace-deps {com.phronemophobic/tryit {:mvn/version \"1.1\"}}}\n```\n```clojure\n           }\n}\n```\n\n```sh\n$ clj -X:tryit\nTryit: Create cli snippets for quickly trying clojure libraries.\n\nUsage:\n  clj -X:tryit :type type\n\n:type should be one of eval, exec or main.\n   :type eval - Create a command that evals expressions in a namespace\n   :type exec - Create a command that invokes a function\n   :type main - Create a command that invokes a namespace's main\n\n```\n\nExample:\n\n```sh\n$ clj -X:tryit :type exec\ndeps: {com.phronemophobic/tryit {:mvn/version \"1.1\"}}\nf: com.phronemophobic.tryit/cli\n\nclj -Sdeps {:deps\\ {com.phronemophobic/tryit\\ {:mvn/version\\ \\\"1.1\\\"}}} -X com.phronemophobic.tryit/cli\n\n```\n\n## Programmatic Usage\n\n```clojure\n(require '[com.phronemophobic.tryit :as tryit])\n\n;; Three main functions that all return strings\n\n;; Create an exec function command\n(tryit/escape-clojure-exec '{com.phronemophobic/tryit {:mvn/version \"1.1\"}}\n                           'com.phronemophobic.tryit/exec)\n\n;; Create a main function command\n(tryit/escape-clojure-main '{com.phronemophobic/tryit {:mvn/version \"1.1\"}}\n                           'com.phronemophobic.tryit)\n\n;; Create an eval function command\n(tryit/escape-clojure-eval '{com.phronemophobic/tryit {:mvn/version \"1.1\"}}\n                           'com.phronemophobic.tryit\n                           '[(eval)])\n```\n\n## License\n\nCopyright © 2022 Adrian\n\nDistributed under the Eclipse Public License version 1.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphronmophobic%2Ftryit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphronmophobic%2Ftryit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphronmophobic%2Ftryit/lists"}