dennis gao
dennis gao

Reputation: 11

How can I create a single command cli with oclif?

I'm writing a CLI using oclif. I want to use it like mycli [flags]. But I could't found a method to create a silgle command CLI.

I have read oclif's docs, https://oclif.io/docs/flags; There's nothing about single how to create single command CLI;

I have read this: https://github.com/oclif/oclif/issues/277, and have rename a command to index. It didn't work;

I have read this: https://egghead.io/lessons/javascript-create-a-single-command-node-js-cli-with-oclif-typescript-and-yarn-workspaces; But look like the oclif siangle command has been dispatched;
I want to use Mycommand.run method, but the --help and --version flags would not work;

How can I create a single command cli?

Upvotes: 1

Views: 306

Answers (0)

Related Questions