Glad you asked.
This is a small utility written by some fine folks at Automattic.com. It automates and standardizes provisioning new WordPress sites (on Pressable.com), connecting them to code repositories (on GitHub.com) and configuring deploy automation (via DeployHQ.com). It does a few other things, but that's the gist.
You probably don't.
That said, with minimal work and especially if you're already using any of the three service providers we are, you can fork this repo and adapt it to your own needs. Or, perhaps you'll use this tool as inspiration to build something similar which automates a repeatable task you or your team are responsible for.
Probably not.
This tool is fairly specific to our team's workflow...and we intend to keep it that way vs. abstracting it for anyone and everyone's needs. That said, we're open to hearing from you and feel free to reach us by opening an issue- please include a reference/link to your favorite song as a clue that you've read this =)
It's the nickname for our Special Projects team at Automattic.
Be well, be kind, make things and set them free.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
php -v
and cross-checking the outputted version; We actually recommend running the latest version of PHP. If you’re not, then run brew install php@8.3 brew-php-switcher
followed by brew link php@8.3
git clone git@github.com:a8cteam51/team51-cli.git
Enter
(if you're unsure what the passphrase is, try entering the same you'd use for the AutoProxxy).brew install composer
.brew install --cask 1password/tap/1password-cli
.Enter
.op vault ls
, to verify that it works and to select your default account (select the Team51 account if you have more than one).cd
to the team51-cli
directory and run ./install-osx
.
no such file or directory: ./install-osx
, try running cd team51-cli
first.team51 list
from your Terminal to see a list of all current commands.The CLI tool automatically updates itself. It does a hard reset to the latest version of the trunk
branch and it will also try to switch to the trunk
branch if it's not already on it. To bypass this behavior you can run the tool with the --dev
flag or add an empty .dev
file to the root folder.
This CLI tool is self-documenting. You can view a list of available commands with team51 list
.
You can then do team51 <command-name> --help
.
A copy of that documentation is also available on the Github Wiki for this repository. When developing, if you add any new commands or update any descriptions, help, or arguments, follow these instructions to update the documentation.
If you run a command without any arguments, the CLI will ask you for the necessary information. Most of the time, a reasonable default will be provided, and you can just hit Enter
to accept it.
For yes/no
type of questions, the default option is the capitalized one. For example, if the CLI asks you Do you want to continue? [Y/n]
, you can just hit Enter
to accept the default option, which is Y
.
For multiple choice questions, the default option is the one in square brackets. For example, if the CLI asks you Which option do you want to choose? [Option 2]
, you can just hit Enter
to accept the default option, which is Option 2
.
If you haven't used the CLI in a while, and you're getting a lot of Deprecated
notices or PHP Fatal error
, try running ./install-osx
again to make sure all the dependencies are up-to-date.
Remember: you need be inside the team51-cli
directory in order to execute the installation command.
error: Your local changes to the following files would be overwritten by merge: ...
If you see this error when running a command, and you don't remember intentionally changing the mentioned files on your computer, you should run git reset --hard
to discard all the changes and get back to the state of the remote repository.
no such file or directory: ./install-osx
Most likely you are not inside the team51 directory. Try with cd team51-cli
. If that doesn't work, verify where you are located by running pwd
and then use the change directory command (cd
) to navigate to the team51-cli directory we cloned in the steps above.
composer: command not found
If you get the error ./install-osx: line 2: composer: command not found
, you can run brew install composer
to install Composer on your computer.
brew: command not found
If you don't have brew yet, install it by executing this from your Terminal: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
— Tip: you can use brew to install all sort of apps on your Mac. Give it a try
failed to open stream: Too many open files
For certain commands involving the use of PHP workers threads, you might need to increase the ulimit
on your local computer. To increase this number, you can run on the terminal: ulimit -n 8192
.
A particular case where this might be needed is when using the remove-user
command. If you get a PHP Warning:
failed to open stream: Too many open files...
try upgrading the ulimit as described above.
env: php: No such file or directory
This is likely because you don't have PHP installed on your system. If you recently updated to MacOS Monterey, that could be the culprit as it doesn't come bundled with PHP anymore. If you have brew
installed, it's easy to get PHP added by running the following command in the terminal: brew install php@8.2 brew-php-switcher
. This will install the latest version of PHP 8.2 as well as a handy utility for switching between PHP versions if you need to.
You will then need to run brew link php@8.2
so that PHP gets symlinked properly to your system's PHP files. Running team51
now should work just fine.