Getting started

Bombadil runs on your development machine if you’re on macOS or Linux. You can use it to validate changes to TypeScript specifications, and to run short tests while working on your system. Then you’ll have something like GitHub Actions to run longer tests on your main branch or in nightlies.

Installation

The most straightforward way for you to get started is downloading the executable for your platform:

npm

Install as a development dependency in your project:

npm install --save-dev @antithesishq/bombadil

Add a script to your package.json to run Bombadil:

{
  "scripts": {
    "test": "bombadil test https://your-app.example.com"
  }
}

Then run it with npm test. This also provides TypeScript type definitions for writing specifications.

macOS

Download the bombadil binary using curl (or wget) and make it executable:

curl -L -o bombadil https://github.com/antithesishq/bombadil/releases/download/v0.4.5/bombadil-aarch64-darwin
chmod +x bombadil

Put the binary somewhere on your PATH, like in ~/.local/bin if that is configured.

mv ./bombadil ~/.local/bin/bombadil

You should now be able to run it:

bombadil --version

Do not download the executable with your web browser. It will be blocked by GateKeeper.

Linux

Download the bombadil binary and make it executable:

curl -L -o bombadil https://github.com/antithesishq/bombadil/releases/download/v0.4.5/bombadil-x86_64-linux
chmod +x bombadil

Put the binary somewhere on your PATH, like in ~/.local/bin if that is configured.

mv ./bombadil ~/.local/bin/bombadil

You should now be able to run it:

bombadil --version
Nix (flake)
nix run github:antithesishq/bombadil

Not yet available, but coming soon:

If you want to compile from source, see Contributing.

TypeScript support

When writing specifications in TypeScript, you’ll want the types available. If you installed Bombadil via npm, you already have them — skip ahead to Your first test.

Otherwise, install the package with your package manager of choice:

npm
npm install --save-dev @antithesishq/bombadil
Yarn
yarn add --dev @antithesishq/bombadil
Bun
bun add --development @antithesishq/bombadil

Or use the files provided in the release package.

Your first test

With the CLI installed, let’s run a test just to see that things are working:

bombadil test https://en.wikipedia.org --output-path my-test

This will run until you shut it down using CTRL+C. Any property violations will be logged as errors, and with the --output-path option you will get results to inspect afterwards.

Launch the Bombadil Inspect tool to see what happened in the test you just ran:

bombadil inspect my-test

This will open a web application in your browser, which has some features to highlight:

No violations? That’s fine, Wikipedia is pretty solid! This confirms that Bombadil runs and produces results.