{"id":13569008,"url":"https://github.com/xenodium/chatgpt-shell","last_synced_at":"2025-05-14T18:06:55.845Z","repository":{"id":144720095,"uuid":"616363358","full_name":"xenodium/chatgpt-shell","owner":"xenodium","description":"A multi-llm Emacs shell (ChatGPT, Claude, DeepSeek, Gemini, Kagi, Ollama, Perplexity) + editing integrations","archived":false,"fork":false,"pushed_at":"2025-05-10T08:30:45.000Z","size":58392,"stargazers_count":1038,"open_issues_count":46,"forks_count":93,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-05-10T09:29:24.142Z","etag":null,"topics":["chatgpt","dall-e","emacs","org-mode"],"latest_commit_sha":null,"homepage":"https://lmno.lol/alvaro","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xenodium.png","metadata":{"files":{"readme":"README.org","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,"zenodo":null}},"created_at":"2023-03-20T08:40:56.000Z","updated_at":"2025-05-10T08:30:48.000Z","dependencies_parsed_at":"2023-12-17T21:25:13.464Z","dependency_job_id":"8316d425-3147-49f8-871c-e2bab6ae1b01","html_url":"https://github.com/xenodium/chatgpt-shell","commit_stats":{"total_commits":1062,"total_committers":46,"mean_commits":23.08695652173913,"dds":0.1487758945386064,"last_synced_commit":"42a4ff4e2d9293278c6bf055d87ac6565722ed86"},"previous_names":[],"tags_count":68,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xenodium%2Fchatgpt-shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xenodium%2Fchatgpt-shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xenodium%2Fchatgpt-shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xenodium%2Fchatgpt-shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xenodium","download_url":"https://codeload.github.com/xenodium/chatgpt-shell/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198515,"owners_count":22030966,"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":["chatgpt","dall-e","emacs","org-mode"],"created_at":"2024-08-01T14:00:34.736Z","updated_at":"2025-05-14T18:06:50.836Z","avatar_url":"https://github.com/xenodium.png","language":"Emacs Lisp","funding_links":["https://github.com/sponsors/xenodium"],"categories":["CLIs","Chat UIs","Editors","Emacs Lisp","UIs"],"sub_categories":["Emacs","Command-line(shell) interface"],"readme":"👉 [[https://github.com/sponsors/xenodium][Support this work via GitHub Sponsors]]\n\n[[https://stable.melpa.org/#/chatgpt-shell][file:https://stable.melpa.org/packages/chatgpt-shell-badge.svg]] [[https://melpa.org/#/chatgpt-shell][file:https://melpa.org/packages/chatgpt-shell-badge.svg]]\n\n* chatgpt-shell\n\nA multi-llm Emacs [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Shell-Prompts.html][comint]] shell, by [[https://lmno.lol/alvaro][me]].\n\n* Related packages\n\n- [[https://github.com/xenodium/ob-chatgpt-shell][ob-chatgpt-shell]]: Evaluate chatgpt-shell blocks as Emacs org babel blocks.\n- [[https://github.com/xenodium/ob-dall-e-shell][ob-dall-e-shell]]: Evaluate DALL-E shell blocks as Emacs org babel blocks.\n- [[https://github.com/xenodium/dall-e-shell][dall-e-shell]]: An Emacs shell for OpenAI's DALL-E.\n- [[https://github.com/xenodium/shell-maker][shell-maker]]: Create Emacs shells backed by either local or cloud services.\n\n* News\n\nchatgpt-shell goes multi model 🎉\n\nPlease sponsor the project to make development + support sustainable.\n\n| Provider   | Model         | Supported | Setup                            |\n|------------+---------------+-----------+----------------------------------|\n| Anthropic  | Claude        | Yes       | Set =chatgpt-shell-anthropic-key=  |\n| Deepseek   | Chat/Reasoner | New 💫   | Set =chatgpt-shell-deepseek-key=   |\n| Google     | Gemini        | Yes       | Set =chatgpt-shell-google-key=     |\n| Kagi       | Summarizer    | Yes       | Set =chatgpt-shell-kagi-key=       |\n| Ollama     | Llama         | Yes       | Install [[https://ollama.com/][Ollama]]                   |\n| OpenAI     | ChatGPT       | Yes       | Set =chatgpt-shell-openai-key=     |\n| OpenRouter | Various       | Yes       | Set =chatgpt-shell-openrouter-key= |\n| Perplexity | Llama Sonar   | Yes       | Set =chatgpt-shell-perplexity-key= |\n\nNote: With the exception of [[https://ollama.com/][Ollama]], you typically have to pay the cloud services for API access. Please check with each respective LLM service.\n\nMy favourite model is missing.\n\n| [[https://github.com/xenodium/chatgpt-shell/issues][File a feature request]] | [[https://github.com/sponsors/xenodium][sponsor the work]] |\n\n** A familiar shell\n\nchatgpt-shell is a [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Shell-Prompts.html][comint]] shell. Bring your favourite Emacs shell flows along.\n\n#+HTML: \u003cimg src=\"https://raw.githubusercontent.com/xenodium/chatgpt-shell/main/demos/cyberpunk.gif\" width=\"80%\" /\u003e\n\n** Swap models\n\nOne shell to query all. Swap LLM provider (via =M-x chatgpt-shell-swap-model=) and continue with your familiar flow.\n\n#+HTML: \u003cimg src=\"https://raw.githubusercontent.com/xenodium/chatgpt-shell/main/demos/multi-model-shell.gif\" width=\"80%\" /\u003e\n\n** A shell hybrid\n\n=chatgpt-shell= includes a compose buffer experience. This is my favourite and most frequently used mechanism to interact with LLMs.\n\nFor example, select a region and invoke =M-x chatgpt-shell-prompt-compose= (=C-c C-e= is my preferred binding), and an editable buffer automatically copies the region and enables crafting a more thorough query. When ready, submit with the familiar =C-c C-c= binding. The buffer automatically becomes read-only and enables single-character bindings.\n\n#+HTML: \u003cimg src=\"https://raw.githubusercontent.com/xenodium/chatgpt-shell/main/demos/compose.gif\" width=\"80%\" /\u003e\n\n*** Navigation: n/p (or TAB/shift-TAB)\n\nNavigate through source blocks (including previous submissions in history). Source blocks are automatically selected.\n\n*** Reply: r\n\nReply with with follow-up requests using the =r= binding.\n\n*** Give me more: m\n\nWant to ask for more of the same data? Press =m= to request more of it. This is handy to follow up on any kind of list (suggestion, candidates, results, etc).\n\n*** Quick quick: q\n\nI'm a big fan of quickly disposing of Emacs buffers with the =q= binding. chatgpt-shell compose buffers are no exception.\n\n*** Request entire snippets: e\n\nLLM being lazy and returning partial code? Press =e= to request entire snippet.\n\n** Confirm inline mods (via diffs)\n\nRequest inline modifications, with explicit confirmation before accepting.\n\n#+HTML: \u003cimg src=\"https://raw.githubusercontent.com/xenodium/chatgpt-shell/main/demos/quick-insert.gif\" width=\"80%\" /\u003e\n\n** Execute snippets (a la [[https://orgmode.org/worg/org-contrib/babel/intro.html][org babel]])\n\nBoth the shell and the compose buffers enable users to execute source blocks via =C-c C-c=, leveraging [[https://orgmode.org/worg/org-contrib/babel/intro.html][org babel]].\n\n#+HTML: \u003cimg src=\"https://raw.githubusercontent.com/xenodium/chatgpt-shell/main/demos/swiftui.gif\" width=\"80%\" /\u003e\n\n** Vision experiments\n\nI've been experimenting with image queries (currently ChatGPT only, please [[https://github.com/sponsors/xenodium][sponsor]] to help bring support for others).\n\nBelow is a handy integration to extract Japanese vocabulary. There's also a generic image descriptor available via =M-x chatgpt-shell-describe-image= that works on any Emacs image (via dired, image buffer, point on image, or selecting a desktop region).\n\n#+HTML: \u003cimg src=\"https://raw.githubusercontent.com/xenodium/chatgpt-shell/main/demos/japanese-weekdays.gif\" width=\"80%\" /\u003e\n\n* Support this effort\n\nIf you're finding =chatgpt-shell= useful, help make the project sustainable and consider ✨[[https://github.com/sponsors/xenodium][sponsoring]]✨.\n\n=chatgpt-shell= is in development. Please report issues or send [[https://github.com/xenodium/chatgpt-shell/pulls][pull requests]] for improvements.\n\n* Like this package? Tell me about it 💙\n\nFinding it useful? Like the package? I'd love to hear from you. Get in touch ([[https://indieweb.social/@xenodium][Mastodon]] / [[https://twitter.com/xenodium][Twitter]] / [[https://bsky.app/profile/xenodium.bsky.social][Bluesky]] / [[https://www.reddit.com/user/xenodium][Reddit]] / [[mailto:me__AT__xenodium.com][Email]]).\n\n* Install\n\n** MELPA\n\nVia [[https://github.com/jwiegley/use-package][use-package]], you can install with =:ensure t=.\n\n#+begin_src emacs-lisp :lexical no\n  (use-package chatgpt-shell\n    :ensure t\n    :custom\n    ((chatgpt-shell-openai-key\n      (lambda ()\n        (auth-source-pass-get 'secret \"openai-key\")))))\n#+end_src\n\n** Straight\n\n#+begin_src emacs-lisp :lexical no\n  (use-package shell-maker\n    :straight (:type git :host github :repo \"xenodium/shell-maker\" :files (\"shell-maker*.el\")))\n\n  (use-package chatgpt-shell\n    :straight (:type git :host github :repo \"xenodium/chatgpt-shell\" :files (\"chatgpt-shell*.el\"))\n    :custom\n    ((chatgpt-shell-openai-key\n      (lambda ()\n        (auth-source-pass-get 'secret \"openai-key\")))))\n#+end_src\n\n* Swap models\n** M-x chatgpt-shell-swap-model\n#+HTML: \u003cimg src=\"https://raw.githubusercontent.com/xenodium/chatgpt-shell/main/demos/swap-models.png\" width=\"80%\" /\u003e\n\n* Set default model\n#+begin_src emacs-lisp :lexical no\n  (setq chatgpt-shell-model-version \"llama3.2\")\n#+end_src\n\n* Set API Keys\n\nYou will first need to get an API key for each of the various public LLM endpoints you\nwant to interact with.\n\n| Service    | Model(s)      | Link: get an API Key                                                                      |\n|------------|---------------|-------------------------------------------------------------------------------------------|\n| OpenAI     | ChatGPT       | [[https://platform.openai.com/account/api-keys][Get an API Key]]                          |\n| Anthropic  | Claude        | [[https://console.anthropic.com/dashboard][Visit the Dashboard]]                          |\n| Deepseek   | Chat/Reasoner | [[https://platform.deepseek.com/api_keys][Get an API Key]]                                |\n| Google     | Gemini        | [[https://aistudio.google.com/app/apikey][Get an API Key]]                                |\n| Kagi       | Summarizer    | [[https://kagi.com/settings?p=api][Get an API Key]]                                       |\n| OpenRouter | Various       | [[https://openrouter.ai/settings/keys][Manage your API keys]]                             |\n| Perplexity | Llama Sonar   | [[https://docs.perplexity.ai/guides/getting-started#generate-an-api-key][Get an API Key]] |\n\n\n** Provide the API Key to ChatGPT via a function\n\nYou can define a function that chatgpt-shell invokes to get the API Key. The\nfollowing example is for Open AI; use a similar approach for other services.\n \n#+begin_src emacs-lisp\n  ;; if you are using the \"pass\" password manager\n  (setq chatgpt-shell-openai-key\n        (lambda ()\n          ;; (auth-source-pass-get 'secret \"openai-key\") ; alternative using pass support in auth-sources\n          (nth 0 (process-lines \"pass\" \"show\" \"openai-key\"))))\n\n  ;; or if using auth-sources, e.g., so the file ~/.authinfo has this line:\n  ;;  machine api.openai.com password OPENAI_KEY\n  (setq chatgpt-shell-openai-key\n        (auth-source-pick-first-password :host \"api.openai.com\"))\n\n  ;; or same as previous but lazy loaded (prevents unexpected passphrase prompt)\n  (setq chatgpt-shell-openai-key\n        (lambda ()\n          (auth-source-pick-first-password :host \"api.openai.com\")))\n#+end_src\n\n** Set the appropriate variable Manually/Interactively\n\n=M-x set-variable chatgpt-shell-anthropic-key=\n\n=M-x set-variable chatgpt-shell-deepseek-key=\n\n=M-x set-variable chatgpt-shell-google-key=\n\n...\n\n** Set the appropriate variable programatically, in your emacs init file\n#+begin_src emacs-lisp\n  ;; set anthropic key from a string\n  (setq chatgpt-shell-anthropic-key \"my anthropic key\")\n  ;; set OpenAI key from the environment\n  (setq chatgpt-shell-openai-key (getenv \"OPENAI_API_KEY\"))\n\n#+end_src\n\n* ChatGPT through proxy service\n\nIf you use ChatGPT through proxy service \"https://api.chatgpt.domain.com\", set options like the following:\n\n#+begin_src emacs-lisp :lexical no\n  (use-package chatgpt-shell\n    :ensure t\n    :custom\n    ((chatgpt-shell-api-url-base \"https://api.chatgpt.domain.com\")\n     (chatgpt-shell-openai-key\n      (lambda ()\n        ;; Here the openai-key should be the proxy service key.\n        (auth-source-pass-get 'secret \"openai-key\")))))\n#+end_src\n\nIf your proxy service API path is not OpenAI ChatGPT default path like \"=/v1/chat/completions=\", then\nyou can customize option ~chatgpt-shell-api-url-path~.\n\n* Using ChatGPT through HTTP(S) proxy\n\nBehind the scenes chatgpt-shell uses =curl= to send requests to the openai server.\nIf you use ChatGPT through a HTTP proxy (for example you are in a corporate network and a HTTP proxy shields the corporate network from the internet), you need to tell =curl= to use the proxy via the curl option =-x http://your_proxy=.\nFor this, use =chatgpt-shell-proxy=.\n\nFor example, if you want curl =-x= and =http://your_proxy=, set =chatgpt-shell-proxy= to \"=http://your_proxy=\".\n* Launch\n\nLaunch with =M-x chatgpt-shell=.\n\nNote: =M-x chatgpt-shell= keeps a single shell around, refocusing if needed. To launch multiple shells, use =C-u M-x chatgpt-shell=.\n\n* Clear buffer\n\nType =clear= as a prompt.\n\n#+begin_src sh\n  ChatGPT\u003e clear\n#+end_src\n\nAlternatively, use either =M-x chatgpt-shell-clear-buffer= or =M-x comint-clear-buffer=.\n\n* Saving and restoring\n\nSave with =M-x chatgpt-shell-save-session-transcript= and restore with =M-x chatgpt-shell-restore-session-from-transcript=.\n\nSome related values stored in =shell-maker= like =shell-maker-transcript-default-path= and =shell-maker-forget-file-after-clear=.\n\n* Streaming\n\n=chatgpt-shell= can either wait until the entire response is received before displaying, or it can progressively display as chunks arrive (streaming).\n\nStreaming is enabled by default. =(setq chatgpt-shell-streaming nil)= to disable it.\n\n* chatgpt-shell customizations\n\n#+BEGIN_SRC emacs-lisp :results table :colnames '(\"Custom variable\" \"Description\") :exports results\n  (let ((rows))\n    (mapatoms\n     (lambda (symbol)\n       (when (and (string-match \"^chatgpt-shell\"\n                                (symbol-name symbol))\n                  (custom-variable-p symbol))\n         (push `(,symbol\n                 ,(car\n                   (split-string\n                    (or (documentation-property symbol 'variable-documentation)\n                        (get (indirect-variable symbol)\n                             'variable-documentation)\n                        (get symbol 'variable-documentation)\n                        \"\")\n                    \"\\n\")))\n               rows))))\n    rows)\n#+END_SRC\n\n#+RESULTS:\n| Custom variable                                                  | Description                                                                  |\n|------------------------------------------------------------------+------------------------------------------------------------------------------|\n| chatgpt-shell-google-api-url-base                                | Google API’s base URL.                                                       |\n| chatgpt-shell-deepseek-api-url-base                              | DeepSeek API’s base URL.                                                     |\n| chatgpt-shell-perplexity-key                                     | Perplexity API key as a string or a function that loads and returns it.      |\n| chatgpt-shell-deepseek-key                                       | DeepSeek key as a string or a function that loads and returns it.            |\n| chatgpt-shell-prompt-header-write-git-commit                     | Prompt header of ‘git-commit‘.                                               |\n| chatgpt-shell-highlight-blocks                                   | Whether or not to highlight source blocks.                                   |\n| chatgpt-shell-display-function                                   | Function to display the shell.  Set to ‘display-buffer’ or custom function.  |\n| chatgpt-shell-prompt-header-generate-unit-test                   | Prompt header of ‘generate-unit-test‘.                                       |\n| chatgpt-shell-prompt-header-refactor-code                        | Prompt header of ‘refactor-code‘.                                            |\n| chatgpt-shell-prompt-header-proofread-region                     | Prompt header used by ‘chatgpt-shell-proofread-region‘.                      |\n| chatgpt-shell-welcome-function                                   | Function returning welcome message or nil for no message.                    |\n| chatgpt-shell-perplexity-api-url-base                            | Perplexity API’s base URL.                                                   |\n| chatgpt-shell-prompt-query-response-style                        | Determines the prompt style when invoking from other buffers.                |\n| chatgpt-shell-model-version                                      | The active model version as either a string.                                 |\n| chatgpt-shell-kagi-key                                           | Kagi API key as a string or a function that loads and returns it.            |\n| chatgpt-shell-logging                                            | Logging disabled by default (slows things down).                             |\n| chatgpt-shell-render-latex                                       | Whether or not to render LaTeX blocks (experimental).                        |\n| chatgpt-shell-api-url-base                                       | OpenAI API’s base URL.                                                       |\n| chatgpt-shell-google-key                                         | Google API key as a string or a function that loads and returns it.          |\n| chatgpt-shell-ollama-api-url-base                                | Ollama API’s base URL.                                                       |\n| chatgpt-shell-openrouter-key                                     | OpenRouter key as a string or a function that loads and returns it.          |\n| chatgpt-shell-babel-headers                                      | Additional headers to make babel blocks work.                                |\n| chatgpt-shell--pretty-smerge-mode-hook                           | Hook run after entering or leaving ‘chatgpt-shell--pretty-smerge-mode’.      |\n| chatgpt-shell-model-filter                                       | A function that is applied ‘chatgpt-shell-models’ to determine               |\n| chatgpt-shell-source-block-actions                               | Block actions for known languages.                                           |\n| chatgpt-shell-default-prompts                                    | List of default prompts to choose from.                                      |\n| chatgpt-shell-anthropic-key                                      | Anthropic API key as a string or a function that loads and returns it.       |\n| chatgpt-shell-prompt-header-eshell-summarize-last-command-output | Prompt header of ‘eshell-summarize-last-command-output‘.                     |\n| chatgpt-shell-system-prompt                                      | The system prompt ‘chatgpt-shell-system-prompts’ index.                      |\n| chatgpt-shell-transmitted-context-length                         | Controls the amount of context provided to chatGPT.                          |\n| chatgpt-shell-root-path                                          | Root path location to store internal shell files.                            |\n| chatgpt-shell-prompt-header-whats-wrong-with-last-command        | Prompt header of ‘whats-wrong-with-last-command‘.                            |\n| chatgpt-shell-read-string-function                               | Function to read strings from user.                                          |\n| chatgpt-shell-after-command-functions                            | Abnormal hook (i.e. with parameters) invoked after each command.             |\n| chatgpt-shell-system-prompts                                     | List of system prompts to choose from.                                       |\n| chatgpt-shell-openai-key                                         | OpenAI key as a string or a function that loads and returns it.              |\n| chatgpt-shell-proxy                                              | When non-nil, use as a proxy (for example http or socks5).                   |\n| chatgpt-shell-prompt-header-describe-code                        | Prompt header of ‘describe-code‘.                                            |\n| chatgpt-shell-insert-dividers                                    | Whether or not to display a divider between requests and responses.          |\n| chatgpt-shell-models                                             | The list of supported models to swap from.                                   |\n| chatgpt-shell-openrouter-api-url-base                            | OpenRouter API’s base URL.                                                   |\n| chatgpt-shell-language-mapping                                   | Maps external language names to Emacs names.                                 |\n| chatgpt-shell-prompt-compose-view-mode-hook                      | Hook run after entering or leaving ‘chatgpt-shell-prompt-compose-view-mode’. |\n| chatgpt-shell-streaming                                          | Whether or not to stream ChatGPT responses (show chunks as they arrive).     |\n| chatgpt-shell-anthropic-api-url-base                             | Anthropic API’s base URL.                                                    |\n| chatgpt-shell-model-temperature                                  | What sampling temperature to use, between 0 and 2, or nil.                   |\n| chatgpt-shell-request-timeout                                    | How long to wait for a request to time out in seconds.                       |\n| chatgpt-shell-kagi-api-url-base                                  | Kagi API’s base URL.                                                         |\n\nThere are more. Browse via =M-x set-variable=\n\n** =chatgpt-shell-display-function= (with custom function)\n\nIf you'd prefer your own custom display function,\n\n#+begin_src emacs-lisp :lexical no\n  (setq chatgpt-shell-display-function #'my/chatgpt-shell-frame)\n\n  (defun my/chatgpt-shell-frame (bname)\n    (let ((cur-f (selected-frame))\n          (f (my/find-or-make-frame \"chatgpt\")))\n      (select-frame-by-name \"chatgpt\")\n      (pop-to-buffer-same-window bname)\n      (set-frame-position f (/ (display-pixel-width) 2) 0)\n      (set-frame-height f (frame-height cur-f))\n      (set-frame-width f  (frame-width cur-f) 1)))\n\n  (defun my/find-or-make-frame (fname)\n    (condition-case\n        nil\n        (select-frame-by-name fname)\n      (error (make-frame `((name . ,fname))))))\n#+end_src\n\nThanks to [[https://github.com/tuhdo][tuhdo]] for the custom display function.\n\n* chatgpt-shell commands\n#+BEGIN_SRC emacs-lisp :results table :colnames '(\"Binding\" \"Command\" \"Description\") :exports results\n  (let ((rows))\n    (mapatoms\n     (lambda (symbol)\n       (when (and (string-match \"^chatgpt-shell\"\n                                (symbol-name symbol))\n                  (commandp symbol))\n         (push `(,(string-join\n                   (seq-filter\n                    (lambda (symbol)\n                      (not (string-match \"menu\" symbol)))\n                    (mapcar\n                     (lambda (keys)\n                       (key-description keys))\n                     (or\n                      (where-is-internal\n                       (symbol-function symbol)\n                       comint-mode-map\n                       nil nil (command-remapping 'comint-next-input))\n                      (where-is-internal\n                       symbol chatgpt-shell-mode-map nil nil (command-remapping symbol))\n                      (where-is-internal\n                       (symbol-function symbol)\n                       chatgpt-shell-mode-map nil nil (command-remapping symbol)))))  \" or \")\n                 ,(symbol-name symbol)\n                 ,(car\n                   (split-string\n                    (or (documentation symbol t) \"\")\n                    \"\\n\")))\n               rows))))\n    rows)\n#+END_SRC\n\n#+RESULTS:\n| Binding              | Command                                             | Description                                                                     |\n|----------------------+-----------------------------------------------------+---------------------------------------------------------------------------------|\n|                      | chatgpt-shell-japanese-lookup                       | Look Japanese term up.                                                          |\n|                      | chatgpt-shell-next-source-block                     | Move point to the next source block's body.                                     |\n|                      | chatgpt-shell-prompt-compose-request-entire-snippet | If the response code is incomplete, request the entire snippet.                 |\n|                      | chatgpt-shell-prompt-compose-request-more           | Request more data.  This is useful if you already requested examples.           |\n|                      | chatgpt-shell-execute-babel-block-action-at-point   | Execute block as org babel.                                                     |\n| C-c C-s              | chatgpt-shell-swap-system-prompt                    | Swap system prompt from `chatgpt-shell-system-prompts'.                         |\n|                      | chatgpt-shell-system-prompts-menu                   | ChatGPT                                                                         |\n|                      | chatgpt-shell-prompt-compose-swap-model-version     | Swap the compose buffer's model version.                                        |\n|                      | chatgpt-shell-describe-code                         | Describe code from region using ChatGPT.                                        |\n| C-\u003cup\u003e or M-p        | chatgpt-shell-previous-input                        | Cycle backwards through input history, saving input.                            |\n|                      | chatgpt-shell-previous-link                         | Move point to the previous link.                                                |\n|                      | chatgpt-shell-prompt-compose-next-item              | Jump to and select next item (request, response, block, link, interaction).     |\n| C-c C-v              | chatgpt-shell-swap-model                            | Swap model version from `chatgpt-shell-models'.                                 |\n| C-x C-s              | chatgpt-shell-save-session-transcript               | Save shell transcript to file.                                                  |\n|                      | chatgpt-shell-proofread-region                      | Proofread text from region using ChatGPT.                                       |\n|                      | chatgpt-shell-prompt-compose-quit-and-close-frame   | Quit compose and close frame if it's the last window.                           |\n|                      | chatgpt-shell-prompt-compose-other-buffer           | Jump to the shell buffer (compose's other buffer).                              |\n|                      | chatgpt-shell                                       | Start a ChatGPT shell interactive command.                                      |\n| RET                  | chatgpt-shell-submit                                | Submit current input.                                                           |\n|                      | chatgpt-shell-prompt-compose-swap-system-prompt     | Swap the compose buffer's system prompt.                                        |\n|                      | chatgpt-shell-describe-image                        | Request OpenAI to describe image.                                               |\n|                      | chatgpt-shell-prompt-compose-search-history         | Search prompt history, select, and insert to current compose buffer.            |\n|                      | chatgpt-shell-prompt-compose-previous-history       | Insert previous prompt from history into compose buffer.                        |\n|                      | chatgpt-shell-delete-interaction-at-point           | Delete interaction (request and response) at point.                             |\n|                      | chatgpt-shell-refresh-rendering                     | Refresh markdown rendering by re-applying to entire buffer.                     |\n|                      | chatgpt-shell-prompt-compose-insert-block-at-point  | Insert block at point at last known location.                                   |\n|                      | chatgpt-shell-explain-code                          | Describe code from region using ChatGPT.                                        |\n|                      | chatgpt-shell-execute-block-action-at-point         | Execute block at point.                                                         |\n|                      | chatgpt-shell-load-awesome-prompts                  | Load `chatgpt-shell-system-prompts' from awesome-chatgpt-prompts.               |\n|                      | chatgpt-shell-write-git-commit                      | Write commit from region using ChatGPT.                                         |\n|                      | chatgpt-shell-restore-session-from-transcript       | Restore session from file transcript (or HISTORY).                              |\n|                      | chatgpt-shell-prompt-compose-next-interaction       | Show next interaction (request / response).                                     |\n| \u003cbacktab\u003e or C-c C-p | chatgpt-shell-previous-item                         | Go to previous item.                                                            |\n|                      | chatgpt-shell-fix-error-at-point                    | Fixes flymake error at point.                                                   |\n|                      | chatgpt-shell-next-link                             | Move point to the next link.                                                    |\n|                      | chatgpt-shell-prompt-appending-kill-ring            | Make a ChatGPT request from the minibuffer appending kill ring.                 |\n|                      | chatgpt-shell-ollama-load-models                    | Query ollama for the locally installed models and add them to                   |\n| C-\u003cdown\u003e or M-n      | chatgpt-shell-next-input                            | Cycle forwards through input history.                                           |\n|                      | chatgpt-shell-prompt-compose-view-mode              | Like `view-mode`, but extended for ChatGPT Compose.                             |\n|                      | chatgpt-shell-clear-buffer                          | Clear the current shell buffer.                                                 |\n|                      | chatgpt-shell-edit-block-at-point                   | Execute block at point.                                                         |\n| \u003ctab\u003e or C-c C-n     | chatgpt-shell-next-item                             | Go to next item.                                                                |\n|                      | chatgpt-shell-prompt-compose-send-buffer            | Send compose buffer content to shell for processing.                            |\n| C-c C-e              | chatgpt-shell-prompt-compose                        | Compose and send prompt from a dedicated buffer.                                |\n|                      | chatgpt-shell-rename-buffer                         | Rename current shell buffer.                                                    |\n|                      | chatgpt-shell-remove-block-overlays                 | Remove block overlays.  Handy for renaming blocks.                              |\n|                      | chatgpt-shell-send-region                           | Send region to ChatGPT.                                                         |\n|                      | chatgpt-shell-send-and-review-region                | Send region to ChatGPT, review before submitting.                               |\n| C-M-h                | chatgpt-shell-mark-at-point-dwim                    | Mark source block if at point.  Mark all output otherwise.                      |\n|                      | chatgpt-shell--pretty-smerge-mode                   | Minor mode to display overlays for conflict markers.                            |\n|                      | chatgpt-shell-mark-block                            | Mark current block in compose buffer.                                           |\n|                      | chatgpt-shell-prompt-compose-reply                  | Reply as a follow-up and compose another query.                                 |\n|                      | chatgpt-shell-prompt-compose-refresh                | Refresh compose buffer content with curernt item from shell.                    |\n|                      | chatgpt-shell-set-as-primary-shell                  | Set as primary shell when there are multiple sessions.                          |\n|                      | chatgpt-shell-rename-block-at-point                 | Rename block at point (perhaps a different language).                           |\n|                      | chatgpt-shell-quick-insert                          | Request from minibuffer and insert response into current buffer.                |\n|                      | chatgpt-shell-reload-default-models                 | Reload all available models.                                                    |\n| S-\u003creturn\u003e           | chatgpt-shell-newline                               | Insert a newline, and move to left margin of the new line.                      |\n|                      | chatgpt-shell-generate-unit-test                    | Generate unit-test for the code from region using ChatGPT.                      |\n|                      | chatgpt-shell-prompt-compose-previous-item          | Jump to and select previous item (request, response, block, link, interaction). |\n|                      | chatgpt-shell-prompt-compose-next-history           | Insert next prompt from history into compose buffer.                            |\n| C-c C-c              | chatgpt-shell-ctrl-c-ctrl-c                         | If point in source block, execute it.  Otherwise interrupt.                     |\n|                      | chatgpt-shell-eshell-summarize-last-command-output  | Ask ChatGPT to summarize the last command output.                               |\n| M-r                  | chatgpt-shell-search-history                        | Search previous input history.                                                  |\n|                      | chatgpt-shell-mode                                  | Major mode for ChatGPT shell.                                                   |\n|                      | chatgpt-shell-prompt-compose-mode                   | Major mode for composing ChatGPT prompts from a dedicated buffer.               |\n|                      | chatgpt-shell-previous-source-block                 | Move point to the previous source block's body.                                 |\n|                      | chatgpt-shell-prompt                                | Make a ChatGPT request from the minibuffer.                                     |\n|                      | chatgpt-shell-japanese-ocr-lookup                   | Select a region of the screen to OCR and look up in Japanese.                   |\n|                      | chatgpt-shell-refactor-code                         | Refactor code from region using ChatGPT.                                        |\n|                      | chatgpt-shell-view-block-at-point                   | View code block at point (using language's major mode).                         |\n|                      | chatgpt-shell-japanese-audio-lookup                 | Transcribe audio at current file (buffer or `dired') and look up in Japanese.   |\n|                      | chatgpt-shell-eshell-whats-wrong-with-last-command  | Ask ChatGPT what's wrong with the last eshell command.                          |\n|                      | chatgpt-shell-prompt-compose-cancel                 | Cancel and close compose buffer.                                                |\n|                      | chatgpt-shell-prompt-compose-retry                  | Retry sending request to shell.                                                 |\n|                      | chatgpt-shell-version                               | Show `chatgpt-shell' mode version.                                              |\n|                      | chatgpt-shell-prompt-compose-previous-interaction   | Show previous interaction (request / response).                                 |\n|                      | chatgpt-shell-interrupt                             | Interrupt `chatgpt-shell' from any buffer.                                      |\n|                      | chatgpt-shell-view-at-point                         | View prompt and output at point in a separate buffer.                           |\n\nBrowse all available via =M-x=.\n\n* Feature requests\n- Please go through this README to see if the feature is already supported.\n- Need custom behaviour? Check out existing [[https://github.com/xenodium/chatgpt-shell/issues?q=is%3Aissue+][issues/feature requests]]. You may find solutions in discussions.\n\n* Pull requests\nPull requests are super welcome. Please [[https://github.com/xenodium/chatgpt-shell/issues/new][reach out]] before getting started to make sure we're not duplicating effort. Also [[https://github.com/xenodium/chatgpt-shell/][search existing discussions]].\n\n* Reporting bugs\n** Setup isn't working?\nPlease share the entire snippet you've used to set =chatgpt-shell= up (but redact your key). Share any errors you encountered. Read on for sharing additional details.\n** Found runtime/elisp errors?\nPlease enable =M-x toggle-debug-on-error=, reproduce the error, and share the stack trace.\n** Found unexpected behaviour?\nPlease enable logging =(setq chatgpt-shell-logging t)= and share the content of the =*chatgpt-log*= buffer in the bug report.\n** Babel issues?\nPlease also share the entire org snippet.\n* Support my work\n\n👉 Find my work useful? [[https://github.com/sponsors/xenodium][Support this work via GitHub Sponsors]] or [[https://apps.apple.com/us/developer/xenodium-ltd/id304568690][buy my iOS apps]].\n\n* My other utilities, packages, apps, writing...\n\n- [[https://xenodium.com/][Blog (xenodium.com)]]\n- [[https://lmno.lol/alvaro][Blog (lmno.lol/alvaro)]]\n- [[https://plainorg.com][Plain Org]] (iOS)\n- [[https://flathabits.com][Flat Habits]] (iOS)\n- [[https://apps.apple.com/us/app/scratch/id1671420139][Scratch]] (iOS)\n- [[https://github.com/xenodium/macosrec][macosrec]] (macOS)\n- [[https://apps.apple.com/us/app/fresh-eyes/id6480411697?mt=12][Fresh Eyes]] (macOS)\n- [[https://github.com/xenodium/dwim-shell-command][dwim-shell-command]] (Emacs)\n- [[https://github.com/xenodium/company-org-block][company-org-block]] (Emacs)\n- [[https://github.com/xenodium/org-block-capf][org-block-capf]] (Emacs)\n- [[https://github.com/xenodium/ob-swiftui][ob-swiftui]] (Emacs)\n- [[https://github.com/xenodium/chatgpt-shell][chatgpt-shell]] (Emacs)\n- [[https://github.com/xenodium/ready-player][ready-player]] (Emacs)\n- [[https://github.com/xenodium/sqlite-mode-extras][sqlite-mode-extras]]\n- [[https://github.com/xenodium/ob-chatgpt-shell][ob-chatgpt-shell]] (Emacs)\n- [[https://github.com/xenodium/dall-e-shell][dall-e-shell]] (Emacs)\n- [[https://github.com/xenodium/ob-dall-e-shell][ob-dall-e-shell]] (Emacs)\n- [[https://github.com/xenodium/shell-maker][shell-maker]] (Emacs)\n\n* Contributors\n\n#+HTML: \u003ca href=\"https://github.com/xenodium/chatgpt-shell/graphs/contributors\"\u003e\n#+HTML:   \u003cimg src=\"https://contrib.rocks/image?repo=xenodium/chatgpt-shell\" /\u003e\n#+HTML: \u003c/a\u003e\n\nMade with [[https://contrib.rocks][contrib.rocks]].\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxenodium%2Fchatgpt-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxenodium%2Fchatgpt-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxenodium%2Fchatgpt-shell/lists"}