1. Install
This walkthrough takes one project from an empty directory to a green run in CI, in the order a
first day goes. The project is the Coffee Shelf: a small shop that tflw init --example writes
for you, with a test for every kind tflw runs: API, browser, load and scan. Every command on these
pages is run on every change to tflw, in a fresh directory, exactly as written here, so if one of
them does not do what the page says, that is a bug.
You need Node 22 or newer:
node --versionThe package
Section titled “The package”tflw is pre-1.0 and not published to npm yet, so the package is built from a clone and packed
on your machine. npm pack builds it first, then writes one tflw-<version>.tgz file, which is
exactly what npm will serve on 1.0 day:
git clone https://github.com/deepak-tuteja/tflw.gitcd tflwnpm cinpm pack -w tflwexport TFLW_TGZ="$PWD/$(ls tflw-*.tgz)"cd ..That fence is the one exception to every command is run: the tree it would clone is the tree
being checked, so the check packs that tree itself and hands the tarball to the next fence as
TFLW_TGZ, the variable the fence above sets.
Then make the project's directory, beside the clone:
mkdir coffee-shelf && cd coffee-shelfnpm init -ynpm install -D "$TFLW_TGZ"The browser
Section titled “The browser”playwright is tflw's one optional peer, and it is needed only when a test opens a page. The
Coffee Shelf has 18 tests that do, so install it, then the browser it drives:
npm install -D playwrightnpx tflw install-browsersinstall-browsers downloads Chromium into that playwright, the one your project imports, so the
browser and the library cannot disagree about versions. --browser firefox or --browser webkit
adds another engine. It never installs playwright itself: without the peer it refuses and says
how to add it.
npx tflw --versionYou now have
Section titled “You now have”A coffee-shelf/ directory with a package.json, and tflw and playwright in its
node_modules. No test yet, and no config.
Next, or instead
Section titled “Next, or instead”- Next: 2. The example. The shop, and its tests.
- Upgrading later, and what
tflw doctortells you: Installing tflw. - Every command and flag: the CLI reference.