pynydus.cmd.main

Nydus CLI: Typer application.

Entry point for nydus commands: spawn, hatch, inspect, extract, diff, registry operations, and key management. Validation is embedded in inspect and hatch. There is no standalone validate command.

Module Contents

Functions

_print_llm_status

Print LLM refinement status at the start of a pipeline command.

spawn

Create an Egg from source artifacts.

hatch

Deploy an Egg into a target runtime.

env

Generate a template .env file from an egg’s secrets.

inspect

Print Egg summary with inline validation.

_print_log_summary

Print a grouped summary table for a list of typed log entries.

_log_type_detail

Generate a detail string for a group of same-type log entries.

_load_egg_for_extract

Load an egg, handling errors consistently for all extract subcommands.

_write_extracted

Write extracted files to disk and print summary.

extract_mcp

Extract MCP server configs (mcp.json).

extract_skills

Extract Agent Skills (SKILL.md files).

extract_a2a

Extract A2A agent card (agent-card.json).

extract_apm

Extract APM manifest (apm.yml). Passthrough only.

extract_agents

Extract per-egg AGENTS.md deployment runbook.

extract_specs

Extract embedded spec snapshots.

extract_all

Extract all standard artifacts at once.

diff

Compare two Eggs.

delete

Delete an Egg.

keygen

Generate an Ed25519 keypair for egg signing.

push

Publish an Egg to the Nest registry.

pull

Download an Egg from the Nest registry.

register

Register a new account on the Nest registry.

login

Log in to the Nest registry and store credentials.

logout

Log out from the Nest registry (remove stored credentials).

Data

API

pynydus.cmd.main.app

‘Typer(…)’

pynydus.cmd.main._print_llm_status(llm_config) None

Print LLM refinement status at the start of a pipeline command.

pynydus.cmd.main.spawn(output: Annotated[pathlib.Path, typer.Option('-o', '--output', help='Output Egg path')] = Path('./agent.egg')) None

Create an Egg from source artifacts.

Discovers a Nydusfile in the current directory, then runs the spawning pipeline to produce an Egg.

Args: output: Path for the written .egg archive (default ./agent.egg).

pynydus.cmd.main.hatch(egg_path: Annotated[pathlib.Path, typer.Argument(help='Path to .egg file')], target: Annotated[str, typer.Option('-t', '--target', help='Target runtime')] = ..., output: Annotated[pathlib.Path | None, typer.Option('-o', '--output', help='Output directory (default: ./<target>/)')] = None, secrets: Annotated[pathlib.Path | None, typer.Option('-s', '--secrets', help='Path to .env substitution file')] = None, passthrough: Annotated[bool, typer.Option('-P', '--passthrough', help="Replay the egg's redacted raw/ snapshot instead of rebuilding from modules")] = False, skip_validation: Annotated[bool, typer.Option('-S', '--skip-validation', help='Skip egg validation before hatching')] = False) None

Deploy an Egg into a target runtime.

Args: egg_path: Path to the .egg file. target: Destination runtime (e.g. openclaw, letta, zeroclaw). output: Output directory for hatched files (default: ./<target>/). secrets: Optional .env path for placeholder substitution at hatch. passthrough: When set, replay the egg’s raw/ snapshot instead of rebuilding. skip_validation: When set, skip structural and per-standard validation.

pynydus.cmd.main.env(egg_path: Annotated[pathlib.Path, typer.Argument(help='Path to .egg file')], output: Annotated[pathlib.Path, typer.Option('-o', '--output', help='Output .env path')] = Path('./hatch.env')) None

Generate a template .env file from an egg’s secrets.

Args: egg_path: Path to the .egg file. output: Path for the generated .env template.

pynydus.cmd.main.inspect(egg_path: Annotated[pathlib.Path, typer.Argument(help='Path to .egg file')], show_secrets: Annotated[bool, typer.Option('-s', '--secrets', help='List all placeholders and occurrences')] = False, show_logs: Annotated[bool, typer.Option('-l', '--logs', help='Show pipeline log summary')] = False, no_validate: Annotated[bool, typer.Option('-n', '--no-validate', help='Skip per-standard validation')] = False) None

Print Egg summary with inline validation.

Args: egg_path: Path to the .egg file. show_secrets: List placeholders and occurrence counts. show_logs: Print a grouped summary of spawn_log entries. no_validate: When set, skip per-standard schema validation.

pynydus.cmd.main._print_log_summary(title: str, entries: list[dict]) None

Print a grouped summary table for a list of typed log entries.

pynydus.cmd.main._log_type_detail(entry_type: str, entries: list[dict]) str

Generate a detail string for a group of same-type log entries.

pynydus.cmd.main.extract_app

‘Typer(…)’

pynydus.cmd.main._load_egg_for_extract(egg_path: pathlib.Path) Egg

Load an egg, handling errors consistently for all extract subcommands.

pynydus.cmd.main._write_extracted(files: dict[str, str], output_dir: pathlib.Path, label: str) None

Write extracted files to disk and print summary.

pynydus.cmd.main.extract_mcp(egg_path: Annotated[pathlib.Path, typer.Option('-f', '--from', help='Path to .egg file')], output: Annotated[pathlib.Path, typer.Option('-o', '--output', help='Output directory')] = Path('.')) None

Extract MCP server configs (mcp.json).

pynydus.cmd.main.extract_skills(egg_path: Annotated[pathlib.Path, typer.Option('-f', '--from', help='Path to .egg file')], output: Annotated[pathlib.Path, typer.Option('-o', '--output', help='Output directory')] = Path('.')) None

Extract Agent Skills (SKILL.md files).

pynydus.cmd.main.extract_a2a(egg_path: Annotated[pathlib.Path, typer.Option('-f', '--from', help='Path to .egg file')], output: Annotated[pathlib.Path, typer.Option('-o', '--output', help='Output directory')] = Path('.')) None

Extract A2A agent card (agent-card.json).

pynydus.cmd.main.extract_apm(egg_path: Annotated[pathlib.Path, typer.Option('-f', '--from', help='Path to .egg file')], output: Annotated[pathlib.Path, typer.Option('-o', '--output', help='Output directory')] = Path('.')) None

Extract APM manifest (apm.yml). Passthrough only.

pynydus.cmd.main.extract_agents(egg_path: Annotated[pathlib.Path, typer.Option('-f', '--from', help='Path to .egg file')], output: Annotated[pathlib.Path, typer.Option('-o', '--output', help='Output directory')] = Path('.')) None

Extract per-egg AGENTS.md deployment runbook.

pynydus.cmd.main.extract_specs(egg_path: Annotated[pathlib.Path, typer.Option('-f', '--from', help='Path to .egg file')], output: Annotated[pathlib.Path, typer.Option('-o', '--output', help='Output directory')] = Path('./specs')) None

Extract embedded spec snapshots.

pynydus.cmd.main.extract_all(egg_path: Annotated[pathlib.Path, typer.Option('-f', '--from', help='Path to .egg file')], output: Annotated[pathlib.Path, typer.Option('-o', '--output', help='Output directory')] = Path('./extracted')) None

Extract all standard artifacts at once.

pynydus.cmd.main.diff(egg_a: Annotated[pathlib.Path, typer.Argument(help='First Egg')], egg_b: Annotated[pathlib.Path, typer.Argument(help='Second Egg')]) None

Compare two Eggs.

Args: egg_a: Path to the first .egg file. egg_b: Path to the second .egg file.

pynydus.cmd.main.delete(egg_path: Annotated[pathlib.Path, typer.Argument(help='Path to .egg file')]) None

Delete an Egg.

Args: egg_path: Path to the .egg file to remove.

pynydus.cmd.main.keygen(key_dir: Annotated[pathlib.Path | None, typer.Option('-d', '--dir', help='Directory to write keys to')] = None) None

Generate an Ed25519 keypair for egg signing.

Args: key_dir: Directory for private.pem and public.pem (default ~/.nydus/keys).

pynydus.cmd.main.push(egg_path: Annotated[pathlib.Path, typer.Argument(help='Path to .egg file')], name: Annotated[str, typer.Option('-n', '--name', help='Registry name (user/egg-name)')] = ..., version: Annotated[str, typer.Option('-v', '--version', help='Version string (e.g. 0.1.0)')] = ..., author: Annotated[str | None, typer.Option('-a', '--author', help='Author name')] = None) None

Publish an Egg to the Nest registry.

Args: egg_path: Path to the .egg file to upload. name: Registry-qualified name (e.g. user/my-agent). version: Semver string for this publish. author: Optional author override (otherwise env/default).

pynydus.cmd.main.pull(name: Annotated[str, typer.Argument(help='Registry name (user/egg-name)')], version: Annotated[str, typer.Option('-v', '--version', help='Version to pull')] = ..., output: Annotated[pathlib.Path, typer.Option('-o', '--output', help='Output path')] = Path('pulled.egg')) None

Download an Egg from the Nest registry.

Args: name: Registry-qualified egg name. version: Semver tag to pull. output: Destination path for the downloaded .egg.

pynydus.cmd.main.register(username: Annotated[str, typer.Argument(help='Username for the Nest registry')], password: Annotated[str, typer.Option('--password', '-p', prompt=True, hide_input=True, help='Password')] = ...) None

Register a new account on the Nest registry.

Args: username: Desired username. password: Password (prompted if omitted).

pynydus.cmd.main.login(username: Annotated[str, typer.Argument(help='Username for the Nest registry')], password: Annotated[str, typer.Option('--password', '-p', prompt=True, hide_input=True, help='Password')] = ...) None

Log in to the Nest registry and store credentials.

Args: username: Registry username. password: Password (prompted if omitted).

pynydus.cmd.main.logout() None

Log out from the Nest registry (remove stored credentials).