chore: setting up package dependencies for cli

This commit is contained in:
ajspig 2026-04-10 16:25:13 -04:00
parent d0cb7099db
commit 9459c3209b
5 changed files with 1461 additions and 1921 deletions

View File

@ -1,17 +1,32 @@
[project]
name = "honcho-cli"
name = "honcho-ai-cli"
version = "0.1.0"
description = "Agent-first admin & debugging CLI for Honcho"
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
authors = [
{ name = "Plastic Labs", email = "hello@plasticlabs.ai" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries",
]
dependencies = [
"typer>=0.15.0",
"honcho-ai>=0.1.0",
"honcho-ai>=2.0.0",
"rich>=13.0.0",
"httpx>=0.27.0",
]
[project.urls]
Homepage = "https://github.com/plastic-labs/honcho"
Repository = "https://github.com/plastic-labs/honcho"
[project.scripts]
honcho = "honcho_cli.main:app"
@ -30,3 +45,9 @@ dev = [
"pytest>=8.0.0",
"pytest-mock>=3.14.0",
]
[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

View File

@ -12,22 +12,33 @@ import typer
from honcho_cli import __version__
from honcho_cli.output import set_json_mode, set_quiet_mode
BANNER = r"""
""".strip()
app = typer.Typer(
name="honcho",
help="Agent-first admin & debugging CLI for Honcho.",
no_args_is_help=True,
invoke_without_command=True,
pretty_exceptions_enable=False,
)
def version_callback(value: bool) -> None:
if value:
print(f"honcho-cli {__version__}")
print(BANNER)
print(f" honcho-cli {__version__}")
raise typer.Exit()
@app.callback()
def main(
ctx: typer.Context,
json_output: bool = typer.Option(False, "--json", help="Force JSON output"),
quiet: bool = typer.Option(False, "--quiet", "-q", help="Suppress status messages"),
workspace: Optional[str] = typer.Option(None, "--workspace", "-w", envvar="HONCHO_WORKSPACE_ID", help="Override workspace ID"),
@ -44,6 +55,15 @@ def main(
_global_overrides["peer"] = peer
_global_overrides["session"] = session
if ctx.invoked_subcommand is None:
from rich.console import Console
console = Console()
console.print(f"[bold cyan]{BANNER}[/bold cyan]")
console.print(f" [dim]v{__version__}[/dim]\n")
console.print(ctx.get_help())
raise typer.Exit()
# Global overrides from flags (commands read these)
_global_overrides: dict[str, str | None] = {

View File

@ -63,10 +63,12 @@ dev = [
[tool.uv.workspace]
members = [
"sdks/python",
"honcho-cli",
]
[tool.uv.sources]
honcho-ai = { workspace = true }
honcho-ai-cli = { workspace = true }
[tool.ruff.lint]
# from https://docs.astral.sh/ruff/linter/#rule-selection example

View File

@ -29,6 +29,9 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
]
[project.optional-dependencies]
cli = ["honcho-ai-cli>=0.1.0"]
[project.urls]
Homepage = "https://github.com/plastic-labs/honcho"
Repository = "https://github.com/plastic-labs/honcho"

3328
uv.lock

File diff suppressed because it is too large Load Diff