# ocx_sdk

*module*

Python SDK for [OCX](https://github.com/ocx-sh/ocx).

`ocx-sdk` drives the ocx binary rather than reimplementing it: ocx owns
resolution, verification, and the identifier grammar, and this package gives
you typed, CWD-independent handles over the commands it exposes.

```python
from ocx_sdk import Ocx, bootstrap

ocx = Ocx(exe=bootstrap.ensure())
project = ocx.project("/srv/build")
project.pull()
project.exec(["task", "verify"])
```

**This module is the API.** Everything listed in `__all__` is the stable
surface; every other module is underscored and package-private, and the one
public submodule is `ocx_sdk.bootstrap`. Reaching into an underscored path
means the next release may move it without notice — pre-1.0, breaking
changes ship without shims.

Start at `Ocx` for the runtime API and `bootstrap.ensure` for provisioning.

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/__init__.py#L1-L1)

## ocx_sdk.CapabilityCheck

*class* · *dataclass*

```python
class CapabilityCheck
```

Re-exported from: `ocx_sdk._results`

One forge capability `announce`/`claim` probed before writing.

**Attributes**

- `name` (`str`) — The capability — `git-version`, `push-access`, `job-token-push` or `job-token-allowlist` — carried as raw `str` (D8).
- `status` (`str`) — What the probe found: `ok`, `skipped` for a check the transport made inapplicable, or a failure status. Raw `str`.
- `detail` (`str | None`) — What the probe saw, when it recorded anything. Always on the wire, `null` when empty.

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2335-L2359)

### ocx_sdk.CapabilityCheck.detail

*attribute* · *instance attribute*

```python
detail: str | None
```

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2350-L2350)

### ocx_sdk.CapabilityCheck.name

*attribute* · *instance attribute*

```python
name: str
```

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2348-L2348)

### ocx_sdk.CapabilityCheck.status

*attribute* · *instance attribute*

```python
status: str
```

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2349-L2349)

### ocx_sdk.CapabilityCheck.from_dict

*method* · *classmethod*

```python
def from_dict(data: Mapping[str, Any]) -> CapabilityCheck
```

Build from one decoded `capability_checks` entry.

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2352-L2359)
