{"id":27535614,"url":"https://github.com/webmatze/lazyollama","last_synced_at":"2026-04-30T09:34:07.655Z","repository":{"id":287863214,"uuid":"964627557","full_name":"webmatze/lazyollama","owner":"webmatze","description":"A terminal user interface (TUI) application for managing local Ollama models, written in Rust.","archived":false,"fork":false,"pushed_at":"2025-04-14T10:03:27.000Z","size":150,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T11:22:44.468Z","etag":null,"topics":["lazy","ollama","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webmatze.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,"zenodo":null}},"created_at":"2025-04-11T14:16:36.000Z","updated_at":"2025-04-14T10:03:31.000Z","dependencies_parsed_at":"2025-04-14T11:22:51.959Z","dependency_job_id":"d62d7558-ea49-444a-b180-f7a8d4afd91c","html_url":"https://github.com/webmatze/lazyollama","commit_stats":null,"previous_names":["webmatze/lazyollama"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmatze%2Flazyollama","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmatze%2Flazyollama/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmatze%2Flazyollama/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webmatze%2Flazyollama/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webmatze","download_url":"https://codeload.github.com/webmatze/lazyollama/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249535840,"owners_count":21287496,"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":["lazy","ollama","rust"],"created_at":"2025-04-18T19:07:54.718Z","updated_at":"2026-04-30T09:34:07.634Z","avatar_url":"https://github.com/webmatze.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LazyOllama - Easy llama, easy life\n![easy_llama_easy_life](https://github.com/user-attachments/assets/8dc90386-4f91-47d5-81c9-37e30feaea17)\n\nA terminal user interface (TUI) application for managing local Ollama models, written in Rust.\n\nhttps://github.com/user-attachments/assets/5fcdb0eb-c398-4662-aed9-4fd8359d7063\n\n## Features\n\n*   **List Models:** Displays a scrollable list of locally installed Ollama models.\n*   **Search \u0026 Filter Models:** Real-time search and filtering of installed models using `/` key.\n*   **Run Models:** Run any of the locally installed Ollama models.\n*   **Inspect Models:** Shows detailed information for the selected model (size, modification date, digest, family, parameters, etc.).\n*   **Delete Models:** Allows deleting the selected model with a confirmation prompt.\n*   **Install Models:** Allows to pull new models from the ollama registry with search and filter capabilities.\n*   **Registry Search:** Search and filter through available models in the Ollama registry during installation.\n*   **Environment Variable:** Uses `OLLAMA_HOST` environment variable for the Ollama API endpoint (defaults to `http://localhost:11434`).\n\n## Installation\n\n### Prerequisites\n\n*   Rust toolchain (Install from [rustup.rs](https://rustup.rs/))\n*   A running Ollama instance ([ollama.com](https://ollama.com/))\n*   Homebrew (macOS / Linux) ([brew.sh](https://brew.sh/))\n\n### Method 1: Homebrew (macOS / Linux) (Recommended)\n\nInstall using the official Homebrew tap.\n\n**Option 1 (Tap first, then install):**\n\n```bash\n# Add the custom tap\nbrew tap webmatze/tap\n\n# Install the tool\nbrew install lazyollama\n```\n\n**Option 2 (Direct install):**\n\nHomebrew can automatically tap and install in one step if you provide the full formula name:\n\n```bash\nbrew install webmatze/tap/lazyollama\n```\n\n**Upgrading:**\n\nTo upgrade to the latest version:\n\n```bash\n# Update Homebrew and all formulas (including lazyollama)\nbrew update\nbrew upgrade lazyollama\n```\n\n### Method 2: Using the Installation Script\n\nThis is the simplest way to build and install LazyOllama to a system-wide location:\n\n```bash\n# 1. Clone the repository\ngit clone https://github.com/webmatze/lazyollama.git\ncd lazyollama\n\n# 2. Run the installation script\nchmod +x install.sh\n./install.sh\n```\n\nThe script will:\n- Check for required dependencies\n- Build the release version\n- Install it to the appropriate location for your OS (typically `/usr/local/bin` on Unix-like systems)\n- Set appropriate permissions\n\n### Method 3: Using Cargo Install\n\nIf you have Rust installed, you can install directly using Cargo:\n\n```bash\n# 1. Clone the repository\ngit clone https://github.com/webmatze/lazyollama.git\ncd lazyollama\n\n# 2. Install using cargo\ncargo install --path .\n```\n\nThis will install the binary to your Cargo bin directory (typically `~/.cargo/bin/`), which should be in your PATH.\n\n### Method 4: Manual Build and Installation\n\nIf you prefer to manually build and place the binary:\n\n```bash\n# 1. Clone the repository\ngit clone https://github.com/webmatze/lazyollama.git\ncd lazyollama\n\n# 2. Build the application\ncargo build --release\n\n# 3. Copy the binary to a location in your PATH (optional)\n# On Linux/macOS (may require sudo)\nsudo cp target/release/lazyollama /usr/local/bin/\n```\n\nThe executable will be located at `target/release/lazyollama`.\n\n### Platform-Specific Considerations\n\n- **Linux/macOS**: Installation to system directories (like `/usr/local/bin`) typically requires root privileges (sudo).\n- **Windows**: The installation script will attempt to install to an appropriate location, but you may need to adjust your PATH environment variable.\n\n### Verifying Installation\n\nAfter installation, verify that lazyollama is correctly installed and accessible:\n\n```bash\n# Check if the command is available\nwhich lazyollama\n\n# Run lazyollama\nlazyollama\n```\n\nIf the command isn't found, ensure the installation location is in your PATH.\n\n## Usage\n\n1.  **Run the application:**\n    ```bash\n    lazyollama\n    ```\n2.  **Set Custom Ollama Host (Optional):**\n    If your Ollama instance is running on a different host or port, set the `OLLAMA_HOST` environment variable before running:\n    ```bash\n    export OLLAMA_HOST=\"http://your-ollama-host:port\"\n    lazyollama\n    ```\n\n## Keybindings\n\n### General\n*   `q`: Quit the application.\n*   `h` / `?`: Show/Hide help screen.\n\n### Model List Navigation\n*   `↓` / `j`: Move selection down.\n*   `↑` / `k`: Move selection up.\n*   `Enter`: Run selected model in ollama.\n*   `d`: Initiate deletion of the selected model (shows confirmation).\n\n### Search \u0026 Filter (Local Models)\n*   `/`: Enter filter mode to search through installed models.\n*   `Ctrl+C`: Clear current filter.\n\n### Filter Mode Controls\n*   `Type`: Enter search text to filter models in real-time.\n*   `Backspace`: Remove characters from search.\n*   `←` / `→`: Move cursor within search input.\n*   `Enter`: Confirm filter and return to model list.\n*   `Esc`: Cancel filter and clear search.\n\n### Model Installation\n*   `i`: Open install dialog to browse and install new models from registry.\n*   `/`: (During install) Filter available registry models.\n*   `Ctrl+C`: (During install) Clear registry filter.\n\n### Confirmation Dialogs\n*   `y` / `Y`: Confirm action (delete, install, etc.).\n*   `n` / `N` / `Esc`: Cancel action or go back.\n\n## Search \u0026 Filter Features\n\n### Local Model Filtering\nLazyOllama provides powerful search capabilities for your installed models:\n\n1. **Quick Search**: Press `/` from the main model list to enter filter mode\n2. **Real-time Filtering**: Type to instantly filter models as you type\n3. **Case-insensitive**: Search works regardless of capitalization\n4. **Partial Matching**: Find models by typing any part of their name\n5. **Visual Feedback**: See filtered count in the title bar (e.g., \"Models (filtered: 3/10)\")\n\n**Example**: Type \"llama\" to show only models containing \"llama\" in their name.\n\n### Registry Model Search\nWhen installing new models (`i` key), you can also search through available models:\n\n1. **Browse Registry**: Press `i` to see all available models from Ollama registry\n2. **Filter Registry**: Press `/` within the install dialog to filter available models  \n3. **Find Models Fast**: Quickly locate specific models from hundreds of available options\n4. **Smart Filtering**: Same real-time, case-insensitive search as local models\n\n**Example**: In install mode, type \"code\" to find all code-related models like \"codellama\", \"codegemma\", etc.\n\n### Filter Controls\nBoth local and registry filters support the same intuitive controls:\n- **Arrow keys** or **mouse**: Position cursor anywhere in search text\n- **Backspace**: Delete characters before cursor\n- **Ctrl+C**: Instantly clear current filter\n- **Enter**: Apply filter and return to browsing\n- **Esc**: Cancel and clear filter\n\n## Dependencies\n\nThis project uses the following main Rust crates:\n\n*   `ratatui`: For building the TUI.\n*   `crossterm`: Terminal manipulation backend for `ratatui`.\n*   `tokio`: Asynchronous runtime.\n*   `reqwest`: HTTP client for interacting with the Ollama API.\n*   `serde`: For serializing/deserializing API data.\n*   `humansize`: For formatting file sizes.\n*   `thiserror`: For error handling boilerplate.\n*   `dotenvy`: (Optional) For loading `.env` files if needed.\n\nSee `Cargo.toml` for the full list and specific versions.\n\n## Architecture Overview\n\nThe application follows a simple event loop architecture:\n\n1.  **Initialization:** Sets up the terminal, initializes `AppState`, and fetches the initial list of models from the Ollama API.\n2.  **Event Loop:**\n    *   Draws the UI based on the current `AppState`.\n    *   Checks for user input (keyboard events) and results from background tasks (via channels).\n    *   Handles input: Updates `AppState` (e.g., changes selection, enters delete mode, quits).\n    *   Handles background task results (e.g., updates model details).\n    *   Triggers background tasks (e.g., fetching model details) when necessary.\n3.  **Cleanup:** Restores the terminal state on exit.\n\n## Architecture Diagram\n\n```mermaid\ngraph TD\n    A[User Input] --\u003e B[Event Loop]\n    B --\u003e C[AppState]\n    C --\u003e D[UI Renderer]\n    D --\u003e E[Terminal Display]\n    \n    B --\u003e F[Background Tasks]\n    F --\u003e G[Ollama API]\n    G --\u003e F\n    F --\u003e C\n    \n    subgraph Event Handler\n        B\n        C\n    end\n    \n    subgraph UI Layer\n        D\n        E\n    end\n    \n    subgraph API Layer\n        F\n        G\n    end\n```\n\n## Troubleshooting\n\n*   **Connection Errors:** Ensure your Ollama instance is running and accessible at the specified `OLLAMA_HOST` (or the default `http://localhost:11434`). Check firewalls if necessary.\n*   **API Errors:** If the Ollama API returns errors, they should be displayed in the status bar. Refer to the Ollama server logs for more details.\n*   **Rendering Issues:** Terminal rendering can vary. Ensure you are using a modern terminal emulator with good Unicode and color support.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebmatze%2Flazyollama","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebmatze%2Flazyollama","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebmatze%2Flazyollama/lists"}