Metadata-Version: 2.4
Name: veguicli
Version: 1.3.2
Summary: Typed Python SDK for the VCLI JSON-RPC protocol.
Author: VeguiDev
License: MIT
Project-URL: Documentation, https://www.npmjs.com/package/@veguidev/cli
Keywords: vcli,infrastructure,testing,json-rpc
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# vegui-vcli

Typed, dependency-free Python 3.11+ client for VCLI. The SDK manages one
persistent `vcli rpc` child process and exposes the same test, generator,
test-set, Cloudflared, and temporary-share capabilities as the Node.js
package.

Install the CLI and SDK:

```sh
npm install --global @veguidev/cli
python -m pip install vegui-vcli
```

Synchronous usage:

```python
from vcli import VCLIClient

with VCLIClient() as client:
    summary = client.run_tests(
        ["/etc/infra/tests"],
        on_event=lambda event, data: print(event, data),
    )
    print(summary.passed, summary.failed)
```

Asynchronous usage:

```python
import asyncio
from vcli import AsyncVCLIClient

async def main() -> None:
    async with AsyncVCLIClient() as client:
        tests = await client.discover_tests(["/etc/infra/tests"])
        print(tests)

asyncio.run(main())
```

The executable is selected from the explicit `executable=` argument,
`VCLI_EXECUTABLE`, or `PATH`, in that order. RPC domain failures raise
`VCLIError` with stable `code`, `hint`, `data`, and `rpc_code` attributes.

Temporary shares return a typed handle:

```python
with VCLIClient() as client:
    client.on("share.closed", lambda event, data: print(event, data))
    share = client.serve_temp_file("./report.pdf", duration="5m")
    print(share.url)
    client.close_share(share)
```

Cloudflared is never installed implicitly in JSON/RPC mode. Call
`client.install_cloudflared()` or `await client.install_cloudflared()`
explicitly.
