AMP-Toolbox CLI
The AMP Toolbox command line interface consists of a Node.js program called amp-toolbox-cli
that can be run from a Windows, macOS, of UNIX-compatible command line environment. This way, AMP Toolbox can easily be integrated into a command line build process.
Supported commands:
- update-cache: updates documents stored in AMP Caches.
- version: prints the current
amp-toolbox-cli
version. - help: displays available commands.
Commands
help
Displays the help menu, listing all available commands:
$ ./amp-toolbox-cli help
Pass a command to get more information about this specific command
./amp-toolbox-cli help [command]
Example:
$ ./amp-toolbox help update-cache
version
Prints the current version
Example:
$ ./amp-toolbox version
runtime-version
Prints the current version of the AMP runtime.
Example:
$ ./amp-toolbox runtime-version ### update-cache Uses the [AMP update-cache API] to update documents stored in AMP Caches. It requires the public and private keys to be generated, as [described on the documentation]. Only the private key is required to generate the cache invalidation URLs, but the public key must be made available to the AMP Caches, as described in the [guidelines]. By default, the application will look
Optionally, use the --privateKey
parameter to specify the path for the private key.
$ ./amp-toolbox-cli update-cache https://www.example.com/ --privateKey /path/to/private-key.pem