Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: unhide init-agents (#37571)

Pavel Feldmane271c552c86c
diff --git a/docs/src/test-agents-js.md b/docs/src/test-agents-js.md
index 2130fa3ed6..3b7c7d4670 100644
--- a/docs/src/test-agents-js.md
+++ b/docs/src/test-agents-js.md
@@ -27,7 +27,7 @@ You need to run this command for each agentic loop you will be using:
```bash
# Generate agent files for each agentic loop
# Visual Studio Code
-npx playwright init-agents --loop=code
+npx playwright init-agents --loop=vscode
# Claude Code
npx playwright init-agents --loop=claude
# opencode
diff --git a/packages/playwright/src/program.ts b/packages/playwright/src/program.ts
index 0ed4fd76d4..96bd20baab 100644
--- a/packages/playwright/src/program.ts
+++ b/packages/playwright/src/program.ts
@@ -175,18 +175,20 @@ function addTestMCPServerCommand(program: Command) {
}
function addInitAgentsCommand(program: Command) {
- const command = program.command('init-agents', { hidden: true });
- command.description('Initialize repository agents for the Claude Code');
+ const command = program.command('init-agents');
+ command.description('Initialize repository agents');
const option = command.createOption('--loop <loop>', 'Agentic loop provider');
- option.choices(['code', 'claude', 'opencode']);
+ option.choices(['vscode', 'claude', 'opencode']);
command.addOption(option);
command.action(async opts => {
if (opts.loop === 'opencode')
await initOpencodeRepo();
- else if (opts.loop === 'code')
+ else if (opts.loop === 'vscode')
await initVSCodeRepo();
else if (opts.loop === 'claude')
await initClaudeCodeRepo();
+ else
+ command.help();
});
}