Skip to content

feat: comprehensive CLI UX improvements - #24

Merged
himanshu231204 merged 5 commits into
mainfrom
feature/cli-improvements
Jul 10, 2026
Merged

feat: comprehensive CLI UX improvements#24
himanshu231204 merged 5 commits into
mainfrom
feature/cli-improvements

Conversation

@himanshu231204

Copy link
Copy Markdown
Member

Summary

This PR implements comprehensive CLI UX improvements for OpenAgent Eval, addressing user experience gaps and adding powerful new features.

Changes

New Commands

  • oaeval validate [config] - Validate configuration without running evaluation
  • oaeval delete <id> - Delete evaluation reports (single or all)
  • oaeval completion bash/zsh/fish - Generate shell completion scripts

Enhanced Commands

  • oaeval init - Interactive wizard with provider/model selection
  • oaeval run - Dry-run mode, metrics override, better progress, JSON output
  • oaeval doctor - API connectivity tests, recommendations
  • oaeval list - Sorting (date/score/cost), search filtering, JSON output
  • oaeval report - JSON output support
  • oaeval compare - JSON output support

Global Features

  • Global Error Handler - Catches OpenAgentEvalError subclasses with friendly Rich output
  • Global Flags - --quiet, --json, --no-color, --verbose on all commands
  • Config Auto-Discovery - Finds config.yaml/oaeval.yaml automatically, supports OAEVAL_CONFIG env var

Files Changed

New Files

  • openagent_eval/cli/context.py - Global CLI context for managing flags
  • openagent_eval/cli/utils/discovery.py - Config auto-discovery utility
  • openagent_eval/cli/commands/validate.py - New validate command
  • openagent_eval/cli/commands/delete.py - New delete command
  • tests/unit/test_cli/test_cli_improvements.py - 33 new tests

Modified Files

  • openagent_eval/cli/main.py - Global error handler, global flags, shell completion command
  • openagent_eval/cli/commands/run.py - Dry-run mode, metrics override, better progress, JSON output
  • openagent_eval/cli/commands/init.py - Interactive wizard with provider/model selection
  • openagent_eval/cli/commands/doctor.py - API connectivity tests, recommendations
  • openagent_eval/cli/commands/list_evaluations.py - Sorting, search filtering, JSON output
  • openagent_eval/cli/commands/report.py - JSON output support
  • openagent_eval/cli/commands/compare.py - JSON output support
  • openagent_eval/cli/utils/helpers.py - Fixed error chaining, added docstrings
  • openagent_eval/cli/utils/display.py - Added format_file parameter

Testing

  • 33 new tests - All passing
  • 9 existing tests - All passing
  • Lint checks - All passing

Usage Examples

Validate configuration

oaeval validate config.yaml

Dry-run mode

oaeval run config.yaml --dry-run

Generate shell completion

oaeval completion bash >> ~/.bashrc

Delete reports

oaeval delete all --force

List with sorting

oaeval list --sort score --limit 5

JSON output

oaeval run config.yaml --json

Test User added 2 commits July 10, 2026 17:41
- Create docs/examples/index.md with tutorial overview
- Add Examples tab to mkdocs.yml navigation
- Restore Providers navigation section (lost in merge)
- Add global error handler for OpenAgentEvalError with friendly messages
- Add global flags: --quiet, --json, --no-color, --verbose
- Add config auto-discovery (config.yaml/oaeval.yaml in cwd, OAEVAL_CONFIG env var)
- Add validate command to check config without running evaluation
- Add dry-run mode (--dry-run flag on run command)
- Add shell completion support for bash, zsh, and fish
- Enhance doctor command with API connectivity tests
- Add delete command for removing old reports
- Enhance list command with sorting (date/score/cost) and search filtering
- Enhance init command with interactive wizard for provider/model selection
- Add comprehensive test suite for all new features

Closes #123
report_id = r.get("report_id", "unknown")
created_at = r.get("created_at", "unknown")
config_name = "unknown"
status = "unknown"
elif sort_by == "cost":
# Get total cost
return data.get("cost", {}).get("total", 0.0)
except (FileNotFoundError, KeyError):
else:
size_str = f"{size / (1024 * 1024):.1f} MB"
console.print(f" [dim]Size: {size_str}[/dim]")
except OSError:
Comment thread tests/unit/test_cli/test_cli_improvements.py Fixed
from __future__ import annotations

import json
from pathlib import Path

import json
from pathlib import Path
from unittest.mock import MagicMock, patch
from pathlib import Path
from unittest.mock import MagicMock, patch

import pytest
@himanshu231204 himanshu231204 self-assigned this Jul 10, 2026

from __future__ import annotations

import json
@himanshu231204
himanshu231204 merged commit 6ec1a65 into main Jul 10, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant