invopop / gobl.cli

The GOBL Command Line Interface
Apache License 2.0
3 stars 0 forks source link

Refactor CLI to more closely reflect Web interface #59

Closed samlown closed 2 years ago

samlown commented 2 years ago

The current CLI consists of the following principal commands (there are more utility commands):

The Web UI however is highlighting a different way to interact with GOBL envelopes and documents which feels a bit more intuitive. The following set of key actions will align both interfaces. All commands output a complete GOBL Envelope, regardless of the input which may be a partial envelope, or a document:

With these set of changes, we can then focus on refining the meaning of the other commands:

samlown commented 2 years ago

@dstotijn @renegalindo I've tried to refine some of the comments in Slack here. Essentially, the idea is to move to a consistent interface between command line and Web.

dstotijn commented 2 years ago

sign - requires that the envelope is no longer a draft, will validate and then sign the envelope.

You reckon this needs to be a separate command? Or could signing be achieved by using the build command, passing an envelope with head.draft set to false? Or wouldn't that be correct because build always calculates (and sign wouldn't)?

samlown commented 2 years ago

you're right... "build" does seem a bit redundant with these descriptions. Maybe build should just calculate and validate, without a signature, whereas sign does the same and adds the signature, but only for non-drafts... I'll modify the text to see.