Metadata-Version: 2.4
Name: moma-cli
Version: 0.0.1
Summary: MOMA CLI - A terminal-based AI coding assistant
Author-email: MOMA CLI <dev@moma-cli.com>
License: MIT
Keywords: ai,cli,coding-assistant,llm
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: litellm>=1.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: typer[all]>=0.9.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# moma-cli

A terminal‑based AI coding assistant powered by `litellm`.  It lets you chat with your codebase, automatically read context, and apply changes manually.

## Overview

<img src="asset/image.png" alt="moma-cli screenshot" width="800">

## Installation

```bash
pip install moma-cli   # or install from the repository
```

## Quick start

```bash
# Start an interactive chat (default command)
moma
```

The CLI will launch a welcome screen and you can start typing messages.  Commands are prefixed with `/`:

| Command | Description |
|---------|-------------|
| `/clear` | Clear conversation history |
| `/model list` | List available models |
| `/model change` | Choose a different model |
| `/security` | Change security mode (smart/strict/permissive) |
| `/status` | Show current session status |
| `/config …` | View or edit configuration |
| `/help` | Show help panel |
| `/quit` or `Ctrl‑D` | Exit the program |

## Chat command

You can also invoke the chat directly with arguments:

```bash
moma chat "Explain this function"            # send an initial message
moma chat -m gpt-4 "Generate a unit test"    # override model for this session
moma chat -c                               # clear history before starting
moma chat -t 0.7 -max-tokens 500            # set temperature and max tokens
```

## Configuration

Configuration is stored in `~/.moma-cli/config.json`.  Manage it via the `config` sub‑command:

```bash
# Show all configuration
moma config show

# Set a value (e.g., default model)
moma config set default_model ollama/llama3

# Set your API key
moma config set api_key sk-xxxxxxxxxxxx

# Reset system prompt to default
moma config reset
```

## Security modes

- **smart** – read‑only shell commands are auto‑executed, mutating commands require confirmation.
- **strict** – all shell commands require confirmation.
- **permissive** – all commands run without prompts.

Change the mode with:

```bash
moma /security
```

## Example workflow

1. **Start chat** – `moma`
2. **Ask a question** – e.g., `How can I improve this function?`
3. **Review suggestions** – the assistant may propose a diff.
4. **Apply changes** – confirm the diff when prompted.

Enjoy coding with AI assistance!
