2
0
Fork
You've already forked cli
0

Help and version commands #1

Open
opened 2023年06月30日 16:16:44 +02:00 by almereyda · 1 comment
almereyda commented 2023年06月30日 16:16:44 +02:00 (Migrated from github.com)
Copy link

When using the Lume CLI, I would like to be able to check which commands are available, and from which version I'm running.

Common conventions for CLI tools are to make these functions available with --help/-h and --version/-v flags. In other conventions, these functionalities are implemented by triggering commands, such as help or version.

It could be nice, if the Lume CLI would support basic implementations for both.

Filing this here, because this is the CLI wrapper for the original command.

References:

When using the Lume CLI, I would like to be able to check which commands are available, and from which version I'm running. Common conventions for CLI tools are to make these functions available with `--help`/`-h` and `--version`/`-v` flags. In other conventions, these functionalities are implemented by triggering commands, such as `help` or `version`. It could be nice, if the Lume CLI would support basic implementations for both. Filing this here, because this is the CLI wrapper for the original command. References: * [Command line usage - Lume](https://lume.land/docs/overview/command-line/) * [lume/cli.ts at master · lumeland/lume · GitHub](https://github.com/lumeland/lume/blob/master/cli.ts) * https://github.com/lumeland/lume/issues/232

Ok, it makes sense.

Lume CLI is just a wrapper to deno task lume. It means that if you run lume --version it runs deno task lume --version and returns the version of Lume used in your project (not the version of Lume CLI). And the same happens to lume -h.

But it's true that the CLI fails if lume task doesn't exist in the current directory. Maybe in this case the error should be catched and show some helpful information.

Ok, it makes sense. Lume CLI [is just a wrapper to `deno task lume`](https://github.com/lumeland/cli/blob/main/mod.ts#L21). It means that if you run `lume --version` it runs `deno task lume --version` and returns the version of Lume used in your project (not the version of Lume CLI). And the same happens to `lume -h`. But it's true that the CLI fails if `lume` task doesn't exist in the current directory. Maybe in this case the error should be catched and show some helpful information.
Sign in to join this conversation.
No Branch/Tag specified
main
v2.2.1
v2.2.0
v2.1.1
v2.1.0
v2.0.0
v1.0.3
v1.0.2
v1.0.1
v1.0.0
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lume/cli#1
Reference in a new issue
lume/cli
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?