Skip to main content

limen.cli.commands

One thin handler per limen subcommand, keeping the Click group in main.py declarative.

Canonical docs

What this package owns

Owns the implementation body behind each limen subcommand: argument handling, calls into limen.yaml and limen.experiment, and console output. Does not own the Click command declarations (those live in limen/cli/main.py), manifest semantics, or experiment execution internals.

Key entry points

Entry pointUse caseNotes
run.py:run_experiment()Compile a YAML manifest and run the Universal Experiment LoopBacks limen run; accepts YAML files and manifest://sha256: URIs
resume.py:run_resume()Continue a checkpointed artifact-backed runBacks limen run --resume
validate.py:run_validate()Validate a YAML manifestBacks limen validate
profile.py:run_profile()Parameter-space and runtime profilingBacks limen profile; samples the configured data source with a covering array
init.py / new.py / list_templates.pyScaffold projects and discover bundled templatesReads limen/yaml/templates
commit.py / ls.py / fork.py / lineage.py / backup.py / reindex.pyCommitted manifest storage and lineageOperate on project-local manifests/committed state

Adjacent modules

  • limen.cli.main declares the Click group and registers every handler here.
  • limen.yaml parses, validates, compiles, stores, and profiles the manifests these commands act on.
  • limen.experiment executes the compiled SFD through UEL.

Quick orientation

commands/
├── _constants.py # Shared command constants
├── _load_yaml.py # Shared YAML loading helper
├── run.py # limen run
├── resume.py # limen run --resume
├── validate.py # limen validate
├── profile.py # limen profile
├── init.py # limen init
├── new.py # limen new
├── list_templates.py # limen list-templates
├── commit.py # limen commit
├── ls.py # limen ls
├── fork.py # limen fork
├── lineage.py # limen lineage
├── backup.py # limen backup
└── reindex.py # limen reindex

Things to know

  • Handlers should stay thin. YAML semantics belong in limen.yaml and execution semantics belong in limen.experiment.
  • Each handler returns a bool (or None) and prints its own operator-facing output; main.py maps that to the process exit code.
  • Modules prefixed with _ (_constants.py, _load_yaml.py) are shared internals, not commands.