CLI tool for GC2
$ npm install -g @centia-io/cli
$ centia COMMAND
running command...
$ centia (--version|-v)
@centia-io/cli/2026.5.0 linux-x64 node-v24.14.1
$ centia --help [COMMAND]
USAGE
$ centia COMMAND
...centia client add [NAME]centia client drop [ID]centia client get [ID]centia client update [ID]centia column add [TABLE] [COLUMN] [TYPE]centia column default [TABLE] [COLUMN] [DEFAULT]centia column drop [TABLE] [COLUMN]centia column get [TABLE] [COLUMN]centia column nullable [TABLE] [COLUMN] [NULLABLE]centia column rename [TABLE] [COLUMN] [NAME]centia column type [TABLE] [COLUMN] [TYPE]centia config pathcentia connect [HOST]centia constraint add [TABLE] [COLUMNS] [TYPE] [NAME]centia constraint drop [TABLE] [NAME]centia constraint get [TABLE] [NAME]centia help [COMMAND]centia import [PATH]centia index add [TABLE] [COLUMNS] [METHOD] [NAME]centia index drop [TABLE] [NAME]centia index get [TABLE] [NAME]centia logincentia logoutcentia privilege get [TABLE]centia privilege set [TABLE] [USER] [PRIVILEGE]centia rule addcentia rule drop [ID]centia rule get [ID]centia rule update [ID]centia schema add [SCHEMA]centia schema drop [SCHEMA]centia schema get [SCHEMA]centia schema rename [SCHEMA] [NAME]centia sqlcentia table add [TABLE]centia table drop [TABLE]centia table event [TABLE] [EVENT]centia table get [TABLE]centia table move [TABLE] [DESTINATION]centia table rename [TABLE] [NAME]centia user add [NAME]centia user drop [NAME]centia user get [ID]centia user updatecentia whoami
Create new client.
USAGE
$ centia client add [NAME] [-i <value>] [-n <value>] [-d <value>] [-r <value>] [-H <value>] [-p] [-c] [-t]
[-s] [-S] [-h]
ARGUMENTS
[NAME] Name of new client.
FLAGS
-H, --homepage=<value> Homepage of the application.
-S, --social_signup Enable users to sign up for a new account with social login.
-c, --confirm Client user must confirm the token exchange.
-d, --description=<value> Description of new client.
-h, --help Show CLI help.
-i, --id=<value> Id of new client.
-n, --name=<value> Name of new client.
-p, --public Public client. No secret needed.
-r, --redirect_uri=<value> Redirect uri. Redirects will only be allowed to an uri in this list.
-s, --allow_signup Allow users to sign up for a new account in the web-dialog.
-t, --two_factor Client user must authenticate with two factor authentication.
DESCRIPTION
Create new client.
See code: src/commands/client/add.ts
Drop a client.
USAGE
$ centia client drop [ID] [-h]
ARGUMENTS
[ID] Id of client.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Drop a client.
See code: src/commands/client/drop.ts
List client(s).
USAGE
$ centia client get [ID] [-h]
ARGUMENTS
[ID] Client id
FLAGS
-h, --help Show CLI help.
DESCRIPTION
List client(s).
See code: src/commands/client/get.ts
Update a client.
USAGE
$ centia client update [ID] [-n <value>] [-d <value>] [-r <value>] [-p <value>] [-p] [-c] [-t] [-s] [-S] [-h]
ARGUMENTS
[ID] Id of client.
FLAGS
-S, --social_signup Enable users to sign up for a new account with social login.
-c, --confirm Client user must confirm the token exchange.
-d, --description=<value> Description of new client.
-h, --help Show CLI help.
-n, --name=<value> New name ofclient.
-p, --homepage=<value> Homepage of the application.
-p, --public Public client. No secret needed.
-r, --redirect_uri=<value> Redirect uri. Redirects will only be allowed to an uri in this list.
-s, --allow_signup Allow users to sign up for a new account in the web-dialog.
-t, --two_factor Client user must authenticate with two factor authentication.
DESCRIPTION
Update a client.
See code: src/commands/client/update.ts
Add a new column to a table.
USAGE
$ centia column add [TABLE] [COLUMN] [TYPE] [-h]
ARGUMENTS
[TABLE] Name of table.
[COLUMN] Name of new column.
[TYPE] Data type of new column.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Add a new column to a table.
See code: src/commands/column/add.ts
Set default value for column. The default value is set when inserting a new row without a value for the column.
USAGE
$ centia column default [TABLE] [COLUMN] [DEFAULT] [-h]
ARGUMENTS
[TABLE] Name of table.
[COLUMN] Name of column.
[DEFAULT] Default value. Set to 'null' for removing an already set value.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Set default value for column. The default value is set when inserting a new row without a value for the column.
See code: src/commands/column/default.ts
Drop a column from table.
USAGE
$ centia column drop [TABLE] [COLUMN] [-h]
ARGUMENTS
[TABLE] Name of table.
[COLUMN] Name of column to drop.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Drop a column from table.
See code: src/commands/column/drop.ts
Get description of a column.
USAGE
$ centia column get [TABLE] [COLUMN] [-h]
ARGUMENTS
[TABLE] Name of table.
[COLUMN] Name of column.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Get description of a column.
See code: src/commands/column/get.ts
Set nullable on column. If set the column can't be empty.
USAGE
$ centia column nullable [TABLE] [COLUMN] [NULLABLE] [-h]
ARGUMENTS
[TABLE] Name of table.
[COLUMN] Name of column.
[NULLABLE] (true|false) Set column to nullable.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Set nullable on column. If set the column can't be empty.
See code: src/commands/column/nullable.ts
Rename a column.
USAGE
$ centia column rename [TABLE] [COLUMN] [NAME] [-h]
ARGUMENTS
[TABLE] Name of table.
[COLUMN] Existing name of column.
[NAME] New name for column.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Rename a column.
See code: src/commands/column/rename.ts
Set the data on column. It might be, the existing data type can't be transformed to the chosen one.
USAGE
$ centia column type [TABLE] [COLUMN] [TYPE] [-h]
ARGUMENTS
[TABLE] Name of table.
[COLUMN] Name of column.
[TYPE] New data type for column.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Set the data on column. It might be, the existing data type can't be transformed to the chosen one.
See code: src/commands/column/type.ts
Print the absolute path to the configstore JSON file used by the CLI.
USAGE
$ centia config path [-h]
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Print the absolute path to the configstore JSON file used by the CLI.
See code: src/commands/config/path.ts
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
$ centia connect [HOST] [-h] [-r]
ARGUMENTS
[HOST] Server host with scheme: http(s)
FLAGS
-h, --help Show CLI help.
-r, --reset Reset connection.
DESCRIPTION
Set connection. You can use flags to set host, database and user. If one or more flags are missing, you will be
prompted instead.
See code: src/commands/connect.ts
Add a constraint.
USAGE
$ centia constraint add [TABLE] [COLUMNS] [TYPE] [NAME] [-h] [-t <value>] [-e <value>] [-c <value>]
ARGUMENTS
[TABLE] Name of table.
[COLUMNS] Columns for use in the constraint (comma separated).
[TYPE] (primary|unique|foreign|check) Type of constraint.
[NAME] Name for constraint.
FLAGS
-h, --help Show CLI help.
CHECK OPTIONS FLAGS
-c, --check=<value> Check expression
FOREIGN KEY OPTIONS FLAGS
-e, --referencedColumns=<value> Referenced columns.
-t, --referencedTable=<value> Referenced table.
DESCRIPTION
Add a constraint.
See code: src/commands/constraint/add.ts
Drop a constraint.
USAGE
$ centia constraint drop [TABLE] [NAME] [-h]
ARGUMENTS
[TABLE] Name of table.
[NAME] Name of constraint.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Drop a constraint.
See code: src/commands/constraint/drop.ts
Get constraint details.
USAGE
$ centia constraint get [TABLE] [NAME] [-h]
ARGUMENTS
[TABLE] Name of table.
[NAME] Name of constraint.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Get constraint details.
See code: src/commands/constraint/get.ts
Display help for centia.
USAGE
$ centia help [COMMAND...] [-n]
ARGUMENTS
[COMMAND...] Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for centia.
See code: @oclif/plugin-help
Import files. Set path to a file or folder, which will be compressed, uploaded and imported into GC2.
USAGE
$ centia import [PATH] [-s <value>] [-t <value>] [-T <value>] [-x <value>] [-y <value>] [-d] [-a] [-r]
[-p] [-n <value>] [-h]
ARGUMENTS
[PATH] [default: .] Input path to file or folder.
FLAGS
-T, --timestamp=<value> Name of timestamp field. Create a timestamp field in the import table. Omit argument
for no timestamp field.
-a, --append Append to existing table instead of creating new.
-d, --dry_run Dry run. Only analyse files with no import.
-h, --help Show CLI help.
-n, --table_name=<value> Name of table. Defaults to the name of the file. Can only be used when importing
single file - not directories unless --append is used
-p, --p_multi Promote single geometries to multi part.
-r, --truncate Truncate table before appending. Only have effect if --append is set.
-s, --s_srs=<value> Fallback source SRS. Will be used if file doesn't contain projection information
-t, --t_srs=<value> Fallback target SRS. Will be used if no authority name/code is available. Defaults to
EPSG:4326.
-x, --x_possible_names=<value> Specify the potential names of the columns that can contain X/longitude. Only effects
CSV. Defaults to "lon*,Lon*,x,X"]
-y, --y_possible_names=<value> Specify the potential names of the columns that can contain Y/latitude. Only effects
CSV. Defaults to "lat*,Lat*,y,Y"]
DESCRIPTION
Import files. Set path to a file or folder, which will be compressed, uploaded and imported into GC2.
See code: src/commands/import.ts
Add an new index to table.
USAGE
$ centia index add [TABLE] [COLUMNS] [METHOD] [NAME] [-h]
ARGUMENTS
[TABLE] Name of table.
[COLUMNS] Columns to index (comma separated).
[METHOD] (btree|brin|gin|gist|hash) Index method.
[NAME] Name of new index.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Add an new index to table.
See code: src/commands/index/add.ts
Drop an index from table.
USAGE
$ centia index drop [TABLE] [NAME] [-h]
ARGUMENTS
[TABLE] Name of table.
[NAME] Name of index.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Drop an index from table.
See code: src/commands/index/drop.ts
Get index definition.
USAGE
$ centia index get [TABLE] [NAME] [-h]
ARGUMENTS
[TABLE] Name of table.
[NAME] Name of index.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Get index definition.
See code: src/commands/index/get.ts
Sign in to Centia. Use connect to set the host first.
USAGE
$ centia login [-h] [-p <value>] [-u <value>] [-f password|device|code]
FLAGS
-f, --flow=<option> [default: code] Authentication flow
<options: password|device|code>
-h, --help Show CLI help.
-p, --password=<value> Password
-u, --user=<value> Username/database
DESCRIPTION
Sign in to Centia. Use `connect` to set the host first.
See code: src/commands/login.ts
Logout the current user.
USAGE
$ centia logout [-h]
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Logout the current user.
See code: src/commands/logout.ts
Get user privileges on table.
USAGE
$ centia privilege get [TABLE] [-h]
ARGUMENTS
[TABLE] Name of table.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Get user privileges on table.
See code: src/commands/privilege/get.ts
Set user privileges on table.
USAGE
$ centia privilege set [TABLE] [USER] [PRIVILEGE] [-h]
ARGUMENTS
[TABLE] Name of table.
[USER] Name of user.
[PRIVILEGE] Which privilege.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Set user privileges on table.
See code: src/commands/privilege/set.ts
Create a new rule.
USAGE
$ centia rule add [-P <value>] [-u <value>] [-s <value>] [-p <value>] [-c <value>] [-t <value>] [-i <value>]
[-a <value>] [-f <value>] [-h]
FLAGS
-P, --priority=<value> Priority
-a, --access=<value> Access
-c, --schema=<value> schema
-f, --filter=<value> Filter
-h, --help Show CLI help.
-i, --iprange=<value> Ip range
-p, --request=<value> Request
-s, --service=<value> Service
-t, --table=<value> Table
-u, --username=<value> Username
DESCRIPTION
Create a new rule.
See code: src/commands/rule/add.ts
Drop a rule.
USAGE
$ centia rule drop [ID] [-h]
ARGUMENTS
[ID] Id of rule
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Drop a rule.
See code: src/commands/rule/drop.ts
Get rule(s).
USAGE
$ centia rule get [ID] [-h]
ARGUMENTS
[ID] Rule id
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Get rule(s).
See code: src/commands/rule/get.ts
Update a rule.
USAGE
$ centia rule update [ID] [-p <value>] [-u <value>] [-s <value>] [-r <value>] [-c <value>] [-t <value>] [-i
<value>] [-a <value>] [-f <value>] [-h]
ARGUMENTS
[ID] Rule id.
FLAGS
-a, --access=<value> Access
-c, --schema=<value> schema
-f, --filter=<value> Filter
-h, --help Show CLI help.
-i, --iprange=<value> Ip range
-p, --priority=<value> Priority
-r, --request=<value> Request
-s, --service=<value> Service
-t, --table=<value> Table
-u, --username=<value> Username
DESCRIPTION
Update a rule.
See code: src/commands/rule/update.ts
Create a new schema.
USAGE
$ centia schema add [SCHEMA] [-h]
ARGUMENTS
[SCHEMA] Name of new schema.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Create a new schema.
See code: src/commands/schema/add.ts
Drop a schema.
USAGE
$ centia schema drop [SCHEMA] [-h]
ARGUMENTS
[SCHEMA] Name of schema.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Drop a schema.
See code: src/commands/schema/drop.ts
Get list of tables in schema.
USAGE
$ centia schema get [SCHEMA] [-R] [-h]
ARGUMENTS
[SCHEMA] Name of schema.
FLAGS
-R, --raw Print raw data.
-h, --help Show CLI help.
DESCRIPTION
Get list of tables in schema.
See code: src/commands/schema/get.ts
Rename schema.
USAGE
$ centia schema rename [SCHEMA] [NAME] [-h]
ARGUMENTS
[SCHEMA] Name of schema.
[NAME] New name for schema.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Rename schema.
See code: src/commands/schema/rename.ts
Run SQL statements. If run without --statement inactive mode will be enabled.
USAGE
$ centia sql [-s <value>] [-c <value>] [-f <value>] [-g wkt|geojson] [-p <value>] [-h]
FLAGS
-c, --srs=<value> [default: 4326] Output spatial reference system. Use EPSG codes.
-f, --format=<value> Output file format.
-g, --geoformat=<option> Output geometry in CSV and Excel.
<options: wkt|geojson>
-h, --help Show CLI help.
-p, --path=<value> [default: .] Output path to file. If omitted file is saved in current folder.
-s, --statement=<value> SQL statement. Any select, insert, update and delete. No altering of schema is allowed.
DESCRIPTION
Run SQL statements. If run without --statement inactive mode will be enabled.
See code: src/commands/sql.ts
Create a new table.
USAGE
$ centia table add [TABLE] [-h]
ARGUMENTS
[TABLE] Name of table.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Create a new table.
See code: src/commands/table/add.ts
Drop a table.
USAGE
$ centia table drop [TABLE] [-h]
ARGUMENTS
[TABLE] Name of table.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Drop a table.
See code: src/commands/table/drop.ts
Enable emitting of realtime events from tables.
USAGE
$ centia table event [TABLE] [EVENT] [-h]
ARGUMENTS
[TABLE] Name of table.
[EVENT] Emit events.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Enable emitting of realtime events from tables.
See code: src/commands/table/event.ts
Get table definition.
USAGE
$ centia table get [TABLE] [-h]
ARGUMENTS
[TABLE] Name of table.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Get table definition.
See code: src/commands/table/get.ts
Move table to another schema.
USAGE
$ centia table move [TABLE] [DESTINATION] [-h]
ARGUMENTS
[TABLE] Name of table.
[DESTINATION] Destination schema.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Move table to another schema.
See code: src/commands/table/move.ts
Rename table.
USAGE
$ centia table rename [TABLE] [NAME] [-h]
ARGUMENTS
[TABLE] Name of table.
[NAME] New name for table.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Rename table.
See code: src/commands/table/rename.ts
Create new user.
USAGE
$ centia user add [NAME] [-h] [-p <value>] [-e <value>] [-P <value>] [-d]
ARGUMENTS
[NAME] Name of new user
FLAGS
-P, --properties=<value> Properties for new user
-d, --default_user The default user is the user that is used when no token is provided. Use for public
applications where users should not be able to access data without a token.
-e, --email=<value> E-mail for new user
-h, --help Show CLI help.
-p, --password=<value> password for new user.
DESCRIPTION
Create new user.
See code: src/commands/user/add.ts
Drop existing user.
USAGE
$ centia user drop [NAME] [-h]
ARGUMENTS
[NAME] Name of user to drop.
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Drop existing user.
See code: src/commands/user/drop.ts
Get user(s).
USAGE
$ centia user get [ID] [-h]
ARGUMENTS
[ID] User id
FLAGS
-h, --help Show CLI help.
DESCRIPTION
Get user(s).
See code: src/commands/user/get.ts
Update user.
USAGE
$ centia user update [-h] [-p <value>] [-d]
FLAGS
-d, --default_user The default user is the user that is used when no token is provided. Use for public
applications where users should not be able to access data without a token.
-h, --help Show CLI help.
-p, --password=<value> New password for user.
DESCRIPTION
Update user.
See code: src/commands/user/update.ts
Show the current Centia session: host, user, database, and status.
USAGE
$ centia whoami [-h] [--json]
FLAGS
-h, --help Show CLI help.
--json Output as JSON.
DESCRIPTION
Show the current Centia session: host, user, database, and status.
See code: src/commands/whoami.ts