Metadata-Version: 2.5
Name: dikolab-horde-sdk
Version: 0.0.1
Summary: Write a horde plugin: the boilerplate and the language-agnostic algorithms.
Project-URL: Homepage, https://diko316.gitlab.io/dikolab-horde/
Project-URL: Documentation, https://diko316.gitlab.io/dikolab-horde/
Project-URL: Funding, https://paypal.me/dikolab
Author-email: Diko TechSlave <diko316@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: horde,json-rpc,monorepo,plugin,sdk
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: dikolab-horde-common>=0.0.1
Requires-Dist: dikolab-horde-ipc>=0.0.1
Description-Content-Type: text/markdown

# dikolab-horde-sdk

Write a horde plugin without writing any protocol code. A plugin is a separate
process that speaks JSON-RPC over stdio: it cannot touch the disk, spawn a
program, or print to the terminal — it asks horde, and horde decides. The SDK is
the side of that conversation a plugin author would otherwise have to write by
hand. Install it if you are writing a plugin; to *use* horde, install
`dikolab-horde` instead.

> **Status: alpha.** `0.0.1` ships `Plugin`, `Context`, `Outcome`, and the shared
> algorithms, and drives the reference plugin's ten commands. The interfaces may
> still move.

## Getting started

```sh
uv add dikolab-horde-sdk
```

Python 3.11 or newer. It brings `dikolab-horde-common` and `dikolab-horde-ipc`
with it, and `dikolab_horde_sdk.testing` ships a fake horde — so one install is
enough to write a plugin and test it.

A whole plugin:

```python
from dikolab_horde_sdk import Outcome, Plugin

plugin = Plugin(name="python", requires=["uv"])


@plugin.command("lint", tools=("ruff", "mypy"))
def lint(ctx, argv) -> Outcome:
    return ctx.run_chain([("ruff", "check"), ("mypy",)], ctx.target(argv))


plugin.main()
```

`main()` claims `stdout`, parses argv, builds the peer, performs the handshake,
and serves until horde says stop. What the plugin declares it derives: `commands`
is the handler table, and `requires` is the union of what those commands said
they invoke — neither is a constant you maintain.

## More reading

Full documentation, guides, and the plugin authoring manual:
https://diko316.gitlab.io/dikolab-horde/

## Support

If horde saves you time, you can support its development:
https://paypal.me/dikolab

---

© 2025–2026 dikolab. Released under the MIT License.
