{"id":15063587,"url":"https://github.com/mjrusso/nexrepl","last_synced_at":"2025-09-02T20:51:11.029Z","repository":{"id":257708870,"uuid":"844819349","full_name":"mjrusso/nexrepl","owner":"mjrusso","description":"Experimental Elixir nREPL server","archived":false,"fork":false,"pushed_at":"2024-09-19T01:31:01.000Z","size":22,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T11:39:59.084Z","etag":null,"topics":["elixir","elixir-lang","nrepl","nrepl-server"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mjrusso.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":"2024-08-20T03:10:01.000Z","updated_at":"2025-01-23T14:52:36.000Z","dependencies_parsed_at":"2024-09-18T07:32:06.974Z","dependency_job_id":"5f871df9-3471-4dfd-b3e5-0fa7d80f87a8","html_url":"https://github.com/mjrusso/nexrepl","commit_stats":null,"previous_names":["mjrusso/nexrepl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mjrusso/nexrepl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjrusso%2Fnexrepl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjrusso%2Fnexrepl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjrusso%2Fnexrepl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjrusso%2Fnexrepl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mjrusso","download_url":"https://codeload.github.com/mjrusso/nexrepl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjrusso%2Fnexrepl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264446716,"owners_count":23609632,"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":["elixir","elixir-lang","nrepl","nrepl-server"],"created_at":"2024-09-25T00:04:40.099Z","updated_at":"2025-07-09T11:07:02.444Z","avatar_url":"https://github.com/mjrusso.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nexREPL\n\nAn experimental (proof of concept) Elixir\n[nREPL](https://nrepl.org/nrepl/index.html) server.\n\n## Demo\n\nSee [this tweet](https://twitter.com/mjrusso/status/1836458349463847153).\n\n## Rationale and Motivation\n\n### Why?\n\nElixir ships with an excellent REPL ([IEx](https://hexdocs.pm/iex/IEx.html)),\nwhich even supports [remote\nshells](https://hexdocs.pm/iex/IEx.html#module-remote-shells) out-of-the-box.\nHowever, there's no standard way to evaluate the code you're writing in your\neditor directly in the context of an IEx session.\n\nThe Clojure community uses [nREPL](https://nrepl.org/nrepl/index.html) to\nintegrate their editor with their REPL. nREPL doesn't seem to have taken off\noutside of the Clojure ecosystem, but the protocol is\n[language-agnostic](https://nrepl.org/nrepl/index.html#beyond-clojure), and\nthere are already [ready-made clients for most\neditors](https://nrepl.org/nrepl/usage/clients.html).\n\nIf IEx could understand the nREPL protocol, that would theoretically turn all\nthe red cells to green in the IEx column of [Thomas\nMillar](https://github.com/thmsmlr)'s Elixir scripting spreadsheet (see [this\ntweet](https://x.com/thmsmlr/status/1814354658858524944)).\n\n### Why Not?\n\nThis project validates that an Elixir nREPL server works with existing\n(non-Elixir) nREPL clients.\n\nHowever, to actually make this approach viable for development, nREPL features\nlike evaluating the expression at the current point need to work. This requires\nsome understanding of the structure of Elixir code; the core logic for teasing\nout the structure could live in the nREPL client exclusively, or alternatively\nprimarily on the server.\n\nIn either case, unfortunately, client modifications will be necessary. Thus,\none of the major benefits of using nREPL in the first place (existing clients\nare already written for most editors) is no longer that helpful.\n\n### A Potential Path Forward\n\nWhat if instead we implemented similar functionality using the LSP, perhaps\npiggybacking on a new \"eval code\" [Code\nAction](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_codeAction)\nrequest? With this approach, the client problem is solved, and the LSP server\n(which understands code structure) could send the code directly to a networked\nIEx shell for evaluation, providing the same benefits as nREPL.\n\n### Additional Discussion\n\nSee [this\nthread](https://elixirforum.com/t/extending-iex-to-have-nrepl-capabilities/64872)\non Elixir Forum.\n\n## Installation\n\nTo install from GitHub, run:\n\n    mix archive.install github mjrusso/nexrepl\n\nTo build and install locally, first ensure any previous archive versions are\nremoved:\n\n    $ mix archive.uninstall nexrepl\n\nAnd then run:\n\n    $ MIX_ENV=prod mix do archive.build, archive.install\n\n## Usage\n\nFirst, ensure that your editor has an nREPL client installed and configured\n(see [this list](https://nrepl.org/nrepl/usage/clients.html)).\n\nFor example, here's what configuration in Emacs could look like (at least for\nthose of use that use [straight.el](https://github.com/raxod502/straight.el)\nwith [use-package](https://github.com/jwiegley/use-package)):\n\n``` emacs-lisp\n(use-package rail\n  :straight (rail :type git :host github :repo \"Sasanidas/Rail\"))\n```\n\n([Rail](https://github.com/Sasanidas/Rail) is a generic nREPL client for Emacs\nthat does not assume a Clojure server.)\n\nNext, start the nREPL server on the default port (`7888`):\n\n``` shell\niex -S mix nexrepl\n```\n\nThen start editing a new or existing Elixir file.\n\nFinally, using the nREPL client you've already configured, start a new nREPL\nsession, and start evaluating code. (For example, in Emacs with Rail: start a\nnew session with `M-x rail`, select a region, and then evaluate the region with\n`M-x rail-eval-region`.)\n\n## License\n\nnexREPL is released under the terms of the [Apache License 2.0](LICENSE).\nIncludes vendored code from [Bento](https://github.com/folz/bento); see\n[NOTICE](NOTICE) for details.\n\nCopyright (c) 2024, [Michael Russo](https://mjrusso.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjrusso%2Fnexrepl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmjrusso%2Fnexrepl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjrusso%2Fnexrepl/lists"}