Skip to content

Commit

Permalink
feat: added examples for commands
Browse files Browse the repository at this point in the history
  • Loading branch information
field123 committed Sep 22, 2023
1 parent 631675e commit 2d73304
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export function createConfigCommand(
configClearCommand(ctx.store)
},
})
.example("$0 config list", "list all stored configuration")
.example("$0 config clear", "clear all stored configuration")
.help()
.demandCommand(1)
.strict()
Expand Down
6 changes: 3 additions & 3 deletions packages/composable-cli/src/commands/login/login-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ export function createLoginCommand(
type: "string",
description: "Password of Elastic Path account",
})
.example("composable login", "using interactive prompts")
.example("$0 login", "using interactive prompts")
.example(
"composable login --region=us-east [email protected] --password=topSecret",
"$0 login --region=us-east [email protected] --password=topSecret",
"using command line arguments"
)
.help("h")
.help()
.parserConfiguration({
"strip-aliased": true,
})
Expand Down
2 changes: 2 additions & 0 deletions packages/composable-cli/src/composable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export async function main({
.command(createStoreCommand(commandContext))
.command(createGenerateCommand(commandContext))
.command(createInsightsCommand(commandContext))
.example("$0 login", "using interactive prompts")
.example("$0 logout", "logout of the CLI")
.strictCommands()
.demandCommand(1)
.help("h").argv
Expand Down

0 comments on commit 2d73304

Please sign in to comment.