@playword/cli

0.2.5 • Public • Published

@playword/cli

NPM Version Node.js Version CI codecov

Use the PlayWord's features instantly from the command line.

📦 Installation

# Install with any package manager you prefer
npm install @playword/cli --save-dev

# Run the package directly with npx (recommended)
npx @playword/cli test --headed --verbose

📖 Available Commands

test

Run a PlayWord test step by step.

npx @playword/cli test [options]

Test Options

Property Alias Type Default Description
--headed -h bool false Whether to open the browser in headed mode.
--delay -d number 250 Delay between each test step in milliseconds.
--env-file -e string .env Which env file to use.
--record -r string | bool false Whether to record the test steps.
You can also specify a file path to save the recording. (Must be .json)
--playback -p string false Whether to playback the test steps from a recording file.
This should be used with the --record option.
--browser -b string chrome Which browser to use. Supported values are chromium, chrome, msedge, firefox and webkit.
--verbose -v bool false Whether to enable verbose mode.
--openai-options -o list [] Additional OpenAI API options. e.g.
--openai-options apiKey=sk-... baseURL=https://....
--help bool false Show help information.

observe

Start the Observer to record and dry-run test steps.

npx @playword/cli observe [options]

Observe Options

Property Alias Type Default Description
--delay -d number 250 Delay between each test step in milliseconds during the dry-run process.
--env-file -e string .env Which env file to use.
--record-path -r string .playword/recordings.json Where to save the recordings. (Must be .json)
--browser -b string chrome Which browser to use. Supported values are chromium, chrome, msedge, firefox and webkit.
--verbose -v bool false Whether to enable verbose mode.
--openai-options -o list [] Additional OpenAI API options. e.g.
-o chat=gpt-4o embeddings=text-embedding-3-large .
--help bool false Show help information.

Package Sidebar

Install

npm i @playword/cli

Weekly Downloads

45

Version

0.2.5

License

MIT

Unpacked Size

18 kB

Total Files

5

Last publish

Collaborators

  • foreverskyin