-
Falyx 0.2.0 Stable
released this
2026-06-07 13:07:04 -04:00 | 1 commits to main since this releaseFalyx v0.2.0 Release Notes
Falyx v0.2.0 is a major runtime and CLI architecture release. It tightens the separation between routing, command parsing, execution, and reusable action composition while making Falyx more reliable as both a full CLI framework and a standalone command runner.
Highlights
New routed runtime architecture
Falyx now has a cleaner execution pipeline:
Falyxowns routing across commands and namespacesCommandowns command-local argument resolutionCommandExecutorowns shared execution lifecycle behaviorCommandRunnerowns standalone single-command executionOptionsManagerowns scoped runtime state
This makes CLI mode, menu mode, nested namespaces, previews, help rendering, TLDR output, and programmatic execution behave more consistently.
New
CommandExecutorCommandExecutorcentralizes resolved command execution. It now handles:- executor-level lifecycle hooks
- execution-scoped option overrides
- retry overrides from parsed execution arguments
- wrapped or raised error behavior
- execution summaries
- consistent command dispatch from both
FalyxandCommandRunner
New
CommandRunnerCommandRunnerprovides a focused way to run a singleCommandoutside a fullFalyxapp.Useful for:
- standalone scripts
- testing one command directly
- exposing a single command as a CLI entrypoint
- reusing commands without loading a full menu runtime
Example pattern:
runner = CommandRunner.from_command(command) asyncio.run(runner.cli())Command cloning and safe rebinding
Commands and actions can now be cloned and rebound safely.
This prevents shared mutable runtime state from leaking when the same command is registered in a
Falyxapp, wrapped by aCommandRunner, or reused across runtimes.Added clone support across major action types, including:
ActionActionFactoryActionGroupChainedActionConfirmActionFallbackActionHTTPActionLoadFileActionMenuActionProcessActionProcessPoolActionPromptMenuActionSaveFileActionSelectFileActionSelectionActionShellActionSignalActionUserInputAction
Canonical command construction
Command.build()is now the central command construction path.It normalizes command setup for:
- hooks
- retry policy
- execution options
- argument parser binding
- spinner hooks
- shared
OptionsManager - custom help, usage, and TLDR renderers
Command.clone_with_overrides()adds a safe way to derive a bound command from an existing command while changing runtime-specific fields.CLI and routing changes
Native Falyx bootstrap flow
The package entrypoint now uses Falyx-native commands instead of the old argparse bootstrap flow.
The built-in bootstrap commands are now modeled as normal Falyx commands:
I/initG/init-global
This makes bootstrap behavior consistent with the rest of the framework.
Root parser and namespace parser improvements
Falyx now uses
FalyxParserfor root/session and namespace-level option parsing.This supports:
- root options such as verbose/debug/never-prompt behavior
- namespace-level options
- TLDR registration
- forwarding command-local help after route boundaries
- typed defaults and choices
- option suggestions for completion
Scoped option namespaces
Runtime state is now separated into option namespaces.
Important scopes include:
rootdefaultexecution
This prevents root/session flags, namespace options, and command execution overrides from clobbering each other.
Improved nested namespace support
Nested
Falyxinstances are now modeled throughFalyxNamespace.This improves:
- recursive routing
- namespace help
- namespace TLDR examples
- completion
- aliases
- invocation path rendering
Argument parsing improvements
Execution options
Commands can opt into execution-scoped options independently from domain arguments.
Supported execution option groups include:
summaryretryconfirm
These can expose flags such as:
--summary--retries--retry-delay--retry-backoff--confirm--skip-confirm
Argument groups and mutually exclusive groups
CommandArgumentParsernow supports grouped arguments and mutually exclusive argument groups.This enables cleaner help output and stricter command contracts.
Better command-local parsing boundary
Command arguments are now resolved through
Command.resolve_args(), which splits parsed input into:- positional args
- keyword args
- execution args
Execution args affect runtime behavior and are not passed into the underlying action.
Better errors
Parser and routing errors now carry more structured context and hints.
New or improved error types include:
UsageErrorFalyxOptionErrorArgumentParsingErrorEntryNotFoundErrorUnrecognizedOptionErrorInvalidValueErrorMissingValueErrorTokenizationError
print_error()now renders Falyx error hints automatically when available.Completion improvements
Completion is now routing-aware.
The completer now:
- resolves partial namespace routes before suggesting command arguments
- supports nested namespace completions
- delegates command-local completions to
CommandArgumentParser.suggest_next() - handles namespace-level option suggestions
- preserves preview-prefixed input
- improves longest-common-prefix behavior
- quotes suggestions containing spaces
Help, usage, and TLDR improvements
v0.2.0 adds context-aware invocation rendering through
InvocationContext.Help, usage, preview, and TLDR output can now preserve the routed command path, including nested namespace paths.
This is especially useful for deeply nested CLIs where command help should reflect the exact path the user took to reach a command.
Action and workflow changes
never_promptbehaviorPrompt suppression now respects local action-level
never_promptsettings while still allowing root/session-level prompt behavior throughOptionsManager.Concurrent terminology
ActionGroupand shared context terminology now uses “concurrent” rather than “parallel” where the implementation is asyncio-based.File actions
File-related actions received reliability improvements:
LoadFileAction.preview()now awaits structured file loading correctlySelectFileActionnow raises parse failures instead of only logging themSaveFileActionnow supportsPath | str | Nonefile paths and prompt suppression
HTTP actions
HTTPActioncloning now preserves request configuration, retry policy, prompt behavior, and structured payloads more safely.Examples
The examples were updated to demonstrate the new runtime shape:
- argument examples now show namespace options, grouped arguments, mutex groups, TLDR examples, execution summaries, and custom type validation
- menu demo now demonstrates
CommandRunner.from_command() - submenu demo now demonstrates nested namespaces, namespace aliases, namespace options, and nested TLDR examples
- HTTP demo now uses an explicit program name
- YAML config now includes the argument examples submenu
Breaking changes
optionsrenamed tooptions_managerConstructor and runtime APIs now consistently use
options_manager.Code that passed
options=should be updated tooptions_manager=.Old argparse bootstrap path removed
The package entrypoint no longer builds argparse root/subparser objects for bootstrap commands. Bootstrap commands are now native Falyx commands.
Runtime modes changed
FalyxMode.RUNandFalyxMode.RUN_ALLhave been replaced by the routed command execution model.Use
FalyxMode.COMMANDfor direct command execution semantics.Command parsing now requires a valid parser boundary
Command.resolve_args()is the canonical parsing boundary. Custom parsing should be supplied through a valid custom parser orCommandArgumentParser.Commands registered from existing commands are cloned
Falyx.add_command_from_command()andCommandRunner.from_command()bind cloned command instances rather than mutating the original command.This is safer, but code relying on mutation of the original command after binding may need to be adjusted.
Migration notes
Replace
options=withoptions_manager=# Before runner = CommandRunner.from_command(command, options=options) # After runner = CommandRunner.from_command(command, options_manager=options)Use
CommandRunnerfor standalone commandscommand = flx.add_command( key="D", description="Deploy", action=deploy, ) runner = CommandRunner.from_command(command) asyncio.run(runner.cli())Prefer execution options over global execution flags
flx.add_command( key="D", description="Deploy", action=deploy, execution_options=["summary", "retry", "confirm"], )Use native Falyx routing for CLI entrypoints
if __name__ == "__main__": asyncio.run(flx.run())Summary
v0.2.0 is a foundation release. It makes Falyx more composable, more predictable, and easier to reason about by clarifying the boundaries between routing, parsing, execution, options, and action reuse.
Downloads