@playforge/cli
v0.1.0
Published
CLI for scaffolding and managing PlayForge Playwright projects
Maintainers
Readme
@playforge/cli
CLI for scaffolding and managing PlayForge Playwright projects. Part of the PlayForge framework.
Installation
npm install -g @playforge/cliOr use directly with npx:
npx @playforge/cli init my-appCommands
playforge init <name>
Create a new PlayForge project with the three-layer Page Object Model:
playforge init my-app
cd my-app
npm install
npx playwright install
npm testGenerated structure:
my-app/
├── src/pages/example/
│ ├── example-page.ts # Locators only
│ └── example-steps.ts # Business logic + assertions
├── tests/
│ └── example.spec.ts # Test orchestration
├── playwright.config.ts
├── eslint.config.ts # PlayForge rules enabled
├── tsconfig.json
├── package.json
└── .github/workflows/test.ymlplayforge generate page <name>
Generate a page object + steps file pair:
playforge generate page loginCreates:
src/pages/login/login-page.ts— Page object with locatorssrc/pages/login/login-steps.ts— Steps with business logic
playforge generate test <name>
Generate a test spec file:
playforge generate test loginCreates:
tests/login.spec.ts— Test spec using the steps class
Requirements
- Node.js >= 20
License
MIT
