Skip to content

ollama.el provides an Emacs interface to manage Ollama models, allowing you to list, pull, delete, copy, and inspect models directly from Emacs.

Notifications You must be signed in to change notification settings

nailuoGG/ollama.el

Repository files navigation

ollama.el - Manage Ollama Models from Emacs

Summary

ollama.el provides an Emacs interface to manage Ollama models, allowing you to list, pull, delete, copy, and inspect models directly from Emacs.

Why This Exists

You know how we all love playing with local LLMs?

We’re constantly pulling models from Ollama, Hugging Face, and everywhere else.

Wouldn’t it be awesome to have a neat way to organize all those models right in Emacs?

That’s what this is all about!

Installation

First, make sure you have Ollama installed on your system:

Then for Doom Emacs users, add this to your config.el:

;; In $DOOMDIR/packages.el
(package! ollama
  :recipe (:host github :repo "nailuoGG/ollama.el" :files "*.el"))

Then run:

doom sync

Usage

Basic Commands

Start by showing the status view:

“`elisp M-x ollama-status “`

This will show a tabulated list of all available models with their details.

./images/example.png

Keybindings in Status View

When in the status buffer (`*Ollama Status*`), you can use these keybindings:

KeyCommandDescription
uollama-status-refreshRefresh the model list
pollama-pull-modelPull a new model
dollama-delete-model-at-pointDelete model at point
collama-copy-modelCopy model
iollama-show-model-infoShow detailed model info
stabulated-list-sortSort by current column
qquit-windowQuit the status view

Example Workflow

  1. List all models:

“`elisp M-x ollama-list-models “`

  1. Pull a new model:

“`elisp M-x ollama-pull-model “`

  1. Show model details:

“`elisp M-x ollama-show-model “`

  1. Delete a model:

“`elisp M-x ollama-delete-model “`

  1. Copy a model:

“`elisp M-x ollama-copy-model “`

Evil Mode Support

If you’re using Evil mode, all keybindings work in Normal state.

Available Commands

CommandDescription
ollama-list-modelsList all available models in a tabulated view
ollama-pull-modelPull a new model from Ollama
ollama-delete-modelDelete a model (with completion)
ollama-show-modelShow detailed information about a model
ollama-copy-modelCopy a model to a new name
ollama-select-modelSelect a model with completion

Customization Options

VariableDefault ValueDescription
ollama-api-url“http://localhost:11434”Base URL for Ollama API

Development

  • ollama-api.el: Low-level API communication
  • ollama.el: Core model management commands
  • ollama-status.el: Status view and UI
  • ollama-transient.el: Quick access to common commands
  • ollama-utils.el: Shared utility functions

About

ollama.el provides an Emacs interface to manage Ollama models, allowing you to list, pull, delete, copy, and inspect models directly from Emacs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published