CLI

js/cli.md

The fino command is built from reusable Task objects. The executable uses the root task from fino:commands/root; applications can import individual command tasks from fino:commands/* when they need to mount the same behavior in another CLI, MCP server, agent tool set, or test harness.

Command Map

Reuse Command Tasks

Each built-in command module default-exports a Task:

import rootCommand from 'fino:commands/root';

await rootCommand.parse(['test', 'tests']);

Command tasks use the same Task model as application tasks from fino:task. They can be listed, mounted as children, exposed as tools, or invoked directly with a custom writer/prompt context. The internal:commands/* specifiers remain compatibility aliases for the runtime itself; new code should import fino:commands/*.

Shared Behavior

--help is handled by the task parser and is available on the root command and subcommands. Root-level --otlp-endpoint enables CLI OpenTelemetry bootstrap for script execution, and root-level --watch re-runs script workloads when watched imports change.

The root command keeps two shortcuts: bare fino starts the REPL, and fino app.ts is equivalent to fino run app.ts. Tokens after the script name belong to the script, so fino app.ts --config app.toml passes --config to app.ts.