2.9.0 • Published 2 years ago

@ampproject/toolbox-cli v2.9.0

Weekly downloads
130
License
Apache-2.0
Repository
github
Last release
2 years ago

AMP-Toolbox CLI

npm version

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:

Installation

Install via:

$ npm install @ampproject/toolbox-cli -g

Commands

curls

Translate a URL to AMP Cache URLs:

$ amp curls https://amp.dev

download

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.

help

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

lint

Runs the AMP Linter for the given URL:

$ amp lint https://amp.dev

optimize

Runs AMP Optimizer for the given file or URL:

$ amp optimize https://amp.dev

or

$ amp optimize file.html

runtime-version

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.

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 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

version

Prints the current AMP Toolbox version:

$ amp version

=> v2.7.6
2.9.0

2 years ago

2.8.10

2 years ago

3.0.0-canary.2

2 years ago

2.8.5

2 years ago

2.8.7

2 years ago

2.8.6

2 years ago

2.8.8

2 years ago

2.8.4

2 years ago

2.8.3

3 years ago

2.8.2

3 years ago

2.8.1

3 years ago

2.8.1-canary.1

3 years ago

2.8.1-canary.0

3 years ago

2.8.0

3 years ago

2.8.0-canary.21

3 years ago

2.8.0-canary.20

3 years ago

2.8.0-canary.19

3 years ago

2.8.0-canary.18

3 years ago

2.8.0-canary.16

3 years ago

2.8.0-canary.15

3 years ago

2.8.0-canary.9

3 years ago

2.8.0-canary.6

3 years ago

2.8.0-canary.4

3 years ago

2.8.0-canary.3

3 years ago

2.8.0-canary.2

3 years ago

2.8.0-canary.0

3 years ago

2.8.0-canary.1

3 years ago

2.7.6

3 years ago

2.7.5

3 years ago

2.7.1-alpha.0

3 years ago

2.7.0-alpha.3

4 years ago

2.7.0-alpha.2

4 years ago

2.7.0-alpha.1

4 years ago

2.7.0-alpha.0

4 years ago

2.6.0

4 years ago

2.5.14

4 years ago

2.5.11

4 years ago

2.5.12

4 years ago

2.5.13

4 years ago

2.5.8

4 years ago

2.5.7

4 years ago

2.5.9

4 years ago

2.5.10

4 years ago

2.5.6

4 years ago

2.5.5

4 years ago

2.5.4

4 years ago

2.5.3

4 years ago

2.5.2

4 years ago

2.5.1

4 years ago

2.5.0

4 years ago

2.5.0-alpha.0

4 years ago

2.4.0

4 years ago

2.4.0-alpha.2

4 years ago

2.4.0-alpha.1

4 years ago

2.4.0-alpha.0

4 years ago

2.3.1

4 years ago

2.3.0

4 years ago

2.2.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

2.0.0-alpha.7

4 years ago

2.0.0-alpha.6

4 years ago

2.0.0-alpha.4

4 years ago

2.0.0-alpha.5

4 years ago

2.0.0-alpha.3

4 years ago

2.0.0-alpha.2

4 years ago

2.0.0-alpha.1

4 years ago

2.0.0-alpha.0

4 years ago

1.1.2

5 years ago

1.1.2-alpha.0

5 years ago

1.1.0-beta.1

5 years ago

1.1.0-beta.0

5 years ago

1.0.1

5 years ago

1.0.0-beta.9

5 years ago

1.0.0-beta.7

5 years ago

1.0.0-beta.6

5 years ago

1.0.0-beta.5

5 years ago

1.0.0-beta.4

5 years ago

1.0.0-beta.3

5 years ago

1.0.0-beta.1

5 years ago

1.0.0-beta.0

5 years ago