Install fob-worker
1. Install Node.js#
fob-worker needs Node.js 18 or later. Install the current LTS release from the official Node.js download page. It includes npm, the package installer used below.
node --version
npm --version
2. Install fob-worker and fob-orc#
npm install -g @finopsbricks/fob-worker @finopsbricks/fob-orc
fob-worker --version
fob-orc --version
- fob-worker runs your steps and reads your worker's local state. It never calls the Orchestrator.
- fob-orc talks to the Orchestrator: it pulls and pushes station and line definitions. You'll need it to get station files into your worker repo.
fob-worker works on the worker repo in your current directory, so run it from the repo's root (the folder with package.json and src/steps/).
3. Optional: pm2#
fob-worker procs starts and stops your worker in the background with pm2. Install pm2 only if you'll use it:
npm install -g pm2
procs works on macOS and Linux. See Run your worker in the background.
4. Optional: shell completion#
fob-worker completion >> ~/.zshrc # or ~/.bashrc
Open a new terminal. Tab completes resources, actions, and step slugs after fob-worker steps run.
Optional: the fob dispatcher#
If you use other FinOpsBricks CLIs, the fob dispatcher gives them one prefix. Any fob-* tool on your PATH becomes fob <tool>:
npm install -g @finopsbricks/fob-cli
fob worker steps list # same as: fob-worker steps list
The docs use fob-worker. Both forms work everywhere.
Updating#
npm install -g @finopsbricks/fob-worker@latest
See the changelog for what's new.
If the command is not found#
- Reopen your terminal after installing, so it picks up the new PATH.
- Check npm's global bin folder is on your PATH:
npm prefix -gshows the install prefix, and the binaries are in itsbinfolder (on Windows, the prefix folder itself). - An npm
EACCESpermission error means your global install folder isn't writable. Use a Node.js installed for your user account (for example with a version manager such asnvmorfnm). Don't usesudo npm.