Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@ampproject/toolbox-cli
Advanced tools
The AMP Toolbox command line interface consists of a Node.js program called amp
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:
Install via:
$ npm install @ampproject/toolbox-cli -g
Translate a URL to AMP Cache URLs:
$ amp curls https://amp.dev
Download a complete AMP runtime:
$ amp download
Supports options for specifying a custom host, version, and destination directory. See amp help download
for the complete list.
Displays the help menu, listing all available commands:
$ amp help
Pass a command to get more information about this specific command
$ amp help [command]
Example:
$ amp help update-cache
Runs the AMP Linter for the given URL:
$ amp lint https://amp.dev
Runs AMP Optimizer for the given file or URL:
$ amp optimize https://amp.dev
or
$ amp optimize file.html
Prints the current AMP version:
$ amp runtime-version
=> 011905291911450
Supports options for specifying a custom host or getting the canary version. See amp help runtime-version
for the complete list.
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 for the private key on a file called privateKey.pem
, on the current working directory.
$ amp update-cache https://www.example.com/
Optionally, use the --privateKey
parameter to specify the path for the private key.
$ amp update-cache https://www.example.com/ --privateKey /path/to/private-key.pem
Prints the current AMP Toolbox version:
$ amp version
=> v2.7.6
FAQs
A Command Line Interface (CLI) for amp-toolbox
The npm package @ampproject/toolbox-cli receives a total of 28 weekly downloads. As such, @ampproject/toolbox-cli popularity was classified as not popular.
We found that @ampproject/toolbox-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 16 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.