Now Reading
shell-maker, a maker of Emacs shells

shell-maker, a maker of Emacs shells

2023-04-09 04:23:19

A couple of weeks in the past, I wrote about an experiment to deliver ChatGPT to Emacs as a shell. I used to be pretty new to each ChatGPT and constructing something on prime of comint. It was a enjoyable train, which additionally generated some curiosity.

As talked about within the earlier put up, I took inspiration in different Emacs packages (primarily ielm) to determine what I wanted from comint. Quickly, I obtained ChatGPT working.


As I used to be taking a look at OpenAI API docs, I realized about DALL-E: “an AI system that may create lifelike photos and artwork from an outline in pure language.”

Like ChatGPT, in addition they provided an API to DALL-E, so I figured I could as properly attempt to write a shell for that too… and I did.


There was fairly a little bit of code duplication between the 2 Emacs shells I had simply written. On the similar time, I began listening to from people about integrating different instruments, some cloud-based, some native, proprietary, open supply.. There’s Cody, invoke-ai, llama.cpp, alpaca.cpp, and the checklist continues to develop.

With that in thoughts, I got down to cut back the code duplication and consolidate right into a reusable package deal. And so shell-maker was born, a maker of Emacs shells.

shell-maker‘s internals aren’t too completely different from the code I had earlier than. It is nonetheless powered by comint, however as an alternative presents a reusable comfort wrapper.

It takes little code to implement a shell, like the delicate new greeter-shell 😉

See Also


(require 'shell-maker)

(defvar greeter-shell--config
   :identify "Greeter"
   (lambda (command _history callback error-callback)
     (funcall callback
              (format "Whats up "%s"" command)

(defun greeter-shell ()
  "Begin a Greeter shell."
  (shell-maker-start greeter-shell--config))

shell-maker is offered on GitHub and at present bundled with chatgpt-shell. If there’s sufficient curiosity and utilization, I could break it out into its personal package deal. For now, it is handy to maintain with chatgpt-shell and dall-e-shell.

If you happen to plug shell-maker into different instruments, I would love to listen to about it.

Completely satisfied shell making!

Source Link

What's Your Reaction?
In Love
Not Sure
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top