Skip to main content

A professional iterative CLI AI Agent powered by Ollama

Project description

askme-ai-cli

askme-ai-cli is a professional-grade, iterative CLI AI agent designed to act as a "doer" in your local development environment. Powered by Ollama, it combines advanced reasoning with the ability to execute shell commands, analyze project structures, and modify files directly.

Key Features

  • Iterative Reasoning (ReAct Pattern): The agent doesn't just provide one-shot answers. It analyzes requests, plans actions, observes command outputs, and refines its steps until the goal is achieved.
  • Local & Private: Runs entirely on your local machine or private infrastructure using Ollama models (Gemma, Llama 3, Mistral, etc.).
  • Smart Execution Suite:
    • <execute>: Handles standard commands safely.
    • <execute_shell>: Supports complex shell operations including pipes (|) and redirects (>).
    • <patch>: Applies unified diffs to files for precise code modifications without overwriting entire files.
  • Context Awareness: Automatically generates directory trees and maintains a "State of the Project" summary to keep the LLM focused.
  • Security Shield: Built-in protection against destructive commands (like rm -rf /) and unauthorized directory traversal.
  • Rich UI: A clean, professional terminal interface powered by the rich library, featuring live output streaming and session metadata.

Installation

Ensure you have Python 3.12+ installed, then install via pip:

pip install askme-ai-cli

Requirements

  1. Ollama: You must have Ollama installed and running on your system.
  2. Models: By default, the agent looks for gemma2:9b (or your configured default). You can pull it using:
    ollama pull gemma2:9b
    
  3. API Key: Set your OLLAMA_API_KEY in your environment or enter it when prompted.

Usage

Interactive Mode

Simply run the command to start a conversation with the agent:

askme

One-Shot Task

Provide a prompt directly from the terminal:

askme -p "Create a new python script that fetches crypto prices and save it to crypto.py"

Options

  • -m, --model: Specify a custom Ollama model.
  • -s, --session: Load or save a specific session history.
  • -d, --dry-run: View proposed commands without executing them.

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

askme_ai_cli-0.4.1.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

askme_ai_cli-0.4.1-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file askme_ai_cli-0.4.1.tar.gz.

File metadata

  • Download URL: askme_ai_cli-0.4.1.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for askme_ai_cli-0.4.1.tar.gz
Algorithm Hash digest
SHA256 fcbe367df2cdbc81c37fedc4bcb7f6b35bc24cd92d0c5f7edd768ac94f40b1ee
MD5 b17c32c84ea9b704d2b6c3dbc71e8295
BLAKE2b-256 de3b9993da7e145cdf841851ccdb36272be4003f2317a155a0f5055f86255d02

See more details on using hashes here.

File details

Details for the file askme_ai_cli-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: askme_ai_cli-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for askme_ai_cli-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d59dc8a1f3015a80bddc75421ec2359617d372daaac08aa3bed05d76ee9c3f2e
MD5 b116a65428f6e28a7282ea20ff1747ed
BLAKE2b-256 06fd1377ce893e6fd7fc1cadf42b88fe3092ea3f84ef23980004a3556e44589b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page