{"id":20081928,"url":"https://github.com/eval/deps-try","last_synced_at":"2025-04-06T06:06:39.662Z","repository":{"id":65922202,"uuid":"159513033","full_name":"eval/deps-try","owner":"eval","description":"Try out Clojure (libraries) via rebel-readline","archived":false,"fork":false,"pushed_at":"2025-01-16T20:59:44.000Z","size":786,"stargazers_count":123,"open_issues_count":12,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T05:03:32.183Z","etag":null,"topics":["clojure","rebel-readline","repl","tools-deps"],"latest_commit_sha":null,"homepage":"","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/eval.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["eval"],"open_collective":"eval","polar":"eval","custom":["https://getalby.com/p/eval"]}},"created_at":"2018-11-28T14:16:56.000Z","updated_at":"2025-03-19T18:12:28.000Z","dependencies_parsed_at":"2023-02-26T08:45:14.042Z","dependency_job_id":"b9dd95cf-4957-4135-a4a9-bfa4b64efd1f","html_url":"https://github.com/eval/deps-try","commit_stats":null,"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eval%2Fdeps-try","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eval%2Fdeps-try/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eval%2Fdeps-try/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eval%2Fdeps-try/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eval","download_url":"https://codeload.github.com/eval/deps-try/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441042,"owners_count":20939239,"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","rebel-readline","repl","tools-deps"],"created_at":"2024-11-13T15:40:56.959Z","updated_at":"2025-04-06T06:06:39.639Z","avatar_url":"https://github.com/eval.png","language":"Clojure","readme":"# deps-try\n\nQuickly try out Clojure and libraries on [rebel-readline](https://github.com/bhauman/rebel-readline#rebel-readline):\n\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"535\" alt=\"Screenshot 2023-02-09 at 13 37 09\" src=\"https://github.com/eval/deps-try/assets/290596/35594a1f-c3bb-4855-87f0-404fdc72e74e.png\"\u003e\n\u003c/p\u003e\n\n\u003c!-- \u003cp align=\"center\"\u003e\n  \u003ca href=\"https://polar.sh/eval\"\u003e\u003cpicture\u003e\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://polar.sh/embed/subscribe.svg?org=eval\u0026label=Subscribe\u0026darkmode\"\u003e\u003cimg alt=\"Subscribe on Polar\" src=\"https://polar.sh/embed/subscribe.svg?org=eval\u0026label=Subscribe\"\u003e\u003c/picture\u003e\u003c/a\u003e\n\u003c/p\u003e --\u003e\n\n\u003e This README is aimed at people starting their Clojure journey as well as Clojure experts. If anything is not clear, or you learned something that might help other starters, please open an issue or start a new discussion 🌸\n\n[![chat - #clojure](https://img.shields.io/badge/chat-%23clojure-blue?style=for-the-badge\u0026logo=zulip)](https://clojurians.zulipchat.com/#narrow/channel/151168)\n\n## Rationale\n\nThis tool targets both Clojure newcomers as well as Clojure experts.\n\nTrying out Clojure is easier when you have code completion, syntax highlighting and function documentation and examples nearby. `deps-try` provides a REPL with exactly these IDE functionalities (and some more).   \nThis means there's no need to install or configure any Clojure plugins/extensions for your editor. Also you don't need to setup a project this way, so instead of diving into the nitty gritty details of a `deps.edn` configuration file, you can start writing Clojure.  \n\nAdding maven/git/local-libraries can be done using a convenient notation:\n```\n$ deps-try some-maven/library com.github.user/a-git-project ~/some/local/project\n\n# add additional libraries during a REPL-session (no restart needed)\nusers=\u003e :deps/try another/library \"https://github.com/seancorfield/next-jdbc\" \"../other/local/project\"\n```\nAgain, no need to setup or adjust a project, or type out the full configuration at the command line.\n\n\n\u003cdetails\u003e\u003csummary\u003e\u003ch2\u003eFeatures\u003c/h2\u003e\u003c/summary\u003e\n## Features\n\n- always use the latest release of Clojure.\n- conveniently use dependencies from maven/clojars, various git-hostings or local projects.\n- add dependencies _without_ restarting the REPL.\n- see what versions are resolved\n- recipes\n  - seed the REPL-history with steps from a file.\n- dependencies are resolved in isolation (as much as possible)\n  - ...ignoring global, project or project deps.edn.\n- rebel-readline provides:\n  - syntax highlighting and indentation\n  - code completion\n  - see the docstring and source of a function\n- deps-try extends rebel-readline with:\n  - show examples of a function from clojuredocs.org\n  - pprint results with syntax highlighting\n  - interrupt operations without quiting the REPL\n  - easier copy/paste of multiline code\n  - improved support for eval-at-point (e.g. set and list literals, var quote, deref)\n  - eval\u0026tap-at-point\n    - like eval-at-point and it taps the result.\n    - taps the last result/exception on an empty line.\n  - improved suggestions\n    - more shown\n    - different colors for fns and vars, private vars/fns and deprecated vars.\n- toggle Clojure settings\n  - `clojure.core/*print-meta*`\n  - `clojure.core/*print-namespace-maps*` (default off)\n\n\u003c/details\u003e\n\n## Installation\n\n### Docker\n\nThe easiest way to start.\n\n```bash\n# latest stable\n$ docker run -it --pull always ghcr.io/eval/deps-try\n\n# unstable (i.e. master branch)\n$ docker run -it --pull always ghcr.io/eval/deps-try:unstable\n```\n\nSee `-h` or [Usage](#usage) for detailed options.\n\n\n### Homebrew (Linux and macOS)\n\n\u003cdetails\u003e\u003csummary\u003e\u003ch4\u003ePrerequisites\u003c/h4\u003e\u003c/summary\u003e\n\nEnsure you have a [Clojure compatible Java version](https://clojure.org/guides/install_clojure#java).\n\nVerify that the following commands work:\n\n``` bash\n$ java -version\n# example output\nopenjdk version \"21.0.2\" 2024-01-16 LTS\nOpenJDK Runtime Environment Temurin-21.0.2+13 (build 21.0.2+13-LTS)\nOpenJDK 64-Bit Server VM Temurin-21.0.2+13 (build 21.0.2+13-LTS, mixed mode)\n```\n\n\u003c/details\u003e\n\n#### Install\n\n``` bash\n$ brew install eval/brew/deps-try\n# For future upgrades do:\n$ brew update \u0026\u0026 brew upgrade deps-try\n```\n\nThere's also the unstable releases (the latest master):\n``` bash\n$ brew install --head eval/brew/deps-try\n# For future upgrades do:\n$ brew update \u0026\u0026 brew reinstall deps-try\n```\n\n### bbin (Windows, Linux and macOS)\n\n[bbin](https://github.com/babashka/bbin) allows for easy installation of Babashka scripts (such as deps-try).\n\nIt's currently the only way to install deps-try on Windows.\n\n\u003cdetails\u003e\u003csummary\u003e\u003ch4\u003ePrerequisites\u003c/h4\u003e\u003c/summary\u003e\n\nEnsure you have a [Clojure compatible Java version](https://clojure.org/guides/install_clojure#java).\n\nAlso: [install bbin](https://github.com/babashka/bbin#installation) (make sure to adjust $PATH).\n\nVerify that the following commands work:\n\n``` bash\n$ java -version\n# example output\nopenjdk version \"21.0.2\" 2024-01-16 LTS\nOpenJDK Runtime Environment Temurin-21.0.2+13 (build 21.0.2+13-LTS)\nOpenJDK 64-Bit Server VM Temurin-21.0.2+13 (build 21.0.2+13-LTS, mixed mode)\n$ bbin --version\n# example output\nbbin 0.2.0\n```\n\u003c/details\u003e\n\n#### Install\n\n\n``` bash\n$ bbin install https://github.com/eval/deps-try/releases/download/stable/deps-try-bb.jar --as deps-try\n# or the unstable version (latest master)\n$ bbin install https://github.com/eval/deps-try/releases/download/unstable/deps-try-bb.jar --as deps-try-unstable\n\n# Check version\n$ deps-try -v\n\n# Re-run the install command to upgrade\n```\n\n### manual (Windows, Linux and macOS)\n\n\u003cdetails\u003e\u003csummary\u003e\u003ch4\u003ePrerequisites\u003c/h4\u003e\u003c/summary\u003e\n\n* Install [Clojure](https://clojure.org/guides/install_clojure)\n* Install [babashka](https://github.com/babashka/babashka#installation)\n\nVerify that the following commands work:\n\n``` bash\n$ clj\n# REPL starts successfully, ergo Clojure and Java are correctly configured.\n$ bb --version\nbabashka v1.3.190\n```\n\n\u003c/details\u003e\n\n#### Install\n\n* Download [the latest stable bb-jar](https://github.com/eval/deps-try/releases/tag/stable).\n* Put an executable wrapper-script on $PATH. For example (for Linux and macOS):\n```bash\n#!/usr/bin/env sh\n\nexec bb /absolute/path/to/deps-try-bb.jar \"$@\"\n```\n\n## Usage\n\n```bash\n$ deps-try -h\nA CLI to quickly try Clojure (libraries) on rebel-readline.\n\nVERSION\n  v0.12.0\n\nUSAGE\n  $ deps-try [dep-name [dep-version] [dep2-name ...] ...] [--recipe[-ns] recipe]\n\nOPTIONS\n  dep-name\n    dependency from maven (e.g. `metosin/malli`, `org.clojure/cache`),\n    git (e.g. `com.github.user/project`, `ht.sr.user/project`,\n    `https://github.com/user/project`, `https://anything.org/user/project.git`),\n    or a local folder containing a file `deps.edn` (e.g. `.`,\n    `~/projects/my-project`, `./path/to/project`).\n\n  dep-version (optional)\n    A maven version (e.g. `1.2.3`, `LATEST`) or git ref (e.g. `some-branch`,\n    `v1.2.3`).\n    The id of a PR or MR is also an acceptable version for git deps (e.g. `^123`).\n    When not provided, `LATEST` is implied for maven deps and the latest SHA\n    of the default-branch for git deps.\n\n  --recipe, --recipe-ns\n    Name of recipe (see recipes command) or a path or url to a Clojure file.\n    The REPL-history will be seeded with the (ns-)steps from the recipe.\n\nEXAMPLES\n  ;; The latest version of malli from maven, and git-tag v1.3.894 of the next-jdbc repository\n  $ deps-try metosin/malli io.github.seancorfield/next-jdbc v1.3.894\n\nCOMMANDS\n  recipes    list built-in recipes (`recipes --refresh` to update)\n```\n\n\u003cdetails\u003e\u003csummary\u003e\u003ch3\u003eMore examples\u003c/h3\u003e\u003c/summary\u003e\n  \n```\n# A REPL using the latest Clojure version\n$ deps-try\n\n# A REPL with specific dependencies (latest version implied)\n$ deps-try metosin/malli criterium/criterium\n\n# ...specific version\n$ deps-try metosin/malli 0.9.2\n\n# Dependency from GitHub/GitLab/SourceHut (gets you the latest SHA from the default branch)\n$ deps-try https://github.com/metosin/malli\n\n# ...a specific branch/tag/SHA\n$ deps-try https://github.com/metosin/malli some-branch-tag-or-sha\n\n# ...using the 'infer' notation, e.g.\n# com.github.\u003cuser\u003e/\u003cproject\u003e, com.gitlab.\u003cuser\u003e/\u003cproject\u003e, ht.sr.~\u003cuser\u003e/\u003cproject\u003e\n$ deps-try com.github.metosin/malli\n# testdriving some PR (or MR from gitlab):\n$ deps-try com.github.metosin/malli ^123\n\n# A local project\n$ deps-try . ~/some/project ../some/other/project\n\n# Loading a recipe\n# ...built-in recipe (to learn more about recipes)\n$ deps-try --recipe deps-try/recipes\n\n# ...external\n$ deps-try --recipe https://gist.github.com/eval/ee80ebddaa120a7732396cea8cfc96da\n\nDuring a REPL-session:\n# add additional dependencies\nuser=\u003e :deps/try dev.weavejester/medley \"~/some/project\"\n\n# see help for all options\nuser=\u003e :repl/help\n```\n\n\u003c/details\u003e\n\n## Recipes\n\n_This feature was sponsored by [Clojurists Together](https://www.clojuriststogether.org/) ✨ in Q3-2023._\n\nRead all about [recipes here](https://github.com/eval/deps-try/tree/master/recipes). \n\n## Bindings\n| Binding | Comment |  |\n| --- | :-- | --: |\n| \u003ckbd\u003eTAB\u003c/kbd\u003e / \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eI\u003c/kbd\u003e | Indent or complete. | ![deps-try-tab](https://user-images.githubusercontent.com/290596/229816619-7f084076-df8b-4508-82d0-a7cde0a0f974.gif) |\n| \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eX\u003c/kbd\u003e \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eA\u003c/kbd\u003e | Apropos. Search all public vars in loaded namespaces matching word before cursor. | ![deps-try-apropos](https://user-images.githubusercontent.com/290596/229820298-55c3a1e6-0fa1-4a84-b0d1-a04d8ae7ed85.gif)|\n|\u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eX\u003c/kbd\u003e \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eD\u003c/kbd\u003e| Show doc of function (or namespace) using word before cursor. |\u003cimg width=\"624\" alt=\"Screenshot 2023-04-04 at 15 38 12\" src=\"https://user-images.githubusercontent.com/290596/229811188-cd9775e0-6f06-4300-a457-90b8d891e808.png\"\u003e|\n| \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eX\u003c/kbd\u003e \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eE\u003c/kbd\u003e | Eval expression before cursor. |  ![deps-try-eval](https://user-images.githubusercontent.com/290596/229825665-b1a40a81-6185-419c-bac2-4ce029890765.gif)|\n| \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eX\u003c/kbd\u003e \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eT\u003c/kbd\u003e | Eval expression before cursor *and* `tap\u003e` the result (taps the last result/exception on empty line). | |\n| \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eX\u003c/kbd\u003e \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eM\u003c/kbd\u003e | Force accept line (when cursor is in a position where \u003ckbd\u003eReturn\u003c/kbd\u003e would insert a newline). | ![deps-try-force-accept](https://user-images.githubusercontent.com/290596/229837792-bf1b19e6-33e2-4c3c-8cf9-e8adf3d887fc.gif) |\n| \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eX\u003c/kbd\u003e \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eS\u003c/kbd\u003e | Show source of function using word before cursor. | \u003cimg width=\"623\" alt=\"Screenshot 2023-04-04 at 17 26 47\" src=\"https://user-images.githubusercontent.com/290596/229841609-293435c2-0d4e-4720-84c0-507448568a45.png\"\u003e |\n|\u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eX\u003c/kbd\u003e \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eX\u003c/kbd\u003e| Searches [clojuredocs](https://clojuredocs.org/core-library) for examples using word before cursor. |\u003cimg width=\"623\" alt=\"Screenshot 2023-04-04 at 15 32 26\" src=\"https://user-images.githubusercontent.com/290596/229809276-26bb6fa2-e780-40f6-94d3-80a0662af1ec.png\"\u003e|\n| \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eR\u003c/kbd\u003e \u003ckbd\u003eSearch term\u003c/kbd\u003e \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eR\u003c/kbd\u003e (backward) / \u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eS\u003c/kbd\u003e (forward) | Searches history for commands containing \u003ckbd\u003eSearch term\u003c/kbd\u003e | ![deps-try-search-history](https://user-images.githubusercontent.com/290596/229847045-d0ec6d88-4ecd-4114-bf17-e1f09b4a64e6.gif)|\n| \u003ckbd\u003eEsc\u003c/kbd\u003e/\u003ckbd\u003eAlt\u003c/kbd\u003e + \u003ckbd\u003eReturn\u003c/kbd\u003e | Insert newline (where \u003ckbd\u003eReturn\u003c/kbd\u003e would otherwise submit line). | ![deps-try-insert-newline](https://user-images.githubusercontent.com/290596/229849928-c9532a81-4eda-4334-bbde-ca6acbf7a4ab.gif)|\n| \u003ckbd\u003eCode\u003c/kbd\u003e + \u003ckbd\u003e↑\u003c/kbd\u003e | Searches history for lines starting with \u003ckbd\u003eCode\u003c/kbd\u003e (e.g. find all requires, defs etc). | ![deps-try-arrow-up](https://user-images.githubusercontent.com/290596/229852412-12539ee4-0d17-4de9-937d-19060306908d.gif) |\n| \u003ckbd\u003eAlt\u003c/kbd\u003e + \u003ckbd\u003ep\u003c/kbd\u003e / \u003ckbd\u003eAlt\u003c/kbd\u003e + \u003ckbd\u003en\u003c/kbd\u003e | Step back-/forward through history _without_ stepping through every line of a history item (as \u003ckbd\u003e↑\u003c/kbd\u003e/\u003ckbd\u003e↓\u003c/kbd\u003e do).| |\n\n\n## FAQ\n\n\u003ca name=\"use_rebel_readline\"\u003e\u003c/a\u003e\n### How to use the vendored rebel-readline in isolation?\n\nI got you:  \n\n```bash\n$ clojure -Sdeps '{:deps {com.github.eval/deps-try {:deps/root \"vendor/rebel-readline/rebel-readline\" :git/sha \"3781e67c3afae3b51f414db1b12abe5ff33d480b\"}}}' -m rebel-readline.main\n```\n\n\n## Credits\n\nBig thanks to [Bruce Hauman](https://github.com/bhauman) and contributors for creating [rebel-readline](https://github.com/bhauman/rebel-readline) 🌸.  \nWhile the [GitHub contributors page](https://github.com/eval/deps-try/graphs/contributors) now only shows a meager 1 commit from [Bruce Hauman](https://github.com/bhauman), this couldn't be farther from the truth obviously.  \nBig thanks to [Avery Quinn](https://github.com/avescodes) for coming up with [lein-try](https://github.com/avescodes/lein-try) which inspired the creation of this project (once tools-deps came out).\n\n## LICENSE\n\nCopyright (c) 2024 Gert Goet, ThinkCreate.\nDistributed under the MIT license. See LICENSE.\n\nCode in vendor/rebel-readline originates from [rebel-readline](https://github.com/bhauman/rebel-readline) which is covered by the Eclipse Public License either version 1.0 or (at your option) any later version.\n\n","funding_links":["https://github.com/sponsors/eval","https://opencollective.com/eval","https://polar.sh/eval","https://getalby.com/p/eval"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feval%2Fdeps-try","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feval%2Fdeps-try","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feval%2Fdeps-try/lists"}