Speed Kit CLI
@speed-kit/cli
=============




``sh-session`
$ npm install -g @speedkit/cli
$ sk COMMAND
running command...
$ sk (--version)
@speedkit/cli/3.24.1 linux-x64 node-v20.20.0
$ sk --help [COMMAND]
USAGE
$ sk COMMAND
...
> 💡 NOTE:
Set up auto-completion for the CLI by executing [sk autocomplete [SHELL]](#sk-autocomplete-shell) once.
There are two different ways of configuring the CLI:
- Using Config File (recommended)
- Using Environment Variables
On the first execution of any sk command a config.json will be created and stored to the current user's directory of your OS:~/.config/speed-kit-cli/config.json
- Unix: %LOCALAPPDATA%\speed-kit-cli\config.json
- Windows:
`json5`
{
"chromePath": "", // local path to the Chrome binary
"chromeUserProfilePath": "", // local path to the Custom Chrome User Profile (use if you want to have Chrome's state saved)
"chromeExtensionPaths": "", // comma separated list of local paths to unpacked extensions for Chrome to load
"slackToken": "", // Slack token that will be injected to the deploymentDetection
"testApp": "", // name of your Test Speed Kit App
"ideaDirectory": "", // local directory path to the IntelliJ's shell binary
"diffExec": "", // path or executable of your favorite diff tool e.g. "vscode --diff", "codium --diff", "diff", "idea diff"
"diffExecTemplate": "" // defaults to "$exec $file1 $file2" resolves in "diff pathToFile1 pathToFile2"
}
By either...
- copying .env.sample as .env to the directory of the cloned sk-onboarding
- or by exporting the listed variables to your shell as needed before using a specific CLI command.
](#sk-autocomplete-shell)
* sk build-parameter-query CUSTOMERPATH
* sk build-prewarm-query CUSTOMERPATH
* sk config edit
* sk deploy CUSTOMERPATH
* sk diff-url-parameters PAGEURL
* sk document-handler CUSTOMERPATH
* sk find-pops APP
* sk generate-customer-config
* sk generate-pop-config APP
* [sk help [COMMAND]](#sk-help-command)
* [sk login [APP]](#sk-login-app)
* sk onboarding CUSTOMERPATH
* sk param-diff PAGEURL
* sk prewarm APP PATH
* sk pull CUSTOMERPATH
* sk wpt-launcher URLS TESTIDsk autocomplete [SHELL]Display autocomplete installation instructions.
`
USAGE
$ sk autocomplete [SHELL] [-r]ARGUMENTS
SHELL (zsh|bash|powershell) Shell type
FLAGS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
DESCRIPTION
Display autocomplete installation instructions.
EXAMPLES
$ sk autocomplete
$ sk autocomplete bash
$ sk autocomplete zsh
$ sk autocomplete powershell
$ sk autocomplete --refresh-cache
`_See code: @oclif/plugin-autocomplete_
sk build-parameter-query CUSTOMERPATHBuild a parameter query that can be executed in Athena
`
USAGE
$ sk build-parameter-query CUSTOMERPATH [-c ]ARGUMENTS
CUSTOMERPATH The customer config path
FLAGS
-c, --configName= [default: production] The costumer config name
DESCRIPTION
Build a parameter query that can be executed in Athena
EXAMPLES
$ sk build-parameter-query -c
$ sk build-parameter-query customers/decathlon.de -c production
`sk build-prewarm-query CUSTOMERPATHBuild a prewarm query that can be executed in Athena
`
USAGE
$ sk build-prewarm-query CUSTOMERPATH [-c ]ARGUMENTS
CUSTOMERPATH The customer config path
FLAGS
-c, --configName= [default: production] The costumer config name
DESCRIPTION
Build a prewarm query that can be executed in Athena
EXAMPLES
$ sk build-prewarm-query -c
$ sk build-prewarm-query customers/decathlon.de -c production
`sk config editEdit cli config
`
USAGE
$ sk config editDESCRIPTION
Edit cli config
EXAMPLES
$ sk config edit
`sk deploy CUSTOMERPATHDeploys the specified customer config while comparing to the live version before
`
USAGE
$ sk deploy CUSTOMERPATH [-c ] [-t] [-d] [-v] [-a ]ARGUMENTS
CUSTOMERPATH The customer config path
FLAGS
-a, --artifacts= which files to upload
-c, --configName= [default: production] The costumer config name
-d, --dryRun dry run
-t, --useTestConfig Override app with configured testApp
-v, --verboseLevel Show all messages
DESCRIPTION
Deploys the specified customer config while comparing to the live version before
EXAMPLES
$ sk deploy -c -t -a -d
$ sk deploy customers/decathlon.de -c production -t someSlackToken -a dynamic,SpeedKit -d
`sk diff-url-parameters PAGEURLShows difference in documents with query parameters on/off
`
USAGE
$ sk diff-url-parameters PAGEURL [-h]ARGUMENTS
PAGEURL Link of the page
FLAGS
-h, --hideDiff Hide the code diff in IDE code diff window
DESCRIPTION
Shows difference in documents with query parameters on/off
ALIASES
$ sk param-diff
EXAMPLES
$ sk prewarm -h
$ sk prewarm https://www.decathlon.de/ -h
`sk document-handler CUSTOMERPATHCreates testable documentHandler in folder {CUSTOMER_PATH}/test/src/
`
USAGE
$ sk document-handler CUSTOMERPATH [-c ] [-t ...]ARGUMENTS
CUSTOMERPATH The customer config path
FLAGS
-c, --configName= [default: production] The costumer config name
-t, --CreateTests=... name of the test to create
DESCRIPTION
Creates testable documentHandler in folder {CUSTOMER_PATH}/test/src/
EXAMPLES
$ sk documentHandler -c
$ sk deploy customers/decathlon.de -c production
`sk find-pops APPGet IPs for all fastly PoPs
`
USAGE
$ sk find-pops APP [-i ]ARGUMENTS
APP The customers appName
FLAGS
-i, --ips= [default: 151.101.x.194]
DESCRIPTION
Get IPs for all fastly PoPs
EXAMPLES
$ sk find-pops -i
$ sk find-pops appName -i ips
`sk generate-customer-configGenerates a customer config guided by a wizard 🧙
`
USAGE
$ sk generate-customer-config [-a ] [-d ]FLAGS
-a, --app= The SK app name which is also being used the config output directory name
(kebab-case)
-d, --customersDirectory= Name of the sk-onboarding directory where all customer configs are being stored
(default: "customers")
DESCRIPTION
Generates a customer config guided by a wizard 🧙
EXAMPLES
$ sk generate-customer-config -a -d
$ sk generate-customer-config -a decathlon -d customers
`sk generate-pop-config APPGenerate a pop config for the given app
`
USAGE
$ sk generate-pop-config APP [-c ] [-d] [-p ] [-t ] [-r] [-s]ARGUMENTS
APP The customers appName
FLAGS
-c, --coverage= [default: 95] The percentage of traffic which should be covered through prewarming.
-d, --[no-]deploy Default it diffs with the deployed config and ask for deployment. If the flag is passed
deployment will be skipped or forced.
-p, --pop-limit= [default: 5] The maximal pop count which should prewarmed.
-r, --use-rum Compute the pop statistics based on RUM. Otherwise the real Speed Kit traffic is used.
-s, --force-shield Force a shield based prewarming config.
-t, --traffic-share= [default: 5] The minimum traffic share in percent a pop must have to be actually
prewarmed.
DESCRIPTION
Generate a pop config for the given app
EXAMPLES
$ sk generate-pop-config
$ sk generate-pop-config --use-rum
$ sk generate-pop-config --coverage 95 appName
$ sk generate-pop-config --no-deploy appName
$ sk generate-pop-config --deploy appName
$ sk generate-pop-config --coverage 95 --pop-limit 6 --traffic-share 2 --deploy appName
`sk help [COMMAND]Display help for sk.
`
USAGE
$ sk help [COMMAND...] [-n]ARGUMENTS
COMMAND... Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for sk.
`_See code: @oclif/plugin-help_
sk login [APP]Login to your app
`
USAGE
$ sk login [APP]ARGUMENTS
APP [default: bbq] The customers appName
DESCRIPTION
Login to your app
EXAMPLES
$ sk login
$ sk login appName
`sk onboarding CUSTOMERPATHStart a local dev environment for building and testing the Speed Kit configuration
`
USAGE
$ sk onboarding CUSTOMERPATH [-c ] [-t] [-d ] [-l] [-v] [-s]ARGUMENTS
CUSTOMERPATH The customer config path
FLAGS
-c, --configName= [default: production] The costumer config name
-d, --domain= Startup domain (optional)
-l, --local Run with local documentHandler
-s, --ignoreContentSecurityPolicy Removes header/meta "content-security-policy" for origin-responses
-t, --useTestConfig Override app with configured testApp
-v, --verboseLevel Show all messages
DESCRIPTION
Start a local dev environment for building and testing the Speed Kit configuration
EXAMPLES
$ sk onboarding -c -d
$ sk onboarding customers/decathlon.de -c production -d www.decathlon.de
`sk param-diff PAGEURLShows difference in documents with query parameters on/off
`
USAGE
$ sk param-diff PAGEURL [-h]ARGUMENTS
PAGEURL Link of the page
FLAGS
-h, --hideDiff Hide the code diff in IDE code diff window
DESCRIPTION
Shows difference in documents with query parameters on/off
ALIASES
$ sk param-diff
EXAMPLES
$ sk prewarm -h
$ sk prewarm https://www.decathlon.de/ -h
`sk prewarm APP PATHPre-warm Fastly
`
USAGE
$ sk prewarm APP PATH [-p | -v ] [-k] [-q] [--verbose] [-d ]ARGUMENTS
APP The customer app name
PATH path to prewarmFile.csv
FLAGS
-d, --delay= Request delay in ms (deprecated)
-k, --keepParameterSorting Prevents alphabetical sorting of the URL parameters
-p, --variationPath= path to variations.csv
-q, --quiet less output non interactive
-v, --variation= [default: default]
--verbose Log information about failed requests
DESCRIPTION
Pre-warm Fastly
EXAMPLES
for a single variation:
$ sk prewarm -v -k
$ sk prewarm decathlon C:\Users\testUser\file.csv -v MOBILE -k
for a list of variations:
$ sk prewarm -p -k
$ sk prewarm decathlon C:\Users\testUser\file.csv -v MOBILE,DESKTOP -k
$ sk prewarm decathlon C:\Users\testUser\file.csv -p C:\Users\testUser\variations.csv -k
`sk pull CUSTOMERPATHPull the specified customer config from orestes
`
USAGE
$ sk pull CUSTOMERPATH [-c ]ARGUMENTS
CUSTOMERPATH The customer config path
FLAGS
-c, --configName= [default: production] The costumer config name
DESCRIPTION
Pull the specified customer config from orestes
EXAMPLES
$ sk pull
$ sk pull customers/decathlon.de -c production
`sk wpt-launcher URLS TESTIDAnalyze the performance impact that Speed Kit has compared to the original version.
`
USAGE
$ sk wpt-launcher URLS TESTID [-c ] [-m ] [-g ]FLAGS
-c, --cookies=
-g, --group= [default: A]
-m, --mobile= [default: no]
DESCRIPTION
Analyze the performance impact that Speed Kit has compared to the original version.
EXAMPLES
$ sk wpt-launcher -g -m -c
$ sk wpt-launcher url1,url2,url3 listing-50vs50 -g B -m Y -c consentCookies
``