This is a Nix Flake for the Playwright CLI tool (@playwright/cli).
Run directly from GitHub without cloning:
nix run github:kennethhoff/playwright-cli-flake#playwright-cliRun from this repo:
nix run .Build the package:
nix build .#playwright-cliAdd to a temporary shell:
nix shell . --command playwright-cli --helpAdd this flake as an input and include the package in your dev shell.
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
playwright-cli.url = "github:kennethhoff/playwright-cli-flake";
};
outputs = {
self,
nixpkgs,
playwright-cli,
...
}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.${system}.default = pkgs.mkShell {
packages = [
playwright-cli.packages.${system}.playwright-cli
];
};
};
}Then run nix develop and use playwright-cli.
x86_64-linuxaarch64-linuxx86_64-darwinaarch64-darwin
To bump to the latest release, run:
./update.shThis fetches the latest tag from GitHub, computes the source and npm dependency hashes, and rewrites versions.nix.