Use the PlayWord's features instantly from the command line.
# 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
Run a PlayWord test step by step.
npx @playword/cli 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. |
Start the Observer to record and dry-run test steps.
npx @playword/cli 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. |