AndcultureCode.Cli
and-cli
command-line tool to manage the development of software applications.
Getting started
From the root of the cloned or forked repository, run this command:
npm install && ./cli.js install
What this does:
- Installs a global version of the npm package
- Creates an alias
and-cli
for the installed version of the npm package in your project, which defaults to globally installed package if not installed for project - Creates an alias
and-cli-dev
for the running the cli while developing for it, via the directory in which you cloned or forked the repository
To install and-cli
only for the current project, run this in its root directory:
# npm
npm install --save-dev and-cli
# yarn
yarn add and-cli --dev
To install the CLI globally, do:
# npm
npm install and-cli -g
# yarn
yarn global add and-cli
The documentation for and-cli
can be found in COMMANDS.md.
Troubleshooting
Leading slash auto-converted to absolute path
Due to POSIX auto path conversion if you have an argument that needs to start with a leading slash "/". Escape it with an additional slash "//".
Upon application startup the CLI will replace it with the single slash "/".
Value for command arguments are out of order
Depending upon the shell/terminal you are using, the node process sometimes requires the --
delimiter between the command and the arguments. Otherwise, especially in a shell like windows command prompt, the value for arguments gets piped out of order.
Example:
- Before:
and-cli dotnet --cli "test db migrate"
- Works in most shells, but requires the arguments to be in quotes. Fails in windows command prompt
- After:
and-cli dotnet -- --cli test db migrate
- Portable and doesn't require quotes
Command listed in documentation is not found or functioning as expected
If you are using the project alias, check to make sure the version in your package.json
is up to date. You can ensure the latest is installed by running:
npm install --save-dev and-cli@latest
If you don't have the package installed in your project and you're using a global package, you can check the current version with:
npm list -g --depth=0 | grep and-cli
The latest version can be installed by running:
npm install --global and-cli@latest