Package: plz-cmd
plz-cmdA shell command to execute standard/repeatable commands in a git repoInstallationInstall plz at the system level so that it only has to be installed once.pipinstallplz-cmd# sudo may be required on your machinesudopipinstallplz-cmdIt can also be installed inside a virtualenv.  However, this means you'll have
to install plz-cmd for each each virtualenv in use.virtualenvvenv
.venv/bin/activate

pipinstallplz-cmdExampleplz looks for aplz.yamlfile either in the current directory or in the root
of the git repo you're currently in. This file can (and should) be checked into
version control.For a plz.yaml file located in the git root directory, commands run will be
executed relative to that directory, not the current directory.Suppose we have the followingplz.yamlfile:commands:# String commandrun:./manage.py runserver# Array of commandtest:-./manage.py test-yarn test# Object command, which supports string and array `cmd`setup:description:Set up the development environmentcmd:-poetry install-poetry run ./manage.py migrate-yarn install# ls example is referenced further down in this READMEls:lsThe following commands would be available:plzrun
plztestplzsetup
plzlsGetting helpList all the available commands with:plz# orplzhelpPrint the yaml schema for any defined command withplz help <command>:> plz help test
[INFO] Using config: plz.yaml

test:
  cmd:
  - poetry run python -m pytestDescriptionSetting a description attribute for a command will display the description in the
console output. This can be useful if the command is not self explanatory.commands:echo:cmd:echo hellodescription:This is a sample description> plz echo

[INFO] Using config: plz.yaml

Description: This is a sample description

===============================================================================
Running command: echo hello
===============================================================================

helloEnvironment variablesEnvironment variables can be set for an individual command or globally for all commands.# env variable for an individual commandcommands:test:cmd:./manage.py testenv:DJANGO_SETTINGS_MODULE:myapp.settings.testglobal_env:DJANGO_SETTINGS_MODULE:myapp.settings.testcommands:test:./manage.py testShortcutsSimilar to environment variables, shortcuts can be created witin the plz.yaml
file for reference by individual commands.shortcuts:dc:docker-composecommands:start:cmd:${dc} upshell:cmd:${dc} run web bashGlobbingplz supports asterisk expansion.  For example, the cmdls *.pywill work as expected.Runtime argumentsplz supports passing custom arguments when running the plz command. For example:# bind to port 8001 instead of the default 8000
plz run 127.0.0.1:8001Any passed arguments will be tested to see if they are file paths relative to
the current directory when running the command. Using this repo as an example:bash$ ls .*.yaml
plz.yaml               .pre-commit-config.yaml

bash$ cd plz

bash$ plz ls ../.*.yaml

[INFO] Using config: /path/plz/plz.yaml

===============================================================================
Running command: ls
===============================================================================

plz.yaml
.pre-commit-config.yaml

[INFO] Process complete, return code: 0

bash$ plz ls __*.py

[INFO] Using config: /path/plz/plz.yaml

===============================================================================
Running command: ls
===============================================================================

plz/__init__.py

[INFO] Process complete, return code: 0DevelopmentSetting up for development is easy when plz is already installed!git clone https://github.com/m3brown/plz
cd plz
plz setup
plz test