LamaCLI ๐Ÿฆ™โœจ

March 1, 2026 ยท View on GitHub

License: MIT GitHub Stars Version

๐Ÿš€ Your Local LLM Assistant, Right in Your Terminal!

LamaCLI is a powerful and intuitive command-line interface (CLI) tool that brings the magic of Large Language Models (LLMs) directly to your terminal, powered by Ollama.

LamaCLI Banner

Engage with your AI assistant in both interactive mode and command-line mode โ€” perfect for quick queries or extended conversations, all without leaving your terminal.


โœจ Features

๐ŸŽฏ Dual Operation Modes

  • Interactive Mode: Full-featured TUI with real-time chat, file browsing, and model switching
  • CLI Mode: Quick one-shot commands for ask, suggest, and explain operations

๐Ÿ’ฌ Interactive Chat Features

  • Real-time Streaming: Beautiful chat experience with live response streaming
  • Markdown Support: Fully rendered markdown with syntax-highlighted code blocks
  • Chat Templates: Predefined templates for common tasks (code review, documentation, debugging)
  • Chat History: Persistent session storage with load/save functionality
  • Auto-save Sessions: Conversations automatically saved after each interaction
  • Code Block Management: Extract, navigate, and copy code snippets with ease
  • File Context Integration: Inject file content into prompts using @ command

๐Ÿ—‚๏ธ File Management

  • Built-in File Explorer: Browse project files with keyboard navigation
  • File Viewer: Preview file contents within the application
  • Context-aware Operations: Include directory contents in your queries
  • Pattern Matching: Filter files by patterns (e.g., *.md, *.go)

๐Ÿค– Model Management

  • Multiple Model Support: Switch between any Ollama models seamlessly
  • Model Override: Specify different models for different commands
  • Default Model Detection: Automatically uses your first available model
  • Model Information: View all available models and their status

โšก๏ธ Get Started

Prerequisites

Before you begin, ensure you have Ollama installed and running on your system. You can install Ollama using one of the following methods:

macOS

  • Download the app from Ollama's website.
  • Or install via Homebrew:
    brew install ollama
    

Windows

Linux

  • Run the official installation script:
    curl -fsSL https://ollama.com/install.sh | sh
    

After installation, make sure Ollama is running, then pull at least one model (e.g., ollama pull llama3.2:3b).

ollama pull llama3.2:3b

Installation

LamaCLI is built with Go and available through multiple installation methods:

# Install globally
npm install -g lamacli

# Or run without installing
npx lamacli

๐Ÿ› ๏ธ Via Go

go install github.com/hariharen9/lamacli@latest

๐Ÿ“ฅ Download Binary

Download the latest binary for your platform from the releases page.

Usage

Simply run LamaCLI from your terminal:

lamacli

Key Bindings

KeyDescription
EnterSend message (in chat), Open file/folder (in file explorer)
โ†‘/โ†“Scroll history (in chat), Navigate items (in file tree/model select)
@Trigger file context selection (in chat input)
FOpen File Explorer
MSwitch AI Model
RReset/Clear Chat History
SSave current session manually
CCopy Code Blocks (when available in chat)
Ctrl+HShow detailed Help screen
BackspaceGo to parent folder (in file explorer), Back to explorer (in file viewer)
EscCancel streaming / Return to chat from any view
Ctrl+CExit application (requires two presses for confirmation)
LLoad Chat History (browse and restore previous sessions)
Alt+TCycle through chat templates (code review, documentation, debugging)
Ctrl+TCycle through themes

๐Ÿ“บ Demo Videos

Chatting with LLM
Chatting with LLM
File History & Code Copy
File History & Code Copy
Model Switching
Model Switching
Themes & Help
Themes & Help

๐Ÿ–ฅ๏ธ CLI Mode Examples

While the interactive mode is the main feature, LamaCLI also supports quick CLI commands for rapid queries:

Output Modes

LamaCLI supports two output modes when using the CLI commands:

  1. Markdown Rendering (Default) - Displays a nicely formatted response with proper Markdown rendering after the LLM completes its response. A spinner animation with "Thinking..." text is shown while waiting for the complete response.

  2. Streaming Mode - Displays the raw LLM response in real-time as it's generated, without Markdown rendering. Enable this mode with the --stream flag. The spinner stops after the first chunk of the response appears.

Examples in CLI Mode:

# Basic question with Markdown rendering (default)
lamacli ask "How do I list files in Linux?"

# With streaming output (no Markdown rendering)
lamacli ask --stream "How do I list files in Linux?"

# With model override
lamacli a --model=qwen2.5-coder:1.5b "Explain async/await in JavaScript"

# With project context
lamacli ask --context=. --include="*.md" "Summarize this project"

Get Command Suggestions

# Get command suggestions
lamacli suggest "find large files over 100MB"

# With specific model
lamacli s --model=llama3.2:1b "git workflow for teams"

Explain Commands

# Explain a command
lamacli explain "find . -name '*.go' -exec grep -l 'func main' {} \;"

# With model override
lamacli e --model=qwen2.5-coder "docker compose up -d"

Other Commands

# Show available models
lamacli models

# Show version
lamacli version

# Show help
lamacli help

Note: All CLI commands support the following flags for customization:

  • --model: Override the default model
  • --context: Specify a directory for context
  • --include: Filter files for context
  • --theme: Set a specific theme
  • --stream: Enable real-time streaming output (disables Markdown rendering)

๐Ÿค Contributing

We welcome contributions! If you have ideas for new features, bug fixes, or improvements, please feel free to open an issue or submit a pull request.

Please ensure your code adheres to the existing style and conventions.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

โค๏ธ Support LamaCLI

LamaCLI is an open-source project. Your support helps keep this project alive and thriving!

Buy Me a Coffee PayPal

๐Ÿ™ Credits

Built with Bubble Tea, Lipgloss, Glamour, Huh, and powered by Ollama.

Special thanks to TLM for inspiration on the CLI command structure for ask, suggest, and explain operations.

Made with ๐Ÿ’˜ for all the terminal enthusiasts ๐Ÿง‘โ€๐Ÿ’ป.