zpx 0.0.1__tar.gz
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.
- zpx-0.0.1/PKG-INFO +43 -0
- zpx-0.0.1/README.md +26 -0
- zpx-0.0.1/pyproject.toml +42 -0
- zpx-0.0.1/src/zpx/__init__.py +9 -0
- zpx-0.0.1/src/zpx/cli.py +59 -0
zpx-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: zpx
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: CLI de ZPX Forge: conecta tu Claude Code o Codex con tu fábrica de software
|
|
5
|
+
Keywords: zpx,zpx-forge,ai-agents,claude-code,codex,cli
|
|
6
|
+
Author: Zynplex
|
|
7
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
8
|
+
Classifier: Environment :: Console
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Topic :: Software Development
|
|
12
|
+
Requires-Dist: httpx>=0.28
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Project-URL: Homepage, https://zpxforge.com
|
|
15
|
+
Project-URL: Documentation, https://zpxforge.com/docs
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
18
|
+
# zpx
|
|
19
|
+
|
|
20
|
+
CLI de [ZPX Forge](https://zpxforge.com): conecta tu Claude Code o Codex con tu fábrica de software.
|
|
21
|
+
|
|
22
|
+
> Versión temprana (0.0.x). Hoy incluye `zpx health` y `zpx version`; los comandos para agentes
|
|
23
|
+
> (`login`, `projects`, `tasks`…) llegan en próximas versiones.
|
|
24
|
+
|
|
25
|
+
## Uso
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
uvx zpx health # probar sin instalar nada
|
|
29
|
+
pipx install zpx # instalarlo de forma permanente
|
|
30
|
+
uv tool install zpx # o con uv
|
|
31
|
+
pip install zpx # o con pip, dentro de un entorno virtual
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
zpx version # versión del CLI
|
|
36
|
+
zpx health # salud de la plataforma
|
|
37
|
+
zpx health --json # en JSON
|
|
38
|
+
zpx health --url http://localhost:3000 # otra instancia
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
La URL por defecto es `https://zpxforge.com`; también se puede fijar con la variable `ZPX_URL`.
|
|
42
|
+
|
|
43
|
+
Documentación: https://zpxforge.com/docs
|
zpx-0.0.1/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# zpx
|
|
2
|
+
|
|
3
|
+
CLI de [ZPX Forge](https://zpxforge.com): conecta tu Claude Code o Codex con tu fábrica de software.
|
|
4
|
+
|
|
5
|
+
> Versión temprana (0.0.x). Hoy incluye `zpx health` y `zpx version`; los comandos para agentes
|
|
6
|
+
> (`login`, `projects`, `tasks`…) llegan en próximas versiones.
|
|
7
|
+
|
|
8
|
+
## Uso
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
uvx zpx health # probar sin instalar nada
|
|
12
|
+
pipx install zpx # instalarlo de forma permanente
|
|
13
|
+
uv tool install zpx # o con uv
|
|
14
|
+
pip install zpx # o con pip, dentro de un entorno virtual
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
zpx version # versión del CLI
|
|
19
|
+
zpx health # salud de la plataforma
|
|
20
|
+
zpx health --json # en JSON
|
|
21
|
+
zpx health --url http://localhost:3000 # otra instancia
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
La URL por defecto es `https://zpxforge.com`; también se puede fijar con la variable `ZPX_URL`.
|
|
25
|
+
|
|
26
|
+
Documentación: https://zpxforge.com/docs
|
zpx-0.0.1/pyproject.toml
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "zpx"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "CLI de ZPX Forge: conecta tu Claude Code o Codex con tu fábrica de software"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
keywords = ["zpx", "zpx-forge", "ai-agents", "claude-code", "codex", "cli"]
|
|
7
|
+
classifiers = [
|
|
8
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
9
|
+
"Environment :: Console",
|
|
10
|
+
"Intended Audience :: Developers",
|
|
11
|
+
"Programming Language :: Python :: 3",
|
|
12
|
+
"Topic :: Software Development",
|
|
13
|
+
]
|
|
14
|
+
authors = [{ name = "Zynplex" }]
|
|
15
|
+
requires-python = ">=3.10"
|
|
16
|
+
dependencies = [
|
|
17
|
+
"httpx>=0.28",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.urls]
|
|
21
|
+
Homepage = "https://zpxforge.com"
|
|
22
|
+
Documentation = "https://zpxforge.com/docs"
|
|
23
|
+
|
|
24
|
+
[project.scripts]
|
|
25
|
+
zpx = "zpx.cli:main"
|
|
26
|
+
|
|
27
|
+
[build-system]
|
|
28
|
+
requires = ["uv_build>=0.11.21,<0.12.0"]
|
|
29
|
+
build-backend = "uv_build"
|
|
30
|
+
|
|
31
|
+
[dependency-groups]
|
|
32
|
+
dev = [
|
|
33
|
+
"pytest>=9.2",
|
|
34
|
+
"ruff>=0.17",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[tool.ruff]
|
|
38
|
+
line-length = 120
|
|
39
|
+
target-version = "py310"
|
|
40
|
+
|
|
41
|
+
[tool.ruff.lint]
|
|
42
|
+
select = ["E", "F", "I", "UP", "B"]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""zpx · CLI de ZPX Forge."""
|
|
2
|
+
|
|
3
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
# Una sola fuente de verdad: la versión de pyproject.toml
|
|
7
|
+
__version__ = version("zpx")
|
|
8
|
+
except PackageNotFoundError: # ejecutando desde el código sin instalar
|
|
9
|
+
__version__ = "0.0.0+local"
|
zpx-0.0.1/src/zpx/cli.py
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""zpx · CLI de ZPX Forge.
|
|
2
|
+
|
|
3
|
+
F0: `zpx version` y `zpx health`. En F5 llegan login (device flow), connect, clone, start, done, ask y audit.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import argparse
|
|
7
|
+
import json
|
|
8
|
+
import os
|
|
9
|
+
import sys
|
|
10
|
+
|
|
11
|
+
import httpx
|
|
12
|
+
|
|
13
|
+
from zpx import __version__
|
|
14
|
+
|
|
15
|
+
DEFAULT_URL = os.environ.get("ZPX_URL", "https://zpxforge.com")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def cmd_version(_args) -> int:
|
|
19
|
+
print(f"zpx {__version__}")
|
|
20
|
+
return 0
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def cmd_health(args) -> int:
|
|
24
|
+
url = f"{args.url.rstrip('/')}/api/v1/health"
|
|
25
|
+
try:
|
|
26
|
+
r = httpx.get(url, timeout=10, follow_redirects=True)
|
|
27
|
+
data = r.json()
|
|
28
|
+
except (httpx.HTTPError, ValueError) as exc:
|
|
29
|
+
print(f"✘ No pude consultar {url}: {exc}", file=sys.stderr)
|
|
30
|
+
return 1
|
|
31
|
+
if args.json:
|
|
32
|
+
print(json.dumps(data, indent=2, ensure_ascii=False))
|
|
33
|
+
else:
|
|
34
|
+
mark = {"ok": "✔", "degraded": "⚠"}.get(data.get("status"), "✘")
|
|
35
|
+
print(f"{mark} ZPX Forge {data.get('version')} ({data.get('env')}) · {data.get('status')}")
|
|
36
|
+
for name, check in (data.get("checks") or {}).items():
|
|
37
|
+
detail = f"{check.get('ms')} ms" if check.get("ok") else check.get("error")
|
|
38
|
+
print(f" {'✔' if check.get('ok') else '✘'} {name}: {detail}")
|
|
39
|
+
return 0 if data.get("status") in {"ok", "degraded"} else 1
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
43
|
+
parser = argparse.ArgumentParser(prog="zpx", description="CLI de ZPX Forge")
|
|
44
|
+
sub = parser.add_subparsers(dest="command", required=True)
|
|
45
|
+
sub.add_parser("version", help="versión del CLI").set_defaults(func=cmd_version)
|
|
46
|
+
h = sub.add_parser("health", help="salud de la plataforma")
|
|
47
|
+
h.add_argument("--url", default=DEFAULT_URL, help=f"URL de ZPX Forge (por defecto {DEFAULT_URL})")
|
|
48
|
+
h.add_argument("--json", action="store_true", help="salida en JSON")
|
|
49
|
+
h.set_defaults(func=cmd_health)
|
|
50
|
+
return parser
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def main(argv: list[str] | None = None) -> int:
|
|
54
|
+
args = build_parser().parse_args(argv)
|
|
55
|
+
return args.func(args)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
if __name__ == "__main__":
|
|
59
|
+
sys.exit(main())
|