general-augment-cli 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- general_augment_cli-0.1.0.dist-info/METADATA +180 -0
- general_augment_cli-0.1.0.dist-info/RECORD +42 -0
- general_augment_cli-0.1.0.dist-info/WHEEL +4 -0
- general_augment_cli-0.1.0.dist-info/entry_points.txt +2 -0
- platform_cli/__init__.py +5 -0
- platform_cli/branding.py +27 -0
- platform_cli/client.py +179 -0
- platform_cli/commands/__init__.py +1 -0
- platform_cli/commands/approvals.py +150 -0
- platform_cli/commands/auth.py +96 -0
- platform_cli/commands/billing.py +143 -0
- platform_cli/commands/channels.py +212 -0
- platform_cli/commands/deploy.py +72 -0
- platform_cli/commands/dev.py +38 -0
- platform_cli/commands/doctor.py +170 -0
- platform_cli/commands/identity.py +433 -0
- platform_cli/commands/init.py +55 -0
- platform_cli/commands/integrate.py +94 -0
- platform_cli/commands/keys.py +116 -0
- platform_cli/commands/logs.py +43 -0
- platform_cli/commands/mcp.py +258 -0
- platform_cli/commands/memory.py +316 -0
- platform_cli/commands/mock.py +30 -0
- platform_cli/commands/model_providers.py +226 -0
- platform_cli/commands/observability.py +174 -0
- platform_cli/commands/onboarding.py +72 -0
- platform_cli/commands/projects.py +302 -0
- platform_cli/commands/skills.py +116 -0
- platform_cli/commands/smoke.py +280 -0
- platform_cli/commands/status.py +49 -0
- platform_cli/commands/tools.py +179 -0
- platform_cli/commands/users.py +150 -0
- platform_cli/commands/validate.py +96 -0
- platform_cli/commands/verify.py +648 -0
- platform_cli/config.py +114 -0
- platform_cli/errors.py +103 -0
- platform_cli/local_mock.py +1392 -0
- platform_cli/main.py +130 -0
- platform_cli/openapi.py +1048 -0
- platform_cli/output.py +47 -0
- platform_cli/readiness.py +176 -0
- platform_cli/runtime.py +22 -0
platform_cli/main.py
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"""Typer entrypoint for the standalone CLI package."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from typing import Annotated
|
|
7
|
+
|
|
8
|
+
import typer
|
|
9
|
+
|
|
10
|
+
from platform_cli import __version__
|
|
11
|
+
from platform_cli.branding import get_branding
|
|
12
|
+
from platform_cli.commands import (
|
|
13
|
+
approvals,
|
|
14
|
+
auth,
|
|
15
|
+
billing,
|
|
16
|
+
channels,
|
|
17
|
+
identity,
|
|
18
|
+
keys,
|
|
19
|
+
mcp,
|
|
20
|
+
memory,
|
|
21
|
+
model_providers,
|
|
22
|
+
observability,
|
|
23
|
+
onboarding,
|
|
24
|
+
projects,
|
|
25
|
+
skills,
|
|
26
|
+
tools,
|
|
27
|
+
users,
|
|
28
|
+
)
|
|
29
|
+
from platform_cli.commands.deploy import deploy
|
|
30
|
+
from platform_cli.commands.dev import dev
|
|
31
|
+
from platform_cli.commands.doctor import doctor
|
|
32
|
+
from platform_cli.commands.init import init
|
|
33
|
+
from platform_cli.commands.integrate import integrate
|
|
34
|
+
from platform_cli.commands.logs import logs
|
|
35
|
+
from platform_cli.commands.mock import mock
|
|
36
|
+
from platform_cli.commands.smoke import smoke
|
|
37
|
+
from platform_cli.commands.status import status
|
|
38
|
+
from platform_cli.commands.validate import validate
|
|
39
|
+
from platform_cli.commands.verify import verify
|
|
40
|
+
from platform_cli.config import apply_runtime_overrides, load_config, resolve_config_paths
|
|
41
|
+
from platform_cli.errors import CLIError
|
|
42
|
+
from platform_cli.output import print_error
|
|
43
|
+
from platform_cli.runtime import Runtime
|
|
44
|
+
|
|
45
|
+
branding = get_branding()
|
|
46
|
+
app = typer.Typer(
|
|
47
|
+
help=f"{branding.product_name} developer CLI.",
|
|
48
|
+
no_args_is_help=True,
|
|
49
|
+
invoke_without_command=True,
|
|
50
|
+
)
|
|
51
|
+
app.add_typer(approvals.app, name="approvals")
|
|
52
|
+
app.add_typer(auth.app, name="auth")
|
|
53
|
+
app.add_typer(billing.app, name="billing")
|
|
54
|
+
app.add_typer(projects.app, name="projects")
|
|
55
|
+
app.add_typer(keys.app, name="keys")
|
|
56
|
+
app.add_typer(tools.app, name="tools")
|
|
57
|
+
app.add_typer(skills.app, name="skills")
|
|
58
|
+
app.add_typer(mcp.app, name="mcp")
|
|
59
|
+
app.add_typer(model_providers.app, name="model-providers")
|
|
60
|
+
app.add_typer(memory.app, name="memory")
|
|
61
|
+
app.add_typer(users.app, name="users")
|
|
62
|
+
app.add_typer(identity.app, name="identity")
|
|
63
|
+
app.add_typer(observability.app, name="observability")
|
|
64
|
+
app.add_typer(channels.app, name="channels")
|
|
65
|
+
app.add_typer(onboarding.app, name="onboarding")
|
|
66
|
+
app.command("integrate")(integrate)
|
|
67
|
+
app.command("init")(init)
|
|
68
|
+
app.command("deploy")(deploy)
|
|
69
|
+
app.command("dev")(dev)
|
|
70
|
+
app.command("doctor")(doctor)
|
|
71
|
+
app.command("mock")(mock)
|
|
72
|
+
app.command("logs")(logs)
|
|
73
|
+
app.command("status")(status)
|
|
74
|
+
app.command("smoke")(smoke)
|
|
75
|
+
app.command("validate")(validate)
|
|
76
|
+
app.command("verify")(verify)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
@app.callback()
|
|
80
|
+
def main(
|
|
81
|
+
ctx: typer.Context,
|
|
82
|
+
version: Annotated[
|
|
83
|
+
bool,
|
|
84
|
+
typer.Option(
|
|
85
|
+
"--version",
|
|
86
|
+
help="Show the CLI version and exit.",
|
|
87
|
+
is_eager=True,
|
|
88
|
+
),
|
|
89
|
+
] = False,
|
|
90
|
+
config: Annotated[
|
|
91
|
+
Path | None,
|
|
92
|
+
typer.Option("--config", help="Path to CLI config file."),
|
|
93
|
+
] = None,
|
|
94
|
+
base_url: Annotated[
|
|
95
|
+
str | None,
|
|
96
|
+
typer.Option("--base-url", help="Override platform API base URL."),
|
|
97
|
+
] = None,
|
|
98
|
+
api_key: Annotated[
|
|
99
|
+
str | None,
|
|
100
|
+
typer.Option("--api-key", help="Override API key for one command."),
|
|
101
|
+
] = None,
|
|
102
|
+
) -> None:
|
|
103
|
+
"""Load CLI config and runtime overrides."""
|
|
104
|
+
if version:
|
|
105
|
+
typer.echo(f"genaug {__version__}")
|
|
106
|
+
raise typer.Exit()
|
|
107
|
+
config_paths = resolve_config_paths(config)
|
|
108
|
+
loaded = apply_runtime_overrides(
|
|
109
|
+
load_config(config_paths.load_path),
|
|
110
|
+
base_url=base_url,
|
|
111
|
+
api_key=api_key,
|
|
112
|
+
)
|
|
113
|
+
ctx.obj = Runtime(
|
|
114
|
+
config=loaded,
|
|
115
|
+
config_path=config_paths.save_path,
|
|
116
|
+
loaded_config_path=config_paths.load_path,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def run() -> None:
|
|
121
|
+
"""Invoke the CLI with friendly top-level error handling."""
|
|
122
|
+
try:
|
|
123
|
+
app()
|
|
124
|
+
except CLIError as exc:
|
|
125
|
+
print_error(str(exc))
|
|
126
|
+
raise typer.Exit(1) from exc
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
if __name__ == "__main__":
|
|
130
|
+
run()
|