Setup¶
This will walk you through all the prerequisites needed to develop software at FSH.
This guide assumes you’re on a Macbook.
Note
All code snippets are assumed to be run from a terminal (e.g. the default terminal.app)
Development environment setup¶
We use a few tools to develop at FSH.
First, install homebrew.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then, install a set of packages via homebrew.
brew upgrade
brew install uv postgresql@18 opa
This installs:
Next, we need to install node:
brew install nvm
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc
echo '[ -s "$(brew --prefix nvm)/nvm.sh" ] && \. "$(brew --prefix nvm)/nvm.sh"' >> ~/.bashrc
echo '[ -s "$(brew --prefix nvm)/etc/bash_completion.d/nvm" ] && \. "$(brew --prefix nvm)/etc/bash_completion.d/nvm"' >> ~/.bashrc
source ~/.bashrc
This sets up nvm, and configures your shell to invoke nvm appropriately.
If you use zsh instead of bash, you should replace .bashrc with .zshrc.
Finally, we need to install yarn.
npm install -g corepack
Github¶
You should be a member of the FSHTech GitHub organization.
You can test this by visiting a private repository.
Once that is setup, you will need to authenticate your machine against GitHhub.
This is a good tutorial. In short, you’ll need to add a public key from your local machine to Github. This allows requests you make of Github to be validated.
FSH CLI¶
Many FSH development workflows are automated through the use of the fsh CLI.
Once you have fsh, attempt running fsh packages login – this will confirm that you can access the private FSH package registries.
just-pm¶
FSH uses a piece of sofftware called just as a declarative command runner.
just ships with no native package manager. So, we built one.
To install it, please follow these instructions.
Running just-pm post installation should give you something that looks like this:
╭─rodda@pop-os ~
╰─$ just-pm
Usage: just-pm [OPTIONS] COMMAND [ARGS]...
A package manager for `just` modules — fetch and vendor shared modules from git.
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --directory -C DIR Run as if started in this directory. │
│ --version Show version and exit. │
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ sync Fetch + vendor modules and regenerate .just/modules.just. │
│ upgrade Bump version-tag revs in just.toml to the newest remote tag and sync. │
│ verify Hash-check the vendored content against the lockfile (no network). │
│ clean Remove the generated .just/vendor/ and .just/modules.just. │
│ update Update just-pm itself to the latest release. │
│ add Append a module to the manifest (just.toml). │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────