{"id":21804864,"url":"https://github.com/pez/clojure-clr-starter","last_synced_at":"2025-10-08T06:41:56.381Z","repository":{"id":163298965,"uuid":"638660220","full_name":"PEZ/clojure-clr-starter","owner":"PEZ","description":"A Dockerized mini-project for testing ClojureCLR","archived":false,"fork":false,"pushed_at":"2024-07-07T22:30:28.000Z","size":35,"stargazers_count":20,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T19:42:54.059Z","etag":null,"topics":["clojure","clojure-clr"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PEZ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"github":["PEZ"]}},"created_at":"2023-05-09T20:35:50.000Z","updated_at":"2025-04-11T13:12:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"198bfb30-091a-4412-9f0e-6d48630ae851","html_url":"https://github.com/PEZ/clojure-clr-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/PEZ/clojure-clr-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PEZ%2Fclojure-clr-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PEZ%2Fclojure-clr-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PEZ%2Fclojure-clr-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PEZ%2Fclojure-clr-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PEZ","download_url":"https://codeload.github.com/PEZ/clojure-clr-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PEZ%2Fclojure-clr-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278903017,"owners_count":26065786,"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-10-08T02:00:06.501Z","response_time":56,"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":["clojure","clojure-clr"],"created_at":"2024-11-27T11:57:11.772Z","updated_at":"2025-10-08T06:41:56.338Z","avatar_url":"https://github.com/PEZ.png","language":"Clojure","funding_links":["https://github.com/sponsors/PEZ"],"categories":[],"sub_categories":[],"readme":"# A Dockerized CLojureCLR Starter Project\n\nPowered by [clr.tools.nrepl](https://github.com/clojure/clr.tools.nrepl)\n\nDo you want to try [ClojureCLR](https://github.com/clojure/clojure-clr) out quickly and easily in your Clojure editor of choice? Then this mini-project might be for you.\n\n## Prerequisites\n\n1. You have Docker installed\n2. You have a Clojure editor that can connect to an [nREPL](https://nrepl.org/) server\n3. You know some Clojure and how to connect your editor to a REPL\n\nIf you don't ”know some Clojure”, please see: https://calva.io/get-started-with-clojure/\n\n## Preparation\n\n1. Fork or make a copy of this repository\n2. Clone to your computer\n3. From a terminal in the project root:\n    ```sh\n    docker compose build\n    docker compose up -d\n    ```\n\nThis will create and start the Docker composition consisting of one service named `dotnet-clojure`. This is where we will start the project and its nREPL server.\n\n## Start the REPL and Connect your Editor\n\n### If you are using [Calva](https://calva.io)\n\nYou can now start the project REPL and connect it with the command **Calva: Start a Project REPL and Connect (a.k.a.Jack-in)**, \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003ealt\u003c/kbd\u003e+\u003ckbd\u003ec\u003c/kbd\u003e \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003ealt\u003c/kbd\u003e+\u003ckbd\u003ej\u003c/kbd\u003e\n\nYou can also choose to start the REPL manually (as per [below](#start-the-repl)) and use the command **Calva: Connect to a Running REPL in your Project**, \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003ealt\u003c/kbd\u003e+\u003ckbd\u003ec\u003c/kbd\u003e \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003ealt\u003c/kbd\u003e+\u003ckbd\u003ec\u003c/kbd\u003e\nThis has the benefit that the REPL will keep running in the docker container when you close the project, and Calva will reconnect it automatically whenever you open the project.\n\nIf you are using some other editor, please read on.\n\n### Start the REPL\n\nFrom a terminal in the project root:\n\n```sh\ndocker compose exec -it dotnet-clojure /app/docker/start-repl.sh\n```\n\n### Connect your Editor\n\nWhen the command above prints:\n\n```\nStarted nREPL server at localhost:6667\n```\n\nyou can connect your editor to the REPL and hack away.\n\n## Restarting the REPL\n\nThe way that the REPL is run with this setup, it will continue to run until you kill it inside the docker container (or maybe it crashes for some reason). Depending on your Docker fu, you can restart the REPL in there, or you can simply restart the container:\n\n```sh\ndocker compose down\ndocker compose up -d\n```\n\nThen [Start the REPL](#start-the-repl-and-connect-your-editor) again.\n\n## Running the example app\n\nIf you want to run the example app from the command line, without involving a REPL, you can do so by calling `Clojure.Main -m starter.hello`. You will need to populate the `CLOJURE_LOAD_PATH`. \n\n```sh\n$ docker-compose exec -e CLOJURE_LOAD_PATH=src dotnet-clojure Clojure.Main -m starter.hello\n```\n\nIf you have .Net and ClojureCLR installed, you can run it without involving Docker. E.g. on a Windows box:\n\n```ps\n$Env:CLOJURE_LOAD_PATH='src'; Clojure.Main -m starter.hello\n```\n\n## About the `deps.edn` file\n\nIt might look like this is a tools.deps project, but we only use it to download dependencies and build a CLOJURE_LOAD_PATH (ClojureCLR's version of the classpath).\n\nThe `docker compose up` command will result in the creation of a directory `dependencies` in the root of the repository with:\n1. The unpacked jar files for the dependencies identified and downloaded by `tools.deps`\n1. A `loadpath.sh` file, that will be sourced by [the script](docker/start-repl.sh) starting the REPL\n\nPlease see [How to create a really simple ClojureCLR dependency tool](https://blog.agical.se/en/posts/how-to-create-a-really-simple-clojureclr-dependency-tool/) for details and a description of how the ”tooling” of this project is set up.\n\n## WIP\n\nI know almost nothing about .Net and actually have not much clue what I am doing. Expect this project to change as I figure things out a bit. Please don't hesitate to file issues and PRs! 🙏\n\nClojureCLR is also work in progress as is the nrepl server we are using here.\n\n## Quirks\n\nWhen using Calva Jack-in (letting Calva start the project and connect), the REPL process keeps running in the container even when the Jack-in is killed from Calva. Jacking in again from this state will fail. You can reconnect to the REPL with the Calva Connect command instead. To kill the REPL, do someting like: `docker compose down \u0026\u0026 docker compose up`.\n\n## License\n\nSee [LICENSE.md](LICENSE.md) (TL;DR: 🗽)\n\n## Happy Coding! ♥️\n\nPlease don't hesitate to file issues and PRs to improve this example project.\n\nYou find me in the `#clr` and `#calva` (and many other) channels on the [Clojurians Slack](http://clojurians.net/).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpez%2Fclojure-clr-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpez%2Fclojure-clr-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpez%2Fclojure-clr-starter/lists"}