An open API service indexing awesome lists of open source software.

https://github.com/simonpierreboucher02/o-series-cli-agent

A professional, feature-rich command-line interface for OpenAI's reasoning models
https://github.com/simonpierreboucher02/o-series-cli-agent

ai-agent cli o1 o3 o3-mini o4-mini openai

Last synced: about 1 month ago
JSON representation

A professional, feature-rich command-line interface for OpenAI's reasoning models

Awesome Lists containing this project

README

          

# 🧠 Unified OpenAI O-Series CLI Agent

**πŸ‘¨β€πŸ’» Author: Simon-Pierre Boucher**

![Python](https://img.shields.io/badge/Python-3.10%2B-blue?logo=python&logoColor=white)
![OpenAI](https://img.shields.io/badge/OpenAI-API-green?logo=openai&logoColor=white)
![License](https://img.shields.io/badge/License-MIT-yellow)
![Version](https://img.shields.io/badge/Version-1.0.0-purple)

**A professional, feature-rich CLI agent for OpenAI’s O-Series reasoning models**
*Supports O1, O3, O3-mini, and O4-mini with presets, advanced config, and modern CLI*

[✨ Features](#-features) β€’ [βš™οΈ Installation](#-installation) β€’ [πŸš€ Quick Start](#-quick-start) β€’ [πŸ“š Commands](#-commands-reference) β€’ [πŸ“ File Inclusion](#-file-inclusion) β€’ [🎨 Presets](#-configuration-presets) β€’ [πŸ“Š Model Specs](#-model-specs) β€’ [πŸ—οΈ Architecture](#-project-structure) β€’ [πŸ”’ Security](#-security-features) β€’ [πŸ› Troubleshooting](#-troubleshooting) β€’ [πŸ“„ License](#-license) β€’ [🀝 Contributing](#-contributing)

---

## ✨ Features

- πŸ”Ή **Multi-Model Support**: O1, O3, O3-mini, O4-mini
- 🎨 **Beautiful CLI**: Colors, emojis, responsive design
- ⚑ **Real-time streaming** with progress indicators
- πŸ“ **File Inclusion**: `{filename}` syntax
- πŸ“Š **Rich statistics & analytics**
- 🎯 **Presets**: Creative, Balanced, Focused, Fast
- βš™οΈ **Advanced config** with fine-grained parameters
- πŸ“€ **Multi-format Export**: JSON, TXT, Markdown, HTML, CSV, XML
- πŸ›‘οΈ **Secure key management & error handling**

---

## βš™οΈ Installation

Clone the repository:
```bash
git clone https://github.com/simonpierreboucher02/o-series-cli-agent.git
cd o-series-cli-agent
```

Create and activate a virtual environment (recommended):
```bash
python -m venv venv
source venv/bin/activate
```

Install dependencies:
```bash
pip install -r requirements.txt
```

Set your OpenAI API key:
```bash
export OPENAI_API_KEY=your_api_key_here
```

---

## πŸš€ Quick Start

### Start chat with O1 model
```bash
python main.py --agent-id my-agent --model o1
```

### Creative writing with O3-mini
```bash
python main.py --agent-id writer --model o3-mini --preset creative
```

### Fast responses with O4-mini
```bash
python main.py --agent-id quick --model o4-mini --preset fast
```

### List all models and agents
```bash
python main.py --models
python main.py --list
```

---

## πŸ“š Commands Reference

| Command | Description |
|---------|-------------|
| `/help` | Show all commands |
| `/history [n]` | Show last n messages |
| `/search ` | Search history |
| `/stats` | Show stats |
| `/config` | Show current config |
| `/config edit` | Interactive config |
| `/preset [name]` | Show/apply preset |
| `/files` | List files |
| `/export ` | Export (json, txt, md, html, csv, xml) |
| `/switch ` | Switch model |
| `/quit` | Exit chat |

---

## πŸ“ File Inclusion

```
Analyze code: {script.py}
Review config: {config.yaml}
```

Supported types: Python, JS, TS, Java, C/C++, Go, Rust, HTML, CSS, JSON, YAML, Markdown, etc.

---

## 🎨 Configuration Presets

- **Creative** 🎨 β†’ High creativity, long reasoning
- **Balanced** βš–οΈ β†’ Default for most tasks
- **Focused** 🎯 β†’ Analytical, technical
- **Fast** ⚑ β†’ Quick responses, minimal reasoning

---

## πŸ“Š Model Specs

| Model | Timeout (Low/Med/High) | Context | Best Use Case |
|-------|------------------------|---------|---------------|
| O1 | 3m / 8m / 15m | 128K | Complex reasoning |
| O3 | 4m / 10m / 20m | 128K | Advanced tasks |
| O3-mini | 2m / 5m / 10m | 128K | Balanced performance |
| O4-mini | 1.5m / 4m / 8m | 128K | Fast/simple tasks |

---

## πŸ—οΈ Project Structure

```
o-series-cli-agent/
β”œβ”€β”€ main.py
β”œβ”€β”€ agent.py
β”œβ”€β”€ config.py
β”œβ”€β”€ export.py
β”œβ”€β”€ utils.py
β”œβ”€β”€ requirements.txt
└── agents/
└── {agent-id}/
β”œβ”€β”€ history.json
β”œβ”€β”€ config.yaml
β”œβ”€β”€ secrets.json
β”œβ”€β”€ backups/
β”œβ”€β”€ exports/
β”œβ”€β”€ logs/
└── uploads/
```

---

## πŸ”’ Security Features

- πŸ”‘ Encrypted API key storage
- 🚫 Path traversal protection
- βœ… Input validation
- πŸ“œ Error handling & retries
- πŸ“ Audit logging

---

## πŸ› Troubleshooting

- ❌ Import errors β†’ `pip install -r requirements.txt`
- πŸ”‘ API key issues β†’ `export OPENAI_API_KEY=...`
- ⏱️ Timeout issues β†’ Adjust reasoning effort
- πŸ“‚ Permission errors β†’ Ensure directory access

---

## πŸ“„ License

MIT License β€” professional & educational use.

---

## 🀝 Contributing

Contributions welcome!

---

**2025-08-29**
*UniversitΓ© Laval*