lenso-cli
Command-line interface for the Lenso backend framework.
Install
Scaffold a host application
The package name defaults to the target directory name and can be overridden with
--name. Pass --force to scaffold into a non-empty directory.
Release builds of lenso-cli also copy the bundled Runtime Console into the
new project, so the API serves it at /console without requiring Node.js or
pnpm in the host application.
Update the hosted console later by upgrading lenso-cli and running:
The generated host depends on the transitional lenso-host crate while the
stable public host facade is still being designed. See
docs/architecture/framework-public-surface.md
for the host-facade roadmap.
Scaffold a module
Add --with-console when the linked module should also get a Runtime Console
workspace package:
For a standalone remote package:
The Runtime Console package generator is available directly as:
Install a module
module install reads source from the module descriptor when one is present.
Remote modules update REMOTE_MODULES, write the local console package install
plan, record .lenso/module-installs.json, and apply Runtime Console package
registration when the manifest declares console packages. Linked modules update
the host Cargo.toml, src/lib.rs, .env toggle, and the same install
receipt from the descriptor's linked section. module add remains a
compatibility alias for remote installs.
Use --runtime-console-root when the console app lives outside the host
repository, and --no-console-plan when you want to apply the plan later with:
Remote manifests may also declare install.env values and install.commands.
Env values are written to .env; commands are recorded in the plan and run only
when you pass:
For long-running remote module backends, declare install.services. These are
stored in .lenso/module-services.json and started before the host loads remote
modules on API/worker startup. Services started by the host are tracked with
.lock/.pid files and stopped when the owning API/worker process exits;
services that are already ready before startup are treated as external and are
not stopped by the host.
Diagnose installed remote-module service state with:
The doctor reads REMOTE_MODULES and .lenso/module-services.json, checks
service readyUrl endpoints, and points to stale .lock/.pid files when a
host-started service did not become ready.
Remove the local remote-module source, install receipt, and pending console package plan with:
Use --source linked only when you need to force the loading source. Prefer
descriptors with a source field for new installs.