Skip to content

Command line arguments

python default.py -u https://example.com -t 22 -r

Basics

Flag Description
-h, --help Show the help text
-u, --url <address> Web address to test
-t, --test <number> Test to run. Several are given comma separated; ? lists them all
-r, --review Show the review in the terminal
-i, --input <file> Read addresses from a file (.json, .sqlite, .sitemap, <category>.webprf)
-o, --output <file> Save the result (.json, .csv, .sql, .sqlite, .md)
-L, --language <code> Output language (en by default, or sv)
-m, --mobile Simulate mobile. Same as tests.sitespeed.mobile=true
-c, --credits Show the projects and people who contributed

The help text says 'ONE test'

The built-in help describes -t as a single test, but the flag takes a comma-separated list. The list is what actually applies.

Choosing tests

# one test
python default.py -u https://example.com -t 22

# several tests
python default.py -u https://example.com -t 22,9,18

# every test
python default.py -u https://example.com

# every test except email
python default.py -u https://example.com -t -24

# list the available test numbers
python default.py -t ?

Invalid test numbers are silently ignored. If you give only invalid numbers you get the help text instead of a run.

Address lists

Flag Description
-A, --addUrl <address> Add an address to the file given with -i
-D, --deleteUrl <address> Remove an address from the file given with -i
--input-skip <count> Skip the first entries
--input-take <count> Only run a given number of entries
# add a website to the list
python default.py -i sites.json -A https://example.com

# run entries 11 through 20
python default.py -i sites.json -t 22 --input-skip 10 --input-take 10

Splitting a long list with --input-skip and --input-take is handy when you want to run several jobs in parallel.

Settings

Flag Description
--setting <key>=<value> Change a setting for this run
--setting ? List every setting and its current value
--save-setting <file> Write the current setup to a file
python default.py -u https://example.com -t 15 -r \
  --setting tests.sitespeed.browser=firefox \
  --setting general.review.details=true

Maintenance and development

Flag Description
--dependency, --check-dependency Validate your installation
--update-browser Update general.useragent in defaults/settings.json
-d, --update-definitions <api key> Update software data in defaults/software-sources.json. Needs a local copy of the advisory database
--update-carbon <file> Update the carbon percentiles
--update-translations Validate and update the translation files
--update-credits Update CREDITS.md
--find-unknown-sources Filter interesting software out of software-unknown-sources.json
--prepare-release, --create-release Used when cutting a new release

--dependency is the one most useful to you as a user. Run it when something doesn't work and you don't know why.

See also