I am using yargs for getting CLI arguments. I want to know the difference between command and option.
const argv = yargs
.command(
'add',
'Add a new note',
{
title: titleOptions,
body: bodyOptions
})
.argv;
And
const argv = yargs
.option('address', {
alias: 'a',
demand: true,
describe: 'Address for fetching weather'
})
.help()
.alias('help', 'h')
.argv