Skip to content
Discussion options

You must be logged in to vote

It seems you're trying to invoke multiple subcommands simultaneously within a single command line using typer. I am not an expert of typer, but I don't think it natively support invoking multiple subcommands in one command line.

What are you trying to achieve? In a typical command-line interface, subcommands are designed to be mutually exclusive, meaning that only one subcommand can be executed at a time per command invocation.

When you run:

$ python main.py users create "user name" items create "item name"

Typer interprets items create "item name" as unexpected extra arguments for the users create subcommand because it's still processing the first subcommand.

If you absolutely need to ex…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by YuriiMotov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem
2 participants