Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create single cli using oclif v2 #149

Closed
sinkcup opened this issue Mar 10, 2022 · 4 comments
Closed

How to create single cli using oclif v2 #149

sinkcup opened this issue Mar 10, 2022 · 4 comments

Comments

@sinkcup
Copy link

sinkcup commented Mar 10, 2022

We know oclif v2 remove single cli generate, see: oclif/oclif#563

so we have created a multi cli project.

but the docs doesn't tell us how to change code of oclif v2 multi cli to single cli, maybe alias or default?

image

@RodEsp
Copy link
Contributor

RodEsp commented Mar 10, 2022

Hi @sinkcup, oclif v2 no longer supports "single" CLIs as they were defined by oclif v1.

You can create a CLI with a single command (for example mycli single-command) but not an executable that just runs one command (e.g. mycli). If you want that you're probably better off just writing an individual script and running it with node (e.g. node mycli.js).

Hope that answers your question.

@RodEsp RodEsp closed this as completed Mar 10, 2022
@sinkcup
Copy link
Author

sinkcup commented Mar 11, 2022

Thx, I have decided to use oclif v1, it's very good for single cli.

@sinkcup
Copy link
Author

sinkcup commented Mar 18, 2022

the blog said:

With the introduction of default command functionality, Core simplifies the oclif project and removes the notion of single or multi command CLIs.

but there is no default command in docs. @RodEsp

image

@techieshark
Copy link

See also: oclif/oclif#998 (comment) - may address the original question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants