The attune command-line interface and its natural-language router

Overview

The attune command-line interface is the terminal front door to the framework. It has two layers:

You invoke it as attune <command> (the installed console script) or python -m attune.cli_minimal.

Concepts

Invocation

The packaged entry point is attune = attune.cli_minimal:main ([project.scripts]), so attune <command> runs the CLI; python -m attune.cli_minimal is equivalent. attune --help lists the commands; attune doctor checks the install.

Command groups

cli_minimal registers grouped subcommands, each dispatched to a cmd_* handler:

The natural-language router

attune.cli_router maps user input to a workflow or skill. is_slash_command(text) tells a /command from prose. route_user_input(user_input, context=None) is async and returns a routing dict (workflow, skill, confidence, reasoning, args, secondary_workflows, type, source, …). SmartRouter exposes route (async) / route_sync (sync) / list_workflows / get_workflow_info / suggest_for_error / suggest_for_file; HybridRouter adds get_suggestions and learn_preference; RoutingPreference carries routing preferences.