wyrmctl-workspace
Workspace root for wyrmctl, an owner-scoped Nginx Proxy Manager controller.
Overview · Installation · Quick Start · Usage · API · Contributing · Governance · License
The source workspace builds the Wyrmctl CLI and five independently installable DNS providers. It also contains the desired-state contracts, Nginx Proxy Manager test stack, and release workflows.
Review owner-scoped changes from version-controlled YAML before applying them to a shared Nginx Proxy Manager instance.
Use Wyrmctl from a local shell or CI when you need repeatable plan and apply workflows against Nginx Proxy Manager. The Wyrmctl CLI is part of the Portwyrm project, which provides the service and control plane.
Validate and migrate desired state offline, inspect API capabilities, export immutable plan artifacts, and load optional DNS providers. Review adoption, transfer, and prune operations through their explicit workflows.
wyrmctl 0.4 adds independently versioned contracts, DesiredState v3, canonical semantic digests, repository manifests, lockfiles, immutable plan artifacts, transactional migration manifests, provider capability negotiation, and stable machine-readable command results.
wyrmctl contract list
wyrmctl repo validate .wyrmctl/repository.yaml
wyrmctl plan .wyrmctl/production --artifact-out .wyrmctl/artifacts/plan.yaml \
--repository groupsum/example --environment production --commit "$GITHUB_SHA"
wyrmctl apply --artifact .wyrmctl/artifacts/plan.yaml \
--repository groupsum/example --environment production --commit "$GITHUB_SHA"Ordinary plan artifacts may create, update, or verify resources. Adoption, transfer, prune, and delete require an explicit reviewed migration artifact.
Run the reverse proxy separately through Nginx Proxy Manager or Portwyrm. The CLI invokes an existing API and scopes reconciliation to explicitly managed resources.
- Python
3.10,3.11,3.12,3.13, or3.14 - Access to a Nginx Proxy Manager API, usually
http://host:81/api - NPM admin credentials or an account with permissions for the resources you want to manage
- Optional for local development: Docker and Docker Compose
Install the system-facing CLI in an isolated tool environment with pipx install wyrmctl or uv tool install wyrmctl. To use the checkout, run uv sync --all-packages.
This is a source-only workspace or test harness, not an installable distribution. From its checkout, synchronize the declared environment:
uv syncThis is a source-only workspace or test harness, not an installable distribution. Use the uv checkout workflow above; this installer does not install the harness itself.
This is a source-only workspace or test harness, not an installable distribution. Use the uv checkout workflow above; this installer does not install the harness itself.
Source: examples/readme/quick_start.py.
from wyrmctl.cli import main
raise SystemExit(main(["--help"]))The command prints Wyrmctl’s help and exits successfully without opening an API connection.
Source: examples/readme/usage.py.
from wyrmctl.cli import main
raise SystemExit(main(["--output", "json", "contract", "list"]))The example lists the contracts known to the installed CLI in JSON. Validate YAML before connecting to the live API.
Validate desired state without calling NPM:
wyrmctl validate examples/desired-state
wyrmctl --output json validate examples/desired-stateCheck whether files need schema migration:
wyrmctl migrate examples/desired-state --check
wyrmctl migrate examples/desired-state --writeFetch the live NPM OpenAPI schema:
wyrmctl schema fetch --write schemas/npm/live-openapi.jsonInspect endpoint capabilities from a schema file or from the live API:
wyrmctl schema capabilities --schema schemas/npm/2.10.4/openapi.json
wyrmctl schema capabilities
wyrmctl schema checkPlan owner-scoped changes:
wyrmctl plan examples/desired-state --owner workload-a
wyrmctl --output json plan examples/desired-state --owner workload-aApply a clean plan:
wyrmctl apply examples/desired-state --owner workload-aPreview the apply path without mutation:
wyrmctl apply examples/desired-state --owner workload-a --dry-runDelete owned resources that are no longer present in desired state:
wyrmctl apply examples/desired-state --owner workload-a --prune-ownedAdopt unmanaged matching resources by writing wyrmctl metadata:
wyrmctl adopt examples/desired-state --owner workload-aStrict adoption requires the unmanaged resource fields to match desired state. To allow field drift while attaching metadata:
wyrmctl adopt examples/desired-state --owner workload-a --allow-field-driftDesired state
A minimal proxy host:
apiVersion: wyrmctl.com/v1
schemaVersion: 2
proxy_hosts:
- domain_names: [app.example.com]
forward_scheme: http
forward_host: app
forward_port: 3000
meta:
managed_by: wyrmctl
owner: workload-a
resource_id: proxy.appA proxy host with certificate and access-list references:
apiVersion: wyrmctl.com/v1
schemaVersion: 2
certificates:
- name: wildcard-example
domain_names: ["*.example.com", example.com]
certificate_type: letsencrypt
api_payload:
provider: letsencrypt
meta:
managed_by: wyrmctl
owner: workload-a
resource_id: cert.wildcard-example
access_lists:
- name: private-admins
api_payload:
satisfy_any: 0
items: []
clients: []
meta:
managed_by: wyrmctl
owner: workload-a
resource_id: acl.private-admins
proxy_hosts:
- domain_names: [app.example.com]
forward_scheme: http
forward_host: app
forward_port: 3000
certificate_ref: cert.wildcard-example
access_list_ref: acl.private-admins
ssl_forced: 1
http2_support: 1
allow_websocket_upgrade: 1
caching_enabled: 1
block_exploits: 1
meta:
managed_by: wyrmctl
owner: workload-a
resource_id: proxy.appMore examples are in examples/desired-state.
You can pass API credentials on every command:
wyrmctl --base-url http://127.0.0.1:81/api --identity admin@example.com --secret changeme healthFor regular use, set environment variables:
export NPM_BASE_URL=http://127.0.0.1:81/api
export NPM_IDENTITY=admin@example.com
export NPM_SECRET=changeme
export NPM_TIMEOUT_S=15PowerShell:
$env:NPM_BASE_URL = "http://127.0.0.1:81/api"
$env:NPM_IDENTITY = "admin@example.com"
$env:NPM_SECRET = "changeme"
$env:NPM_TIMEOUT_S = "15"Then verify connectivity:
wyrmctl health0: success1: plan conflict2: usage, validation, or migration error3: API error4: endpoint capability error
- Author YAML with explicit
meta.ownerandmeta.resource_id. - Run
wyrmctl validate. - Run
wyrmctl schema checkagainst the target NPM instance. - Run
wyrmctl plan --owner <owner>. - Review creates, updates, deletes, adopts, noops, and conflicts.
- Run
wyrmctl apply --owner <owner>only when the plan is clean. - Use
--prune-ownedonly when absent owned resources should be deleted.
The Wyrmctl workspace owns the desired-state definitions and operator workflow for Wyrmctl-managed resources. Nginx Proxy Manager maintains live proxy and access configuration.
Automation can use the wyrmctl console script, the versioned artifact formats, and structured output. Python callers can invoke wyrmctl.cli.main with an explicit argument list.
This package declares no command-line, GUI, or plugin entry points in its manifest.
The CLI uses the configured Nginx Proxy Manager API and its OpenAPI capabilities. DNS operations load installed providers through Python package entry points.
CI pipelines consume JSON command results and plan artifacts. The CLI consumes Nginx Proxy Manager HTTP endpoints and the Wyrmctl DNS provider protocol.
DNS packages register providers under wyrmctl.dns_providers. See the provider contracts and capabilities.
The repo includes a SQLite-backed NPM stack for local testing:
docker compose -f deploy/npm/docker-compose.yml up -d
export NPM_BASE_URL=http://127.0.0.1:81/api
export NPM_IDENTITY=admin@example.com
export NPM_SECRET=changeme
wyrmctl healthFor details, see deploy/npm/README.md.
Run wyrmctl health to check API access, wyrmctl schema check to verify endpoint coverage, and wyrmctl dns doctor --provider NAME to troubleshoot provider configuration.
- Every managed resource must carry
meta.managed_by: wyrmctl,meta.owner, andmeta.resource_id. --ownerlimits planning and mutation to one owner scope.- Foreign-owned resources are immutable to the current owner.
- Unmanaged resources are not changed by
planorapply; useadoptto attach wyrmctl metadata. - Deletes are opt-in with
--prune-owned. - API operations are gated by the NPM OpenAPI schema and fail closed when a required endpoint is unavailable.
The CLI and provider releases support Python 3.10 through 3.14. Use Python 3.11 or later for the README Standards development gate.
The native wyrmctl profile uses wyrmctl.* contracts. Existing Nginx Proxy Manager workflows may continue to use the compatibility profile documented in the CLI guide.
Run uv run pytest from the repository checkout. See the test workflow for the hosted checks.
The repository runs GitHub Actions quality and live Nginx Proxy Manager gates. It does not claim independent certification.
The versioned CLI tests cover contract commands, repository validation, and plan artifact behavior.
Why review a plan first?
It shows the proposed owner-scoped operations and exposes collisions before apply.
How are existing manual resources adopted?
Run wyrmctl adopt explicitly for a compatible resource and the intended owner. Later plans use the resulting ownership metadata.
When does Wyrmctl issue a certificate?
It issues missing desired certificates when the configured provider and API support issuance. Renewal follows the certificate reconcile policy.
- Portwyrm relationship
- CLI
- Desired state
- Owner-scoped reconciliation
- Schema migrations
- NPM API compatibility
- SSL certificates
- Access lists
- DNS records
- DNS provider packages
- Namecheap DNS extension
- Adoption
- GitHub Actions
Install wyrmctl for the CLI. See the DNS provider comparison to choose a provider and configure its credentials.
Open an issue or pull request in the Wyrmctl repository. Include a reproducible desired-state example for reconciliation changes and the checks you ran.
Run the normal local checks:
uv sync
uv run ruff check .
uv run ruff format --check .
uv run pytest
uv build --package wyrmctlRun the live Wyrmctl suite against the pinned Portwyrm image:
export COMPOSE_FILE=deploy/portwyrm/compose.ci.yml
export COMPOSE_PROJECT_NAME=wyrmctl-portwyrm-local
docker compose up -d
export NPMCTL_REAL_NPM=1
export NPM_BASE_URL="http://$(docker compose port portwyrm 81)/api"
export NPM_IDENTITY=admin@example.test
export NPM_SECRET=wyrmctl-test-password
uv run pytest --no-cov -m npm packages/wyrmctl/tests/e2e
docker compose down --volumesRun uv run readme-standards render --all --write after changing a manifest or an example. Run uv run readme-standards check --all before release.
The GroupSum Wyrmctl repository maintainers review changes to reconciliation behavior, release metadata, and supported provider contracts.
Follow the repository’s contributor guidance and the versioned desired-state and artifact contracts.
Wyrmctl is maintained as a beta CLI. Use wyrmctl migrate PATH --check before changing desired-state versions and review the migration guide.
Licensed under Apache-2.0. See LICENSE.
No separate NOTICE file is declared. Review the license and bundled third-party attributions.
