Skip to main content

TUI for yunetas

This is the TUI (Terminal User Interface) for Yuneta Simplified

Icon

Yuneta Simplified is a development framework about messages and services, based on Event-driven, Automata-based and Object-oriented programming.

Yuneta is based in functions, but it manages a system of virtual classes defined by programmatically and schematically.

All his philosophy is based on that virtual classes (namely GClass or class G).

All architecture done by configuration, based in schema, easy to see by human eye. Of course, you have an API functions to change configuration and data in real time.

For Linux and RTOS/ESP32.

Versions in C, Javascript and (TODO) Python.

For more details, see doc.yuneta.io

Commands

yunetas init                  # create build dirs, compiler/build-type from .config (menuconfig)
yunetas build [-j N]          # make -jN install: SDK + registered projects
yunetas clean                 # make clean:   SDK + registered projects
yunetas test [-j N] [--serial] [--clean]
                              # make -jN install (SDK + root build/), then ctest -jN
                              # (serially on an SDK older than 7.26.3); the log is
                              # build/<date>.j<N>.txt

# External projects (registry in ~/.yuneta/projects.json, machine-local)
yunetas register-project <path>     # <path> must contain yunos/CMakeLists.txt
yunetas unregister-project <name>
yunetas list-projects
yunetas init|build|clean <name>...  # only those projects (SDK skipped)
yunetas init|build|clean --sdk-only # only the SDK

# Deploy targets (registry in ~/.yuneta/nodes.json, mode 600, no credential in it)
yunetas register-node <name> --url wss://<host>:1993 -I <issuer> -Z <client-id> -x <user>
yunetas register-node <name> --ssh yuneta@<host>   # tunnel to the node's loopback agent
yunetas unregister-node <name>
yunetas list-nodes

# Deploy (the agent tools ship inside this package, yunetas.agent_tools)
yunetas sync                  [-n|-a|...]          # binaries AND configs together (recommended)
yunetas sync-binaries         [-n|-a|...]          # outputs/yunos vs the agent
yunetas sync-configs          [-n|-a|-r|...]       # auto-match batches/<host>/ to the agent's realm_ids
yunetas sync-configs --host <host> [...]          # or target one batches dir explicitly
yunetas upgrade-yunos [--no-snap|--snap-name N|-y|-n]  # find-new-yunos -> snapshot -> deactivate-snap
yunetas set-start-priorities  [-n|-a|--rule P=N]  # launch tier of each yuno, by role

# every deploy command takes --node <name> (and --tunnel) to act on a registered node

On a runtime-only node (installed from the .deb/.rpm: outputs/, outputs_ext/, tools/ and .config, but no framework sources and no YUNETA_VERSION) there is no SDK to build, so init/build/clean with no arguments process the registered projects only — naming them is optional. --sdk-only is an error there.

The deploy commands exit with 1 when a push (or a restart they did) failed, so a script can tell. sync reads it: it does not push the configs after a failed binaries pass.

Deploy flow

Two steps: push the artifacts, then promote them.

# 1. Push binaries AND configs in one go (so a binary bump never ships
#    without its matching config bump — the verify-by-default footgun:
#    a new fail-closed runtime against a stale no-CA config breaks OIDC).
yunetas sync                  # = sync-binaries + sync-configs

# 2. Promote the freshly installed releases to primary and restart.
yunetas upgrade-yunos         # find-new-yunos (confirm) -> snapshot -> deactivate-snap

sync installs a new version next to the old one and does not activate it; upgrade-yunos is the promote step. It previews find-new-yunos first and stops there when there is nothing new, then asks, then shoots a rollback snapshot (idempotent by name; reuses an already-active snap instead of stacking a new one; --no-snap to skip), then runs create=1, then deactivate-snap triggers restart_nodes() on the agent. Preview the steps with -n.

A row that the agent marks already registered, pending promotion (deactivate-snap): create-yuno ... (a create=1 of an earlier run that was never promoted, SDK 7.25.5 and later) is counted apart. It needs no create=1, only the promotion:

1 new yuno row(s) would be created:
  create-yuno id=gate^one ...
1 yuno row(s) already registered, pending promotion:
  already registered, pending promotion (deactivate-snap): create-yuno id=gate^two ...
...
1 created, 1 already registered.

When every row is already registered, create=1 is skipped and the command goes on to deactivate-snap.

For a same-version hot-patch (no APP_VERSION bump) you don't need upgrade-yunos: sync-binaries stops each rebuilt yuno, overwrites its binary and starts it again (--no-restart to skip that).

A config is applied in one of two ways:

  • Same version, new content (UPDATE): the yuno reads it at its next start. sync-configs -r restarts the yunos that use it.
  • New version (BUMP): a yuno runs the config version of its own row, so a restart changes nothing. upgrade-yunos promotes it.

Remote nodes

Register the node once, then add --node <name> to any deploy command:

yunetas register-node prod --url wss://myhost:1993 \
    -I https://auth.example.com/realms/r -Z myhost -x me@example.com
export YUNETA_OAUTH_PASSW=...        # or YUNETA_OAUTH_JWT=<a token you have>
yunetas sync -n --node prod
yunetas upgrade-yunos --node prod

The registry stores where a node is and which identity you present, never a credential. The password comes from $YUNETA_OAUTH_PASSW (and the secret of a confidential client from $YUNETA_OAUTH_CLIENT_SECRET). The CLI never puts them on a command line, where any local user reads them in ps: the agent tools inherit them in the environment, and the CLI's own ycommand calls log in once and carry the token.

How to build this package

Build and publish

pdm builds and publishes it. No permanent install is needed:

  # 1. Change the version in yunetas/__version__.py, write the CHANGELOG, commit
  # 2. From the source root folder:
  pipx run pdm build
  pipx run pdm publish --no-build --username __token__ --password <your-api-token>

PyPI never accepts a version number twice: check the built wheel before the upload.

Tests

The tests use pytest and need the packages of the CLI (typer, rich):

  python3 -m venv /tmp/venv-yunetas
  /tmp/venv-yunetas/bin/pip install typer rich pytest
  /tmp/venv-yunetas/bin/python -m pytest tests

Install the package in editable mode using pip from the source root folder:

  pip install -e .

Metadata

Release files for yunetas 0.22.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yunetas 0.22.0
File Size Uploaded Provenance
yunetas-0.22.0.tar.gz 64.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for yunetas 0.22.0
File Interpreter ABI Platform
yunetas-0.22.0-py3-none-any.whl Python 3 none any Details

Total release size: 123.2 kB

Release files / yunetas-0.22.0.tar.gz

Download URL yunetas-0.22.0.tar.gz
Size 64.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c38181ac61da78f38e393c1c717727edf53ea1d17397bb873b6ad9c2f25071de
BLAKE2b-256 checksum
How to use checksums
beb1cbbcf8aaa286fc5a64ea2586ff2b4d0b5ed7ac1e8d50a707f9ae4aeb06b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.29.3 CPython/3.14.4 Linux/7.0.0-38-generic

Release files / yunetas-0.22.0-py3-none-any.whl

Download URL yunetas-0.22.0-py3-none-any.whl
Size 59.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2ec860a2b848583ce6a40b952954c670dc4ad3a5a339ccad5c13b148a1dd450
BLAKE2b-256 checksum
How to use checksums
d2aec8c9ae06115f86981d7b661316ee3446fc384546724fea45de817af9aa85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.29.3 CPython/3.14.4 Linux/7.0.0-38-generic

Security for yunetas 0.22.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.22.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page