# clikt

Marc Plano-Lesay

11/09/2023, 11:04 AM
Is there a way to somehow split the top-level command and subcommands in two distinct phases? I'd like to leverage the top-level command for generic arguments (e.g. a
flag), that I could then inject through Dagger in different subcommands. But from what I understand of Clikt's subcommands, I'd need to have them initialised before the parent's parsing is done, I believe?

Sebastian Schuberth

11/10/2023, 12:03 PM
We're doing something like that with "global" onfig CLI options that are passed to subcommands via the context. No need for a DI framework here: