{"id":33621087,"url":"https://github.com/vigyatgoel/ollama-code-cli","last_synced_at":"2026-03-09T11:15:23.610Z","repository":{"id":312509993,"uuid":"1047367424","full_name":"VigyatGoel/ollama-code-cli","owner":"VigyatGoel","description":"Ollama Code CLI is an interactive command-line tool that uses local LLMs via Ollama for coding tasks and advanced tool calling.","archived":false,"fork":false,"pushed_at":"2025-09-06T08:33:32.000Z","size":122,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-27T17:10:28.402Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/VigyatGoel.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-30T09:01:34.000Z","updated_at":"2025-11-24T10:01:19.000Z","dependencies_parsed_at":"2025-08-31T07:13:05.744Z","dependency_job_id":"934b7c30-8b9a-4151-be62-3a6c2f514435","html_url":"https://github.com/VigyatGoel/ollama-code-cli","commit_stats":null,"previous_names":["vigyatgoel/ollama-code-cli","vigyatgoel/ollamacode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/VigyatGoel/ollama-code-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VigyatGoel%2Follama-code-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VigyatGoel%2Follama-code-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VigyatGoel%2Follama-code-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VigyatGoel%2Follama-code-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VigyatGoel","download_url":"https://codeload.github.com/VigyatGoel/ollama-code-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VigyatGoel%2Follama-code-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27543430,"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-12-06T02:00:06.463Z","response_time":60,"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":[],"created_at":"2025-12-01T14:00:34.256Z","updated_at":"2026-03-09T11:15:23.579Z","avatar_url":"https://github.com/VigyatGoel.png","language":"Python","funding_links":[],"categories":["Vibe Coding"],"sub_categories":[],"readme":"\n# Ollama Code CLI\n\n[![PyPI version](https://badge.fury.io/py/ollama-code-cli.svg)](https://badge.fury.io/py/ollama-code-cli)\n[![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n**Ollama Code CLI is an open-source AI agent that brings the power of local LLMs through Ollama, right in your terminal, with advanced tool-calling features.**\n\n---\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [Requirements](#requirements)\n- [Usage](#usage)\n- [Available Tools](#available-tools)\n- [Examples](#examples)\n- [Interactive Mode](#interactive-mode)\n- [Project Structure](#project-structure)\n- [Dependencies](#dependencies)\n- [Contributing](#contributing)\n- [License](#license)\n\n---\n\n## Features\n\n- 🎨 **Elegant CLI Interface:** Rich colors and structured output\n- 🤖 **Local AI Power:** Interact with local LLMs through Ollama\n- 🛠️ **Tool Calling:** Execute coding-related tools (file operations, code execution, etc.)\n- 🔒 **Permission Prompts:** Safety prompts before executing potentially dangerous operations\n- 💬 **Interactive Mode:** Maintain conversation context for multi-turn interactions\n- 📝 **Markdown Support:** Elegantly formatted responses with syntax highlighting\n- 📋 **Structured Output:** Clear panels and tables for tool calls and results\n\n---\n\n## Installation\n\nFirst, install a compatible model in Ollama:\n\n```bash\n# Choose one of these models:\nollama pull qwen3:4b\nollama pull qwen2.5:3b\n```\n\nThen install the CLI:\n\n```bash\npip install ollama-code-cli\n```\n\n### macOS Installation Note\n\nIf you see an error like `\"externally-managed-environment\"` when using `pip3 install`, this is because modern macOS and Homebrew Python prevent global package installation. Use one of these methods instead:\n\n**Option 1: Use pipx**\n```bash\nbrew install pipx\npipx ensurepath\npipx install ollama-code-cli\n```\n\n**Option 2: Use a virtual environment**\n```bash\npython3 -m venv ~/.venvs/ollama-code-cli\nsource ~/.venvs/ollama-code-cli/bin/activate\npip install ollama-code-cli\n```\n\n**Option 3: Use uv (Fast Python package manager)**\n```bash\nbrew install uv\nuv tool install ollama-code-cli\n```\n\n---\n\n## Requirements\n\n- Python 3.13+\n- Ollama installed and running\n- An Ollama model that supports tool calling (e.g., Qwen3, Qwen2.5, etc.)\n\n---\n\n## Usage\n\nStart an interactive session:\n\n```bash\nollama-code-cli --model qwen3:4b\n```\n\nRun a single command:\n\n```bash\nollama-code-cli \"Create a Python function to calculate factorial\"\n```\n\nUse a specific model:\n\n```bash\nollama-code-cli --model qwen3:4b \"Explain how async/await works in Python\"\n```\n\nDisable permission prompts (use with caution):\n\n```bash\nollama-code-cli --no-permission \"Create and run a Python script\"\n```\n\n---\n\n## Security Features\n\nThe CLI includes built-in security features to protect against potentially dangerous operations:\n\n### Permission Prompts\nBy default, the CLI will ask for your permission before executing potentially dangerous operations such as:\n- Writing or modifying files\n- Executing code\n- Running shell commands\n- Running Python files\n\n### Safe Operations\nThese operations are considered safe and don't require permission:\n- Reading files\n- Listing directory contents\n\n### Bypassing Permission Prompts\nYou can disable permission prompts using the `--no-permission` flag, but this should be used with caution:\n\n```bash\nollama-code-cli --no-permission \"Your prompt here\"\n```\n\n**Warning:** Disabling permission prompts allows the AI to execute operations without user confirmation. Only use this in trusted environments.\n\n---\n\n## Available Tools\n\n- `read_file`: Read the contents of a file\n- `write_file`: Write content to a file\n- `execute_code`: Execute code in a subprocess\n- `list_files`: List files in a directory\n- `run_command`: Run a shell command\n\n---\n\n## Examples\n\n**1. Create a Python script and save it to a file:**\n\n```bash\nollama-code-cli \"Create a Python script that calculates factorial and save it to a file named factorial.py\"\n```\n\n**2. Read a file and explain its contents:**\n\n```bash\nollama-code-cli \"Read the contents of main.py and explain what it does\"\n```\n\n**3. Execute a shell command:**\n\n```bash\nollama-code-cli \"List all files in the current directory\"\n```\n\n---\n\n## Interactive Mode\n\nLaunch the interactive mode for a conversational experience:\n\n```bash\nollama-code-cli\n```\n\nIn interactive mode, you can:\n\n- Have multi-turn conversations with the AI\n- See elegantly formatted responses with Markdown support\n- Watch tool calls and results in real-time with visual panels\n- Clear conversation history with the `clear` command\n- Exit gracefully with the `exit` command\n\n---\n\n## Project Structure\n\n```\nollama-code-cli/\n├── ollama_code_cli/\n│   ├── __init__.py\n│   ├── cli/\n│   │   ├── __init__.py\n│   │   └── cli.py          # Main CLI interface\n│   ├── tools/\n│   │   ├── __init__.py\n│   │   └── tool_manager.py # Tool implementations\n├── pyproject.toml          # Project configuration\n├── LICENSE\n└── README.md\n```\n\n---\n\n## Dependencies\n\n- [Rich](https://github.com/Textualize/rich) — Elegant terminal formatting\n- [Click](https://click.palletsprojects.com/) — Command-line interface\n- [Ollama Python Client](https://github.com/ollama/ollama-python) — Ollama integration\n\n---\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request for any improvements, bug fixes, or suggestions.\n\n---\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvigyatgoel%2Follama-code-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvigyatgoel%2Follama-code-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvigyatgoel%2Follama-code-cli/lists"}