neo-agent-cli 0.1.1
Neo CLI - AI Agent that helps you write code through interactive prompts and file context
License: MIT
Requires Python: <3.13,>=3.9

# Neo - AI Agent CLI

## Description

Neo is an AI agent available via the CLI that helps you write code through interactive prompts and file context.

## Installation

### Option 1: Install from PyPI (Recommended)

Install Neo CLI globally with pip:

```bash
pip install neo-agent-cli
```

For an even cleaner installation that doesn't affect your system Python, use pipx:

```bash
# Install pipx if you don't have it
pip install pipx

# Install Neo globally
pipx install neo-agent-cli
```

### Option 2: Install from Source (Development)

For development or to install from source:

1. Clone the repository:
   ```bash
   git clone https://github.com/VY-GEN032-KG/gxeai-agents-ai
   cd code-chat
   ```

2. Install dependencies using Poetry:
   ```bash
   # Install Poetry if you don't have it (macOS)
   brew install poetry

   # Install the package
   poetry install
   ```

3. Run in development mode:
   ```bash
   poetry shell
   neo
   ```

## Using Neo CLI

After installation, you can run Neo from any directory:

```bash
# Navigate to your project directory
cd path/to/your/project

# Run Neo CLI
neo
```
## Configuration

Neo requires the following environment variables:

- `GXEAI_API_KEY` - Globant Enterprise AI API key
- `GXEAI_OPENAI_BASE_URL` - Base URL for OpenAI API requests (default: https://saiapi.corp.globant.com/openai)
- `GXEAI_ASSISTANT_URL` - URL for AI assistant service (default: https://saiapi.corp.globant.com/assistant)
- `GXEAI_API_CHAT_URL` - URL for chat API endpoint (default: https://saiapi.corp.globant.com/chat)

### First-time Setup

When you run Neo for the first time, it will prompt you for the required API keys and endpoints if they're not already set. You'll have options to save these credentials:

1. **User-wide configuration** (recommended): Saved to `~/.neo.env` for use from any directory
2. **Project-specific configuration**: Saved to `.env` in the current directory
3. **Both locations**: Redundant storage for maximum availability
4. **Session-only**: Use for just the current session

### Reconfiguration

If you need to update your configuration:

```bash
# Force reconfiguration of all environment variables
neo --reconfigure
```

### Manual Configuration

You can also set up the configuration manually:

1. **User-wide configuration** (available from any directory):
   ```bash
   # Create the file
   echo "GXEAI_API_KEY=your_api_key" > ~/.neo.env
   echo "GXEAI_API_CHAT_URL=https://your-api-endpoint" >> ~/.neo.env
   ```

2. **Project-specific configuration** (only for a specific directory):
   ```bash
   # Create the file in your project
   echo "GXEAI_API_KEY=your_api_key" > .env
   echo "GXEAI_API_CHAT_URL=https://your-api-endpoint" >> .env
   ```

3. **Environment variables**: Set directly in your shell:
   ```bash
   export GXEAI_API_KEY=your_api_key
   export GXEAI_API_CHAT_URL=https://your-api-endpoint
   ```

Neo will run in your current working directory and index all files for quick access.


### Agent Implementation

Neo uses a direct integration with the GEAI platform, providing:

- Tool-using capabilities for file access and shell commands
- Multi-turn conversations
- High-quality responses to queries about your code
- Clean error handling

## Features

- Fast file search and autocompletion
- Context-aware AI assistance
- Code generation and modification
- File-based context management

## Commands

- `/ask [query]` - Ask a question about selected files
- `/code [query]` - Request code changes for selected files
- `/agent [query]` - Invoke agent functionality (files optional)
- `/add <filepath>` - Add a file to context (with fast autocomplete)
- `/clear` - Clear selected files
- `/files` - Show currently selected files
- `/history` - Show message history
- `/reindex` - Reindex codebase files for search
- `/help` - Show help message
- `/exit` - Exit the application

Direct messages are also processed by the agent without needing a command prefix.