# vasu-playwright-cli

> Playwright TypeScript CLI to initialize/update with sample Playwright tests, framework setup and utilities

Latest version **1.8.0** (published 2026-02-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install vasu-playwright-cli
pnpm add vasu-playwright-cli
yarn add vasu-playwright-cli
bun add vasu-playwright-cli
```

Provides the command `vasu-playwright-cli`.

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.8.0 |
| Published | 2026-02-10 |
| First published | 2023-08-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=20.0.0 |
| Dependencies | 11 |
| Unpacked size | 19.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 65 |
| Author | Vasudeva Annam |
| Maintainers | vasu31dev |
| Keywords | playwright, typescript, cli, framework, template |

## Links

- npm: https://www.npmjs.com/package/vasu-playwright-cli
- Repository: https://github.com/vasu31dev/playwright-ts-cli
- Homepage: https://github.com/vasu31dev/playwright-ts-template#readme
- Issues: https://github.com/vasu31dev/playwright-ts-cli/issues
- npm.io page: https://npm.io/package/vasu-playwright-cli

## Dependencies (11)

- [axios](https://npm.io/package/axios.md) ^1.13.5
- [rimraf](https://npm.io/package/rimraf.md) ^6.1.2
- [ts-node](https://npm.io/package/ts-node.md) ^10.9.2
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.3.3
- [commander](https://npm.io/package/commander.md) ^14.0.3
- [simple-git](https://npm.io/package/simple-git.md) ^3.30.0
- [typescript](https://npm.io/package/typescript.md) 5.9.3
- [@types/node](https://npm.io/package/@types/node.md) ^25.2.2
- [cross-spawn](https://npm.io/package/cross-spawn.md) ^7.0.6
- [@types/fs-extra](https://npm.io/package/@types/fs-extra.md) ^11.0.4
- [@types/cross-spawn](https://npm.io/package/@types/cross-spawn.md) ^6.0.6

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.8.0 (latest) — 2026-02-10
- 1.7.1 — 2024-09-20
- 1.7.0 — 2024-09-20
- 1.6.6 — 2024-03-26
- 1.6.5 — 2024-03-26
- 1.6.4 — 2024-03-26
- 1.6.3 — 2024-03-26
- 1.6.2 — 2024-03-26
- 1.6.1 — 2024-03-26
- 1.6.0 — 2024-03-26
- 0.5.1 — 2024-01-17
- 0.5.0 — 2023-08-27
- 0.4.2 — 2023-08-24
- 0.4.1 — 2023-08-23
- 0.4.0 — 2023-08-23
- … 7 more at https://npm.io/package/vasu-playwright-cli/versions

## README

# Playwright TypeScript CLI

| [![GitHub stars](https://img.shields.io/github/stars/vasu31dev/playwright-ts-cli)](https://github.com/vasu31dev/playwright-ts-cli/stargazers) | ![Last Commit](https://img.shields.io/github/last-commit/vasu31dev/playwright-ts-cli) | ![Pull Requests](https://img.shields.io/github/issues-pr-raw/vasu31dev/playwright-ts-cli) | [![NPM Package](https://img.shields.io/npm/v/vasu-playwright-cli)](https://www.npmjs.com/package/vasu-playwright-cli) | <a href="https://www.linkedin.com/in/vasudeva-chowdary-annam-802126a2/" target="_blank"><img src="https://img.icons8.com/fluent/48/000000/linkedin.png" width="28" alt="LinkedIn"></a> | [vasu31dev@gmail.com](mailto:vasu31dev@gmail.com) |
| :-------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------: |

## About

`playwright-ts-cli` is a powerful command-line tool designed to initialize and update projects with the [Playwright TypeScript template](https://github.com/vasu31dev/playwright-ts-template). It simplifies the process of setting up a new project with specific configurations, dependencies, and structure, allowing developers to kickstart their Playwright testing with ease.

## Features

- **Initialize Project**: Quickly scaffold a new project with predefined Playwright TypeScript configurations, dependencies, and structure.
- **Update Project**: Seamlessly update existing projects with the latest files and configurations from the Playwright TypeScript template.
- **Compatibility**: Works with the [vasu-playwright-utils](https://www.npmjs.com/package/vasu-playwright-utils) library, offering additional utilities and functionalities.

## Prerequisites

Ensure you have the following software installed on your machine:

- **[npm (v8.0.0 or later)](https://docs.npmjs.com/cli/v9/configuring-npm)**: Package manager for JavaScript, used to install and manage software packages.
  - To verify your current version, use the command `npm -v`.
  - If npm isn't installed, follow the [npm installation guide](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
- **[Node.js (v16.0.0 or later)](https://nodejs.org/en/download)**: JavaScript runtime built on Chrome's V8 JavaScript engine, allowing the execution of JavaScript server-side.
  - To verify your current version, use the command `node -v`.
- **[Git](https://git-scm.com/downloads)**: Distributed version control system used to track changes in source code during software development.
  - To check if Git is installed, run the command `git --version`.
  - If Git isn't installed, download and install it from the [official Git website](https://git-scm.com/downloads).

## Installation

### 1. Install Node.js

Before installing the CLI, make sure to have Node.js installed on your system. Here are two ways to install Node.js:

1. **Using Official Website**:

   - Visit the [official Node.js website](https://nodejs.org/en/download/).
   - Download and install the latest stable version.

2. **Using Command Line (nvm)**:
   ```bash
   curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
   source ~/.nvm/nvm.sh
   nvm install --lts
   ```

### 2. Create a Playwright Test Directory

```bash
mkdir playwright-e2e-tests
cd playwright-e2e-tests
```

### 3. Install `vasu-playwright-cli`

```bash
npm i -D vasu-playwright-cli
```

## Usage

### Initialize a New Project

Navigate to the desired directory and run:

```bash
npx vasu-playwright-cli init
```

This command will set up a new project with ready to use Playwright TypeScript framework, including:

- Setup the Playwright TypeScript framework template with sample tests.
- Create a new `package.json` file with all the necessary dependencies.
- Initializing a new Git repository if neither the current nor parent directory is a Git repository.
- Installing all the npm packages including the playwright utils library which contains playwright helper methods.

### Update an Existing Project with future updates

Navigate to the project directory and run:

```bash
npx vasu-playwright-cli update
```

This command will update specific files or directories within the project, aligning them with the latest updates to the [Playwright TypeScript template](https://github.com/vasu31dev/playwright-ts-template).

### Update Playwright Library

Keep your Playwright library up to date with the latest playwright utilities which contain the helper methods that are updated regularly:

```bash
npm i -D vasu-playwright-utils@latest
```

### Running Tests

To make sure the project framework is working as expected, you can run the following command to run the sample tests:

```bash
npm run test:chromium-headed -- sauce-demo-all-pass.spec.ts
```

View the report with:

```bash
npx playwright show-report
```

## Publishing (maintainers)

If `npm publish` fails with **"Access token expired or revoked"** or **404 Not Found**:

1. **Log in to npm** (interactive):
   ```bash
   npm login
   ```
   Enter your npm username, password, and one-time password if you use 2FA.

2. **Or use an automation token**: Create a token with **Publish** or **Automation** permission at [npmjs.com → Access Tokens](https://www.npmjs.com/settings/~yourusername/tokens), then:
   ```bash
   npm config set //registry.npmjs.org/:_authToken YOUR_TOKEN
   ```

3. **Verify**: `npm whoami` should print your username. Then run `npm publish`.

## Issues and Feedback

If you encounter any issues or have feedback, please [Raise an Issue](https://github.com/vasu31dev/playwright-ts-cli/issues) on GitHub.

## Contributing

We welcome contributions! Feel free to submit a [Pull Request](https://github.com/vasu31dev/playwright-ts-cli/pulls) on GitHub.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

---
_Source: https://npm.io/package/vasu-playwright-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
