Efrit: A native elisp coding agent running in Emacs

(github.com)

88 points | by simonpure 7 hours ago ago

15 comments

  • xrd 2 hours ago ago

    I'm fascinated by this and the recent claude-code-ide package: https://github.com/manzaltu/claude-code-ide.el

    But, I cannot seem to get past this error when I run claude-code-ide: "Symbol’s function definition is void: project-root" I know this is defined in project.el, but claude has been surprisingly unhelpful at fixing this issue.

    I'm feeling a bit frustrated by the state of emacs packages lately. I've used emacs for 30 years and it feels like things are getting worse.

    • _steve_yegge_ 2 hours ago ago

      I'm sorry it's not working. I've used emacs for almost 40 years and I'm definitely contributing to it being worse, by uploading efrit in its current state. But people were asking me for it. Damned if you do and all that.

      I'm more than happy to work with you to get it working, with the caveat that it actually kind of sucks right now. It's no Claude Code. But I am quickly evolving it in that direction.

    • xrd 2 hours ago ago

      This project does not work for me either. Drat.

        This is turn 4. Focus on any remaining tasks that haven't been completed yet.   Don't repeat work that was already done in previous turns.
        Assistant: I notice from the context that we're in a directory that might be related to a xxx project. Let me try to find and open the yyyy.ts file.                                                               
        [Result: Error: Unknown tool 'resolve_path']
      • _steve_yegge_ 2 hours ago ago

        Yeah it really kind of sucks right now, it's more of a proof of concept.

        I'm working on evolving it into something that's not so transactional -- it will work more like claude code. Didn't realize it was going to hit the front page today. I'll poke at it this weekend and send an update.

        • xrd 2 hours ago ago

          Ok, I might have to frame this comment. I'm a big fan.

          After reading your wikipedia page, I didn't realize we were both at UWash CS at the same time. Small world.

  • jwmcq 4 hours ago ago

    I wonder if this could be updated to use OpenRouter in a similar way to Emigo[1] was aiming to do.

    (I use the past tense, because Emigo has not been updated in a quarter of a year, which seems as if it may as well be decades in the timeline of this sort of stuff.)

    [1] https://github.com/MatthewZMD/emigo

  • Bilal_io 5 hours ago ago

    Clever name. For thos curious Efrit is Genie in Arabic and possibly the same in neighboring languages such as Persian and Turkish..

    • dragonwriter 5 hours ago ago

      > For thos curious Efrit is Genie in Arabi

      More precisely, as I understand it, “genie" is an anglicization of its Arabic equivalent, “jinn"; Efrit is a specific kind of jinn.

    • wging 3 hours ago ago

      I think it might be 'e' for 'emacs' (there's precedent: eglot, eldoc, eshell, erc, emms) combined with 'ifrit', since "efrit" is a much less common spelling.

      • _steve_yegge_ 2 hours ago ago

        Yes, that's exactly why I chose it. It starts with an 'e' and it's not a super common spelling, so it wasn't taken.

      • onehair 3 hours ago ago

        Countries of origin kind of affect what's common. Where I'm from will write it efrit

  • foobarqux 5 hours ago ago

    I managed to get this working with gemini by using a proxy [1] and the following config (I used quelpa)

        (use-package efrit
        :quelpa (efrit :fetcher git :repo "steveyegge/efrit")
        :init
        (setq efrit-model "gemini-2.5-pro")
        ;; (setq efrit-api-url "https://generativelanguage.googleapis.com/v1beta/opena
        (setq efrit-api-url "http://127.0.0.1:8089/v1/messages")
        :config (defun efrit--get-api-key () (key-from-file "~/.keys/gemini.txt")) ; this isn't needed, it's set by the proxy
        :ensure t)
    
    I needed to remove the uvicorn version constraint when importing the project to uv to get it to find a version solution.

    Initially I thought you could send it directly to Gemini but apparently you need to proxy and translate the responses.

    [1] Seems sketchy, use at your risk: https://github.com/coffeegrind123/gemini-for-claude-code

    • _steve_yegge_ 2 hours ago ago

      Congrats on getting it running! This thing is a huge POC (and arguably a POS) so be careful with it.

      It's terrible at multi-step tasks right now. I'm evolving it to work more like claude code.

  • cmrdporcupine 6 hours ago ago

    Neat. As a Claude Code plan user can I use this ? I've never tried the API access method.

    Claude is remarkably effective at writing elisp I surprisingly found. I had it whip up a mode today for something today (Notation3/N3 RDF triples) complete with etags support, etc. and it just... did it.