/gc2-cli

CLI for GC2. Do admin tasks, start MapCache seed jobs and more.

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

gc2-cli

CLI tool for GC2

oclif Version Downloads/week License

Usage

$ npm install -g gc2
$ gc2 COMMAND
running command...
$ gc2 (-v|--version|version)
gc2/2022.9.4 linux-x64 node-v18.9.0
$ gc2 --help [COMMAND]
USAGE
  $ gc2 COMMAND
...

Commands

gc2 admin

Run administration task on the GC2 installation.

USAGE
  $ gc2 admin

OPTIONS
  -t, --task=task  (required) The task to run: mapfiles, mapcachefile, qgisfiles, schema, migrations, diskcleanup,
                   cachestats, cachecleanup

See code: src/commands/admin.ts

gc2 connect [OPTIONS]

Set connection. You can use flags to set host, database and user. If one or more flags are missing, you will be prompted instead.

USAGE
  $ gc2 connect [OPTIONS]

OPTIONS
  -H, --host=host          Host
  -d, --database=database  Database
  -h, --help               show CLI help
  -r, --reset              Reset connection
  -u, --user=user          User

See code: src/commands/connect.ts

gc2 grid

Create a fishnet grid from an input polygon.

USAGE
  $ gc2 grid

OPTIONS
  -e, --extent=extent  (required) Polygon table which should be used for extent
  -h, --help           show CLI help
  -s, --size=size      (required) Cell size in map units
  -t, --table=table    (required) Name of the new fishnet table

See code: src/commands/grid.ts

gc2 help [COMMAND]

Display help for gc2.

USAGE
  $ gc2 help [COMMAND]

ARGUMENTS
  COMMAND  Command to show help for.

OPTIONS
  -n, --nested-commands  Include all nested commands in the output.

See code: @oclif/plugin-help

gc2 import [OPTIONS]

Import files to GC2. Set path to a file or folder, which will be compressed, uploaded and imported into GC2

USAGE
  $ gc2 import [OPTIONS]

OPTIONS
  -c, --srs=srs      [default: 4326] Output spatial reference system. Use EPSG codes.
  -h, --help         show CLI help
  -p, --input=input  (required) Input path to file or folder.

See code: src/commands/import.ts

gc2 login [OPTIONS]

Sign in to GC2. You can set the connect options beforehand using the connect command. Providing the password on the commandline is considered insecure. It's better to be prompt for the password

USAGE
  $ gc2 login [OPTIONS]

OPTIONS
  -h, --help               show CLI help
  -p, --password=password  Password

See code: src/commands/login.ts

gc2 scheduler:start [ID]

Starts a scheduler job

USAGE
  $ gc2 scheduler:start [ID]

OPTIONS
  -h, --help  show CLI help

See code: src/commands/scheduler/start.ts

gc2 seed:list

List running seed jobs

USAGE
  $ gc2 seed:list

OPTIONS
  -h, --help  show CLI help

See code: src/commands/seed/list.ts

gc2 seed:log

Logs

USAGE
  $ gc2 seed:log

OPTIONS
  -h, --help       show CLI help
  -u, --uuid=uuid  (required) UUID of seed job

See code: src/commands/seed/log.ts

gc2 seed:start

Starts a seed job

USAGE
  $ gc2 seed:start

OPTIONS
  -e, --end=end          (required) End zoom level (the higher number)
  -f, --force            Force seed job - overwrites existing tiles
  -g, --grid=grid        (required) Grid to use
  -h, --help             show CLI help
  -l, --layer=layer      (required) Layer to seed [schema].[relation]
  -n, --name=name        (required) Name of seed job
  -s, --start=start      (required) Start zoom level (the lower number)
  -t, --threads=threads  Number of parallel threads that should be used to request tiles from the WMS source
  -x, --extent=extent    (required) Polygon layer which set the extent for the seeding [schema].[relation]

See code: src/commands/seed/start.ts

gc2 seed:stop

Stops a seed job

USAGE
  $ gc2 seed:stop

OPTIONS
  -h, --help       show CLI help
  -u, --uuid=uuid  (required) UUID of seed job

See code: src/commands/seed/stop.ts

gc2 sql [OPTIONS]

Run SQL statements. If run without --statement inactive mode will be enabled.

USAGE
  $ gc2 sql [OPTIONS]

OPTIONS
  -c, --srs=srs              [default: 4326] Output spatial reference system. Use EPSG codes.
  -f, --format=format        [default: ogr/GPKG] Output file format.
  -h, --help                 show CLI help
  -p, --path=path            Output path to file. If omitted file is saved in current folder.
  -s, --statement=statement  SQL statement

See code: src/commands/sql.ts

gc2 update [CHANNEL]

update the gc2 CLI

USAGE
  $ gc2 update [CHANNEL]

OPTIONS
  -a, --available        Install a specific version.
  -i, --interactive      Interactively select version to install. This is ignored if a channel is provided.
  -v, --version=version  Install a specific version.
  --force                Force a re-download of the requested version.

EXAMPLES
  [object Object]
  [object Object]
  [object Object]
  [object Object]

See code: @oclif/plugin-update