BUT when I actually install cargo install --path . and call it cargo <proj-name> ... it the <proj-name> token is actually passed as argument to clap which sort breaks the logic and forces to add an extra field in the struct used with Parser derive.
When Cargo invokes a custom subcommand, the first argument to the subcommand will be the filename of the custom subcommand, as usual. The second argument will be the subcommand name itself. For example, the second argument would be ${command} when invoking cargo-${command} . Any additional arguments on the command line will be forwarded unchanged.
To handle this in clap, you can use a unit enum subcommand: