@guardian/grid-cli
Helpful commands for interacting with Grid, The Guardian's image management tool.
Last updated 2 months ago by akash1810 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @guardian/grid-cli 
SYNC missed versions from official npm registry.

@guardian/grid-cli

Helpful commands for interacting with Grid, The Guardian's image management tool.

oclif Version Downloads/week License

Usage

$ npm install -g @guardian/grid-cli
$ grid COMMAND
running command...
$ grid (-v|--version|version)
@guardian/grid-cli/1.0.1 darwin-x64 node-v12.9.1
$ grid --help [COMMAND]
USAGE
  $ grid COMMAND
...

Developing

There are a few handy scripts in the ./script directory. Hopefully they are self documenting...

Commands

grid 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 collection:add-root NAME

Add 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 configuration:add

Add 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:read

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

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

describe 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
  -h, --help             show CLI help
  -p, --profile=profile  [default: default] Profile name

See code: src/commands/image/get.ts

grid image:upload IMAGE

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

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

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

Print 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

Current Tags

  • 1.0.1                                ...           latest (2 months ago)

2 Versions

  • 1.0.1                                ...           2 months ago
  • 1.0.0                                ...           2 months ago

Copyright 2014 - 2016 © taobao.org |