Metadata-Version: 2.4
Name: sensecraft-solutionctl
Version: 0.1.1
Summary: Thin public-side client for the SenseCraft Solution engine binary
Project-URL: Homepage, https://github.com/suharvest/sensecraft-solutions
Project-URL: Repository, https://github.com/suharvest/sensecraft-solutions
Author: Seeed Studio
License: Apache-2.0
Keywords: cli,iot,sensecraft,solution
Requires-Python: >=3.11
Requires-Dist: jsonschema>=4
Requires-Dist: pyyaml>=6
Requires-Dist: sensecraft-solution-spec
Description-Content-Type: text/markdown

# solutionctl

Thin public-side client for the (closed-source) **SenseCraft Solution** engine
binary. `solutionctl` contains **zero engine code** — it only locates the
installed engine binary and drives it via `subprocess` / local REST.

## How it finds the engine

Three-level resolution (`solutionctl.engine_locator`):

1. `$SENSECRAFT_ENGINE_BIN` environment variable
2. `~/.sensecraft/engine.json` handshake file (written by the desktop App on
   startup)
3. Platform-native discovery:
   - **macOS**: `mdfind` by bundle identifier, with `/Applications` fallback
   - **Windows**: `Uninstall` registry keys (`InstallLocation`)
   - **Linux**: `dpkg -L sensecraft-solution`

Each candidate is validated (`is_file` + executable + PyInstaller onedir
`_internal` sibling) before being accepted.

## Commands

- `solutionctl deploy <id> [...]` — drive `<engine> deploy <id> --json`,
  render the NDJSON event stream.
- `solutionctl manage list-apps` — start `<engine> serve --headless`, poll
  health, query the REST API, then shut the server down.
- `solutionctl meta` — print engine metadata (`<engine> meta --json`).
