npm.io
1.0.4 • Published 7 years agoCLI

@nickspencer2/chord-cli

Licence
MIT
Version
1.0.4
Deps
5
Size
13 kB
Vulns
0
Weekly
0

Chord CLI

What is this?

chord-cli is a project I created to make using the chord project easy by providing a command line interface for common tasks.

How do I install it?

To install this tool, from your terminal run

npm install @nickspencer2/chord-cli

Check that installation was successful by running

chord-cli version

You should see something like

chord-cli version: 1.0.0

How do I use it?

Once you've installed chord-cli, you can use its subcommands from your terminal. The available subcommands are:

Commands Table
Subcommand Description
version outputs the installed version of chord-cli
setup generates the required configuration for chord
command creates the required code for a new chord command

Subcommands

Each subcommand can be used like this from your terminal:

chord-cli <subcommand> <arguments>
Arguments

The arguments for a subcommand can be passed by either long form, e.g. chord-cli setup --outputDirectory myproject or short form, e.g. chord-cli setup -o myproject. If arguments are not provided on the command line, chord-cli will interactively prompt for the desired values.

The flag string for each command (i.e. --outputDirectory and -o for setup) is generated by taking the field name as the long form (i.e. outpuDirectory becomes --outputDirectory) and the first letter of the field name as the short form (i.e. outputDirectory becomes -o). If two fields begin with the same letter, the first field takes precedence. (i.e. for setup, -d refers to the discordToken field, not the defaultVolume field).

Version Subcommand

Description

Outputs the installed version of chord-cli.

Arguments

No arguments required.

Setup Subcommand

Description

Generates the required configuration for chord.

Arguments

Name Long Hand Short Hand
discordToken --discordToken -d
youtubeKey --youtubeKey -y
prefix --prefix -p
defaultVolume --defaultVolume None
outputDirectory --outputDirectory -o
owner --owner None
Command Subcommand

Description

Creates the required code for a new chord command.

Arguments

Name Long Hand Short Hand
label --label -l
descriptionString --descriptionString -d
usageString --usageString -u
permissions --permissions -p
outputDirectory --outputDirectory -o
type --type -t

Keywords