Skip to content

Commit 2fb1afe

Browse files
committed
feat(cli): scaffold evalhub CLI entry point and command groups
1 parent 8d586b9 commit 2fb1afe

File tree

3 files changed

+52
-1
lines changed

3 files changed

+52
-1
lines changed

pyproject.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ client = [
4949
"eval-hub-sdk[core]",
5050
]
5151

52+
# CLI - command-line interface
53+
cli = [
54+
"eval-hub-sdk[core]",
55+
"click>=8.1.0",
56+
]
57+
5258
# Development dependencies
5359
# NOTE: Versions should match .pre-commit-config.yaml and .github/workflows/pre-commit.yml
5460
dev = [
@@ -67,7 +73,10 @@ examples = [
6773
]
6874

6975
# All core functionality (excludes examples which are optional)
70-
all = ["eval-hub-sdk[core,adapter,client,dev]"]
76+
all = ["eval-hub-sdk[core,adapter,client,cli,dev]"]
77+
78+
[project.scripts]
79+
evalhub = "evalhub.cli:main"
7180

7281
[project.urls]
7382
Homepage = "https://github.com/eval-hub"

src/evalhub/cli/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"""EvalHub CLI - command-line interface for EvalHub."""
2+
3+
from .main import main
4+
5+
__all__ = ["main"]

src/evalhub/cli/main.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
"""EvalHub CLI entry point and command groups."""
2+
3+
import click
4+
5+
import evalhub
6+
7+
8+
@click.group(context_settings={"help_option_names": ["-h", "--help"]})
9+
@click.version_option(version=evalhub.__version__, prog_name="evalhub")
10+
def main() -> None:
11+
"""EvalHub CLI - manage evaluations, providers, collections, and configuration."""
12+
13+
14+
@main.command()
15+
def version() -> None:
16+
"""Print version and build info."""
17+
click.echo(f"evalhub {evalhub.__version__}")
18+
19+
20+
@main.group()
21+
def eval() -> None:
22+
"""Submit and manage evaluation jobs."""
23+
24+
25+
@main.group()
26+
def collections() -> None:
27+
"""Browse and manage benchmark collections."""
28+
29+
30+
@main.group()
31+
def providers() -> None:
32+
"""List and inspect evaluation providers."""
33+
34+
35+
@main.group()
36+
def config() -> None:
37+
"""View and update CLI configuration."""

0 commit comments

Comments
 (0)