A collection of helper scripts to bootstrap your Mac box for development. Let's start...
If you find any issue or you feel something is missing, we encourage you to contribute to the project. For more information, see contributing.
- We do not modify user settings automatically — to complete the setup, please complete the installation as noted at the first line of each language below
- Always start by bootstrapping your machine. For more information, see Getting Started
-
Clone the repository, or
git clone [email protected]:ai21labs/dev-envs.git
-
Download it as a zip ball, unzip to a directory and change into it (if you are a new on the crew, you probably want this)
unzip -q -o ai21-dev-envs-*.zip cd ai21-dev-envs-*/
- Kandji should have completed bootstrapping your Mac installation with brew as described here
- Verify by running
brew doctor
- If you find some packages are missing, feel free to contribute to infra-mac-bootstrap
- Verify by running
- Our helper scripts require Bash version 5.1.8 (or higher). By default MacOS comes with Bash version 3.2.x. Refer to this section to set Bash version 5.x.x as default
- Execute
./helpers/ssh-key-gen.sh
- Store the generated SSH keys in your password manager
-
Execute
./helpers/config-github.sh
-
Use Git to clone and push code changes using Git protocol; e.g.
git clone [email protected]:ai21/dev-envs.git
If you wish to enhance your GitHub experience, see GitHub Experience.
Git has support for signing your work to ensure commits come from a trusted source. To sign your work, please follow Signed Commits guide.
We have more specific notes for each language
We strive to be Commitizen-friendly, you are encouraged to use git cz commit
as an helper for using conventional commits
MacOS (Catalina and greater) uses ZSH as the default and it's a great default. If you're not a shell person, just use it.
- If you want to read on why we use ZSH read The Battle of Shell
- If you want your shell to be awesome read Pimp My shell
Please avoid using fish, as most of our scripts are written for Bash.
To verify the brewed Bash is working for you, the following commands should return the same output
realpath $(brew --prefix bash)/bin/bash
realpath $(which bash)
If you wish to set Bash as the default shell, follow this guide.
We recommend using Visual Studio Code (VSCode), which should be installed for you if bootstrapped your mac.
If you wish to enhance your VSCode experience, see VSCode Experience.
This is what the helpers do:
config-github.sh
configures Github SSHssh-key-gen.sh
generates SSH key-pairvscode-exts.sh
installs recommended VSCode extensionsvscode-ligatures.sh
installs programming ligatures for VSCode
Some helpers have parameters for more streamlined work; use the --help
. e.g.
$ ./helpers/vscode-exts.sh --help
vscode-exts.sh OPTIONS
OPTIONS:
[-r|--region <region>] default: us-east-1
[-a|--auto] use default values
./helpers/vscode-exts.sh
- Run validation by leveraging pre-commit
- Install
pre-commit install --install-hooks -t pre-commit -t commit-msg
- To run on-demand
pre-commit run -a
pre-commit run shellcheck -a --verbose --hook-stage manual
for recommendation
- Install
- Submit a pull-request