Skip to content

webqa init

Terminal window
webqa init <url> [-o webqa.json] [--allow-private]

init opens the URL in a local Chromium and detects the language versions, in this order:

  1. <link rel="alternate" hreflang="…"> tags on the page.
  2. Links in the language switcher.
  3. The page’s <html lang> attribute.

It writes the locales and pages to webqa.json for you to review. If a sitemap is found, init suggests a "pages": { "sitemap": …, "maxPages": 50 } setting.

Review the file before running it. Pages are only treated as translations of each other when they fall under the locale URLs you confirm.

Option Default Description
-o, --output <file> webqa.json Configuration file to write. Existing files are not overwritten.
--allow-private off Allow localhost and private network addresses.

0 when a file was written, 2 for an invalid URL or arguments, 3 when the page could not be loaded. See exit codes.