siera-cli icon indicating copy to clipboard operation
siera-cli copied to clipboard

Make it clear the location of the flags matter

Open TimoGlastra opened this issue 3 years ago • 3 comments

I always find this quite annoying about the docker cli, where it matters in which place the flags are passed (docker --flag run --other-flag is not the same as docker --other-flag run --other-flag). This makes sense for command specific arguments (e.g. --qr) but feels quite confusing for other flags.

Maybe the error message ("Error: No endpoint supplied. Supply an endpoint either via `--endpoint` or via `--config`") can be extended to make this more clear.

❯ aries-cli connections get-all
Error: No endpoint supplied. Supply an endpoint either via `--endpoint` or via `--config`

~
❯ aries-cli connections get-all --endpoint https://agent.community.animo.id
error: Found argument '--endpoint' which wasn't expected, or isn't valid in this context

	If you tried to supply `--endpoint` as a value rather than a flag, use `-- --endpoint`

USAGE:
    aries-cli connections get-all

For more information try --help

TimoGlastra avatar Feb 22 '22 08:02 TimoGlastra

Yeah it is quite annoying. I think it is possible to have some global flags, but for right now I will expand the error message.

berendsliedrecht avatar Feb 22 '22 10:02 berendsliedrecht

@jl-animo is this something you can pick up with the help messages?

berendsliedrecht avatar Mar 01 '22 19:03 berendsliedrecht

I took a look at this again today, and I came to the same conclusion that I think its technically possible to add but there will be a lot of collision.

siera -a connection invite -a -> first -a is --api-key and second a is ---auto-accept

Do you think that some documentation at the siera -h command would suffice?

berendsliedrecht avatar Apr 28 '23 18:04 berendsliedrecht