{"id":30656209,"url":"https://github.com/hariharen9/lamacli","last_synced_at":"2025-08-31T10:08:17.957Z","repository":{"id":304187569,"uuid":"1018035104","full_name":"hariharen9/lamacli","owner":"hariharen9","description":"Chat with LLMs from your terminal. Fast, local, and beautiful 🚀","archived":false,"fork":false,"pushed_at":"2025-08-12T13:26:22.000Z","size":10781,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-12T15:25:14.677Z","etag":null,"topics":["ai","cli","localllm","ollama","tui"],"latest_commit_sha":null,"homepage":"https://lamacli.netlify.app/","language":"Go","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/hariharen9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-07-11T13:51:51.000Z","updated_at":"2025-08-12T13:26:04.000Z","dependencies_parsed_at":"2025-08-12T15:24:24.709Z","dependency_job_id":null,"html_url":"https://github.com/hariharen9/lamacli","commit_stats":null,"previous_names":["hariharen9/lamacli"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/hariharen9/lamacli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hariharen9%2Flamacli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hariharen9%2Flamacli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hariharen9%2Flamacli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hariharen9%2Flamacli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hariharen9","download_url":"https://codeload.github.com/hariharen9/lamacli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hariharen9%2Flamacli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272966143,"owners_count":25023219,"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","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ai","cli","localllm","ollama","tui"],"created_at":"2025-08-31T10:08:16.445Z","updated_at":"2025-08-31T10:08:17.940Z","avatar_url":"https://github.com/hariharen9.png","language":"Go","funding_links":["https://www.buymeacoffee.com/hariharen","https://paypal.me/hariharen9"],"categories":["\u003ca name=\"ai\"\u003e\u003c/a\u003eAI / ChatGPT"],"sub_categories":[],"readme":"# LamaCLI 🦙✨ \u003cimg src=\"./assets/lamacli%20icon.png\" alt=\"LamaCLI Banner\" width=\"35\"/\u003e\n\n![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg) ![GitHub Stars](https://img.shields.io/github/stars/hariharen9/lamacli?style=social) ![Version](https://img.shields.io/badge/version-1.5.0-blue.svg)\n\n## 🚀 Your Local LLM Assistant, Right in Your Terminal!\n\nLamaCLI 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](https://ollama.ai/). \n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./assets/lamacli%20banner.png\" alt=\"LamaCLI Banner\" width=\"600\"/\u003e\n\u003c/p\u003e\n\nEngage with your AI assistant in both **interactive mode** and **command-line mode** — perfect for quick queries or extended conversations, all without leaving your terminal.\n\n---\n\n## ✨ Features\n\n### 🎯 Dual Operation Modes\n*   **Interactive Mode:** Full-featured TUI with real-time chat, file browsing, and model switching\n*   **CLI Mode:** Quick one-shot commands for ask, suggest, and explain operations\n\n### 💬 Interactive Chat Features\n*   **Real-time Streaming:** Beautiful chat experience with live response streaming\n*   **Markdown Support:** Fully rendered markdown with syntax-highlighted code blocks\n*   **Chat Templates:** Predefined templates for common tasks (code review, documentation, debugging)\n*   **Chat History:** Persistent session storage with load/save functionality\n*   **Auto-save Sessions:** Conversations automatically saved after each interaction\n*   **Code Block Management:** Extract, navigate, and copy code snippets with ease\n*   **File Context Integration:** Inject file content into prompts using `@` command\n\n### 🗂️ File Management\n*   **Built-in File Explorer:** Browse project files with keyboard navigation\n*   **File Viewer:** Preview file contents within the application\n*   **Context-aware Operations:** Include directory contents in your queries\n*   **Pattern Matching:** Filter files by patterns (e.g., `*.md`, `*.go`)\n\n### 🤖 Model Management\n*   **Multiple Model Support:** Switch between any Ollama models seamlessly\n*   **Model Override:** Specify different models for different commands\n*   **Default Model Detection:** Automatically uses your first available model\n*   **Model Information:** View all available models and their status\n\n\n## ⚡️ Get Started\n\n### Prerequisites\n\nBefore you begin, ensure you have [Ollama](https://ollama.com/download) installed and running on your system. You can install Ollama using one of the following methods:\n\n**macOS**\n- Download the app from [Ollama's website](https://ollama.com/download).\n- Or install via Homebrew:\n    ```bash\n    brew install ollama\n    ```\n\n**Windows**\n- Download the installer from [Ollama's website](https://ollama.com/download).\n\n**Linux**\n- Run the official installation script:\n    ```bash\n    curl -fsSL https://ollama.com/install.sh | sh\n    ```\n\nAfter installation, make sure Ollama is running, then pull at least one model (e.g., `ollama pull llama3.2:3b`).\n\n```bash\nollama pull llama3.2:3b\n```\n\n### Installation\n\nLamaCLI is built with Go and available through multiple installation methods:\n\n#### 📦 Via npm (Recommended)\n\n```bash\n# Install globally\nnpm install -g lamacli\n\n# Or run without installing\nnpx lamacli\n```\n\n#### 🛠️ Via Go\n\n```bash\ngo install github.com/hariharen9/lamacli@latest\n```\n\n#### 📥 Download Binary\n\nDownload the latest binary for your platform from the [releases page](https://github.com/hariharen9/lamacli/releases/latest).\n\n### Usage\n\nSimply run LamaCLI from your terminal:\n\n```bash\nlamacli\n```\n\n### Key Bindings\n\n| Key       | Description                                                               |\n| :-------- | :------------------------------------------------------------------------ |\n| `Enter`   | Send message (in chat), Open file/folder (in file explorer)               |\n| `↑`/`↓`   | Scroll history (in chat), Navigate items (in file tree/model select)      |\n| `@`       | Trigger file context selection (in chat input)                            |\n| `F`       | Open File Explorer                                                        |\n| `M`       | Switch AI Model                                                           |\n| `R`       | Reset/Clear Chat History                                                  |\n| `C`       | Copy Code Blocks (when available in chat)                                 |\n| `H`       | Show detailed Help screen                                                 |\n| `Backspace` | Go to parent folder (in file explorer), Back to explorer (in file viewer) |\n| `Esc`     | Return to chat from any view (file explorer, model select, help)          |\n| `Ctrl+C`  | Exit application (requires two presses for confirmation)                  |\n| `L`       | Load Chat History (browse and restore previous sessions)                  |\n| `S`       | Save current session manually                                              |\n| `Alt+T`   | Cycle through chat templates (code review, documentation, debugging)      |\n| `Ctrl+T`  | Cycle through themes                                                       |\n\n## 📺 Demo Videos\n\n\u003ctable width=\"100%\"\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"50%\" align=\"center\"\u003e\n      \u003cb\u003eChatting with LLM\u003c/b\u003e\n      \u003cbr\u003e\n      \u003cimg src=\"./assets/chat.gif\" alt=\"Chatting with LLM\"/\u003e\n    \u003c/td\u003e\n    \u003ctd width=\"50%\" align=\"center\"\u003e\n      \u003cb\u003eFile History \u0026 Code Copy\u003c/b\u003e\n      \u003cbr\u003e\n      \u003cimg src=\"./assets/copy_file_and_history.gif\" alt=\"File History \u0026 Code Copy\"/\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"50%\" align=\"center\"\u003e\n      \u003cb\u003eModel Switching\u003c/b\u003e\n      \u003cbr\u003e\n      \u003cimg src=\"./assets/model_switch.gif\" alt=\"Model Switching\"/\u003e\n    \u003c/td\u003e\n    \u003ctd width=\"50%\" align=\"center\"\u003e\n      \u003cb\u003eThemes \u0026 Help\u003c/b\u003e\n      \u003cbr\u003e\n      \u003cimg src=\"./assets/help_and_theme.gif\" alt=\"Themes \u0026 Help\"/\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## 🖥️ CLI Mode Examples\n\nWhile the interactive mode is the main feature, LamaCLI also supports quick CLI commands for rapid queries:\n\n### Output Modes\n\nLamaCLI supports two output modes when using the CLI commands:\n\n1. **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.\n\n2. **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.\n\n### Examples in CLI Mode:\n```bash\n# Basic question with Markdown rendering (default)\nlamacli ask \"How do I list files in Linux?\"\n\n# With streaming output (no Markdown rendering)\nlamacli ask --stream \"How do I list files in Linux?\"\n\n# With model override\nlamacli a --model=qwen2.5-coder:1.5b \"Explain async/await in JavaScript\"\n\n# With project context\nlamacli ask --context=. --include=\"*.md\" \"Summarize this project\"\n```\n\n### Get Command Suggestions\n```bash\n# Get command suggestions\nlamacli suggest \"find large files over 100MB\"\n\n# With specific model\nlamacli s --model=llama3.2:1b \"git workflow for teams\"\n```\n\n### Explain Commands\n```bash\n# Explain a command\nlamacli explain \"find . -name '*.go' -exec grep -l 'func main' {} \\;\"\n\n# With model override\nlamacli e --model=qwen2.5-coder \"docker compose up -d\"\n```\n\n### Other Commands\n```bash\n# Show available models\nlamacli models\n\n# Show version\nlamacli version\n\n# Show help\nlamacli help\n```\n\n**Note:** All CLI commands support the following flags for customization:\n- `--model`: Override the default model\n- `--context`: Specify a directory for context\n- `--include`: Filter files for context\n- `--theme`: Set a specific theme\n- `--stream`: Enable real-time streaming output (disables Markdown rendering)\n\n## 🤝 Contributing\n\nWe 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.\n\nPlease ensure your code adheres to the existing style and conventions.\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details.\n\n## ❤️ Support LamaCLI\n\nLamaCLI is an open-source project. Your support helps keep this project alive and thriving!\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.buymeacoffee.com/hariharen\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Buy%20Me%20a%20Coffee-FFDD00?style=for-the-badge\u0026logo=buy-me-a-coffee\u0026logoColor=black\" alt=\"Buy Me a Coffee\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://paypal.me/hariharen9\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Donate-PayPal-00457C?style=for-the-badge\u0026logo=paypal\u0026logoColor=white\" alt=\"PayPal\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## 🙏 Credits\n\nBuilt with [Bubble Tea](https://github.com/charmbracelet/bubbletea), [Lipgloss](https://github.com/charmbracelet/lipgloss), [Glamour](https://github.com/charmbracelet/glamour), [Huh](https://github.com/charmbracelet/huh), and powered by [Ollama](https://ollama.ai/).\n\nSpecial thanks to [TLM](https://github.com/yusufcanb/tlm) for inspiration on the CLI command structure for ask, suggest, and explain operations.\n\n\u003ccenter\u003e\n\u003ch3\u003eMade with 💘 for all the terminal enthusiasts 🧑‍💻.\u003c/h3\u003e\n\u003c/center\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/trinib/trinib/82213791fa9ff58d3ca768ddd6de2489ec23ffca/images/footer.svg\" width=\"100%\"\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhariharen9%2Flamacli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhariharen9%2Flamacli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhariharen9%2Flamacli/lists"}