Metadata-Version: 2.4
Name: erpdesktop
Version: 1.0.0
Summary: ERPDesktop plugin SDK — build, package, and publish plugins for the ERPDesktop marketplace
Author-email: BatchNepal <support@batchnepal.com>
License: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: click>=8.0
Requires-Dist: httpx>=0.27
Requires-Dist: jsonschema>=4.20
Requires-Dist: rich>=13.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: keyring>=25.0
Requires-Dist: cryptography>=42.0
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: pytest-asyncio>=0.24; extra == "dev"
Requires-Dist: ruff>=0.5; extra == "dev"

# ERPDesktop Plugin SDK

Build, package, and publish plugins for the ERPDesktop marketplace.

## Install

```bash
pip install erpdesktop-sdk
```

## Quick start

```bash
# Scaffold a new plugin
erpdesktop init my-plugin

# Validate your plugin.json
erpdesktop validate

# Package into a distributable .zip
erpdesktop package

# Publish to the marketplace
erpdesktop publish --changelog "Initial release"
```

## PluginBase lifecycle

```python
from erpdesktop import PluginBase, log, event

class MyPlugin(PluginBase):
    plugin_id = "com.example.my-plugin"
    plugin_version = "1.0.0"

    def on_start(self, config):
        log("info", "Started", branch=config.get("branch"))
        self.register_command("ping", lambda p: {"pong": True})

    def on_stop(self):
        log("info", "Shutting down")

if __name__ == "__main__":
    MyPlugin().run()
```

## Commands

| Command | Description |
|---------|-------------|
| `erpdesktop init <name>` | Scaffold a new plugin |
| `erpdesktop validate` | Validate plugin.json |
| `erpdesktop package` | Create .zip distributable |
| `erpdesktop publish` | Upload to marketplace |
| `erpdesktop --version` | Show SDK version |
