AI Shell Agent

🚀 Version 0.2.0 Released! 🚀

We're excited to announce the release of ai-shell-agent version 0.2.0! This version brings greatly improved functionality, modularity, and new features including enhanced toolsets, better configuration management, and localization support.

Upgrade is highly recommended for all users:

pip install --upgrade ai-shell-agent

AI Shell Agent is a command-line LLM-powered assistant designed to streamline your development and system administration tasks directly within your terminal. It interacts with your system through modular Toolsets, understanding your requests, planning actions, and leveraging capabilities like Terminal execution, File System Management (both with user confirmation), and experimental AI-powered file editing (via aider-chat). It maintains conversation context, adapts its available actions based on enabled toolsets, and prioritizes safety through Human-in-the-Loop (HITL) verification for potentially impactful operations.

Philosophy


Features


Quickstart Guide

1. First-Time Setup

Run ai in your terminal for the first time. You'll be guided through a setup wizard:

  1. Select Language: Choose the UI language (requires restart if changed).
    SYSTEM: Please select the application language:
      1: en <- Current
      2: pl # Example - other languages may appear if localized
    Enter number (1-2) or leave empty to keep 'en'> : [CURSOR]
  2. Select Default AI Model: Choose the main LLM for the agent (e.g., gpt-4o-mini).
    SYSTEM: Please select the ai-shell-agent llm model from the available:
    SYSTEM: OpenAI:
    - gpt-4o (aliases: 4o)
    - gpt-4o-mini (aliases: 4o-mini) <- Current Model
    SYSTEM: Google:
    - gemini-1.5-pro
    Please input the model you want to use, or leave empty to keep using 'gpt-4o-mini'
    > : [CURSOR]
  3. Provide API Key: Enter the API key for the chosen model's provider (e.g., OpenAI API Key). It will be securely saved to a .env file in the agent's installation directory.
    SYSTEM: Configuration required: Missing environment variable 'OPENAI_API_KEY'.
    INFO: Description: OpenAI API Key (used if GPT models are selected for Aider)
    Please enter the value for OPENAI_API_KEY: ****[INPUT HIDDEN]****
    INFO: Value for 'OPENAI_API_KEY' saved.
  4. Select Default Enabled Toolsets: Choose which toolsets are active by default when you create new chats (e.g., Terminal, File Manager, Cognitive). Aider is available but likely not included in the defaults due to its experimental nature.
    SYSTEM: Please select the default enabled toolsets.
    These toolsets will be enabled by default when you create new chats.
    SYSTEM: Available Toolsets:
      1: AI Code Copilot **EXPERIMENTAL** - Provides tools for interacting with the AI Code Copilot for editing code and scripts.
      2: Cognitive                    - Provides internal tools for agent analysis and planning.
      3: File Manager                 - Provides tools for direct file and directory manipulation (create, read, edit, delete, copy, move, find, history).
      4: Terminal                     - Provides tools to execute shell commands and Python code.
    Enter comma-separated numbers TO ENABLE by default (e.g., 1,3).
    To disable all - enter 'none'.
    Leave empty to use the current defaults: Cognitive, File Manager, Terminal. # Example default
    
    > : 2,3,4 [CURSOR] # Example: Enabling Cognitive, Files, Terminal

2. Basic Interaction

3. Using Toolsets (Examples)

4. Configuration & Management


Installation

Requires Python 3.11+.

pip install ai-shell-agent

(Note: If you encounter issues related to specific toolsets like Aider, you might need to ensure its dependencies are met separately. Refer to the aider-chat documentation if necessary.)


Usage (Command Reference)

ai [OPTIONS] [MESSAGE]

Main Interaction:

Chat Management:

Model & Language Configuration:

Toolset Management:

Utilities:


Toolsets

Toolsets provide the agent's capabilities. They can be managed per-chat or globally.

Available Toolsets (Default enabled toolsets may vary based on setup):

Managing Toolsets:


Localization

The AI Shell Agent interface can be displayed in multiple languages.


Development & Contributing


Warning

This tool interacts directly with your system (terminal, file system). While safety measures like Human-in-the-Loop (HITL) confirmation are implemented for many actions, always review proposed commands and file operations carefully before confirming. The developers are not responsible for any data loss or system damage caused by misuse or unexpected behavior. Use at your own risk, especially the experimental AI Code Copilot (Aider) integration which may have rough edges and a complex interaction model.


License

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