
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
@guardian/grid-cli
Advanced tools
Helpful commands for interacting with Grid, The Guardian's image management tool.
Helpful commands for interacting with Grid, The Guardian's image management tool.
grid-cli can be installed using either NPM or Brew
npm install -g @guardian/grid-cli
$ npm install -g @guardian/grid-cli
$ grid COMMAND
running command...
$ grid (-v|--version|version)
@guardian/grid-cli/1.4.0 darwin-x64 node-v15.3.0
$ grid --help [COMMAND]
USAGE
$ grid COMMAND
...
There are a few handy scripts in the ./script directory.
new-command.sh which creates new commands, ./scripts/new-command.sh a/b to create a:bupdate-readme.sh which you should run before committing.To run the development build of the script, you can run npm run local.
grid autocomplete [SHELL]grid bulk:rights INPUT RIGHTS OUTPUT FAILURESgrid collection:add-root NAMEgrid collection:move-images FROM TOgrid configuration:addgrid configuration:readgrid help [COMMAND]grid image:delete IDgrid image:download IDgrid image:get [ID]grid image:reingest IDgrid image:search [Q]grid image:upload IMAGEgrid image:visit IDgrid util:curl URLgrid util:id-file FILEgrid autocomplete [SHELL]display autocomplete installation instructions
USAGE
$ grid autocomplete [SHELL]
ARGUMENTS
SHELL shell type
OPTIONS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
EXAMPLES
$ grid autocomplete
$ grid autocomplete bash
$ grid autocomplete zsh
$ grid autocomplete --refresh-cache
See code: @oclif/plugin-autocomplete
grid bulk:rights INPUT RIGHTS OUTPUT FAILURESReads a text file containing image ids, and sets their usage rights.
USAGE
$ grid bulk:rights INPUT RIGHTS OUTPUT FAILURES
ARGUMENTS
INPUT file to read, containing one grid id per line
RIGHTS (noRights|chargeable) usageRights to set
OUTPUT file to output results to
FAILURES file to write bad ids to
OPTIONS
-f, --field=field key or link name to print from each returned image, if none given then image will be output as
json
-h, --help show CLI help
-p, --profile=profile [default: default] Profile name
-t, --thumbnail show a thumbnail
See code: src/commands/bulk/rights.ts
grid collection:add-root NAMEAdd a root collection
USAGE
$ grid collection:add-root NAME
ARGUMENTS
NAME Root collection to add
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] Profile name
See code: src/commands/collection/add-root.ts
grid collection:move-images FROM TOMove images from one collection to another
USAGE
$ grid collection:move-images FROM TO
ARGUMENTS
FROM Collection to rename
TO Name of new collection
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] Profile name
See code: src/commands/collection/move-images.ts
grid configuration:addAdd a configuration profile
USAGE
$ grid configuration:add
OPTIONS
-h, --help show CLI help
-k, --apiKey=apiKey API key
-m, --mediaApiHost=mediaApiHost Hostname for media-api
-p, --profile=profile [default: default] Profile name
See code: src/commands/configuration/add.ts
grid configuration:readEchos current config
USAGE
$ grid configuration:read
OPTIONS
-a, --all show all profiles
-h, --help show CLI help
-p, --profile=profile [default: default] Profile name
See code: src/commands/configuration/read.ts
grid help [COMMAND]display help for grid
USAGE
$ grid help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
grid image:delete IDDelete an image from Grid
USAGE
$ grid image:delete ID
ARGUMENTS
ID ID of image
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] Profile name
See code: src/commands/image/delete.ts
grid image:download IDdescribe the command here
USAGE
$ grid image:download ID
ARGUMENTS
ID ID of image
OPTIONS
-d, --directory=directory [default: /tmp] directory to download to
-h, --help show CLI help
-p, --profile=profile [default: default] Profile name
See code: src/commands/image/download.ts
grid image:get [ID]Get an Image from the API
USAGE
$ grid image:get [ID]
ARGUMENTS
ID ID of image
OPTIONS
-f, --field=field key or link name to print from each returned image, if none given then image will be output as
json
-h, --help show CLI help
-p, --profile=profile [default: default] Profile name
-t, --thumbnail show a thumbnail
--hydrate Gets fields which are returned as uris.
See code: src/commands/image/get.ts
grid image:reingest IDReingest an image already present in the images bucket
USAGE
$ grid image:reingest ID
ARGUMENTS
ID ID of image
OPTIONS
-c, --compare Do a dry run, and display the difference between the result and the data returned for this
image from media-api
-d, --dryRun Display the result of the reingestion only
-f, --field=field key or link name to print from each returned image, if none given then image will be output as
json
-f, --force Force reingestion if the image is already present in the Grid
-h, --help show CLI help
-p, --profile=profile [default: default] Profile name
-t, --thumbnail show a thumbnail
See code: src/commands/image/reingest.ts
grid image:search [Q]Search for an Image from the API
USAGE
$ grid image:search [Q]
ARGUMENTS
Q Search query
OPTIONS
-f, --field=field key or link name to print from each returned image, if none given then image will be output as
json
-h, --help show CLI help
-p, --profile=profile [default: default] Profile name
-t, --thumbnail show a thumbnail
See code: src/commands/image/search.ts
grid image:upload IMAGEUpload an image to Grid. Can be a local file or a publicly accessible URL
USAGE
$ grid image:upload IMAGE
ARGUMENTS
IMAGE Image to upload. If a URL, it must be publicly accessible
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] Profile name
See code: src/commands/image/upload.ts
grid image:visit IDView image in the browser
USAGE
$ grid image:visit ID
ARGUMENTS
ID ID of image
OPTIONS
-h, --help show CLI help
-p, --profile=profile [default: default] Profile name
See code: src/commands/image/visit.ts
grid util:curl URLMake an authenticated request to a Grid URL. Assumes response is JSON.
USAGE
$ grid util:curl URL
ARGUMENTS
URL The URL to request
OPTIONS
-d, --data=data The body of the request
-h, --help show CLI help
-p, --profile=profile [default: default] Profile name
-x, --method=GET|POST|PUT|PATCH|DELETE [default: GET] The HTTP verb to use
See code: src/commands/util/curl.ts
grid util:id-file FILEPrint the ID a file would get if uploaded to Grid
USAGE
$ grid util:id-file FILE
ARGUMENTS
FILE Path to file to upload
OPTIONS
-h, --help show CLI help
See code: src/commands/util/id-file.ts
FAQs
Helpful commands for interacting with Grid, The Guardian's image management tool.
We found that @guardian/grid-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 47 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
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.