{"id":19701744,"url":"https://github.com/kuzzleio/kourou","last_synced_at":"2025-08-12T00:11:37.415Z","repository":{"id":37752131,"uuid":"228581342","full_name":"kuzzleio/kourou","owner":"kuzzleio","description":"The CLI that helps you manage your Kuzzle application","archived":false,"fork":false,"pushed_at":"2025-07-07T12:08:02.000Z","size":1936,"stargazers_count":31,"open_issues_count":0,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-09T09:38:55.046Z","etag":null,"topics":["cli","command-line-interface","hacktoberfest","kuzzle","ocliff"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kuzzleio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-12-17T09:31:31.000Z","updated_at":"2025-07-07T11:51:29.000Z","dependencies_parsed_at":"2024-01-08T11:18:20.642Z","dependency_job_id":"4347a6b1-f0fd-4375-9a8b-2d4b4a915011","html_url":"https://github.com/kuzzleio/kourou","commit_stats":{"total_commits":293,"total_committers":24,"mean_commits":"12.208333333333334","dds":0.6552901023890785,"last_synced_commit":"76d75f6449f392786e298c31585c862491410bb3"},"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"purl":"pkg:github/kuzzleio/kourou","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuzzleio%2Fkourou","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuzzleio%2Fkourou/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuzzleio%2Fkourou/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuzzleio%2Fkourou/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kuzzleio","download_url":"https://codeload.github.com/kuzzleio/kourou/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuzzleio%2Fkourou/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269734149,"owners_count":24466554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line-interface","hacktoberfest","kuzzle","ocliff"],"created_at":"2024-11-11T21:10:14.215Z","updated_at":"2025-08-12T00:11:37.393Z","avatar_url":"https://github.com/kuzzleio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kourou\n\nThe CLI that helps you manage your Kuzzle instances.\n\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/kourou.svg)](https://npmjs.org/package/kourou)\n[![Downloads/week](https://img.shields.io/npm/dw/kourou.svg)](https://npmjs.org/package/kourou)\n[![License](https://img.shields.io/npm/l/kourou.svg)](https://github.com/kuzzleio/kourou/blob/master/package.json)\n\n\u003c!-- toc --\u003e\n* [kourou](#kourou)\n* [Usage](#usage)\n* [Commands](#commands)\n* [Where does this weird name come from?](#where-does-this-weird-name-come-from)\n* [Have fun with a quine](#have-fun-with-a-quine)\n* [Telemetry](#telemetry)\n\u003c!-- tocstop --\u003e\n\n:warning: This project is currently in beta and breaking changes may occur until the 1.0.0\n\n# Usage\n\n\u003c!-- usage --\u003e\n```sh-session\n$ npm install -g kourou\n$ kourou COMMAND\nrunning command...\n$ kourou (-v|--version|version)\nkourou/1.2.0 linux-x64 node-v22.16.0\n$ kourou --help [COMMAND]\nUSAGE\n  $ kourou COMMAND\n...\n```\n\u003c!-- usagestop --\u003e\n\n## Connect and authenticate to Kuzzle API\n\nCommands that needs to send requests to Kuzzle API can specify the Kuzzle server address and authentication informations.\n\nBy command line:\n```\n\n  --host=host                    [default: localhost] Kuzzle server host\n  --port=port                    [default: 7512] Kuzzle server port\n  --username=username            [default: anonymous] Kuzzle user\n  --password=password            Kuzzle user password\n  --api-key=api-key              Kuzzle user api-key\n  --ssl                          [default: true for port 443] Use SSL to connect to Kuzzle\n  --protocol                     [default: ws] Protocol used to connect to Kuzzle ( `http` or `ws` )\n\n```\n\nBy environment variables:\n```\n\n  KUZZLE_HOST                [default: localhost] Kuzzle server host\n  KUZZLE_PORT                [default: 7512] Kuzzle server port\n  KUZZLE_USERNAME            [default: anonymous] Kuzzle user\n  KUZZLE_PASSWORD            Kuzzle user password\n  KUZZLE_API_KEY             Kuzzle user api-key\n  KUZZLE_SSL                 Use SSL to connect to Kuzzle\n  KUZZLE_PROTOCOL            Protocol used to connect to Kuzzle ( `http` or `ws` )\n\n```\n\n## User impersonation\n\nYou can impersonate a user before executing a command with the `--as` flag and a user `kuid` .\n\nUser impersonation require the following rights for the authenticated user: `security:createApiKey` , `security:deleteApiKey`\n```bash\n$ kourou sdk:query auth:getCurrentUser --as gordon --username admin --password admin\n\n 🚀 Kourou - Executes an API query.\n\n [ℹ] Connecting to http://localhost:7512 ...\n [ℹ] Impersonate user \"gordon\"\n\n[...]\n```\n\n## Automatic command infering for API actions\n\nWhen no command is found, Kourou will try to execute the given command with the `sdk:query` command.\n\nThe first argument has to be the name of the controller and the action separated by a semicolon (eg `document:create` )\n\nKourou will try to infer common arguments like `index` , `collection` , `_id` or `body` .\n\nIt will automatically infer and accept the following lists of arguments:\n - `\u003ccommand\u003e \u003cindex\u003e`\n    - _eg: `kourou collection:list iot` _\n\n.\n\n - `\u003ccommand\u003e \u003cbody\u003e`\n    - _eg: `kourou security:createUser '{\"content\":{\"profileIds\":[\"default\"]}}' --id yagmur` _\n\n.\n\n - `\u003ccommand\u003e \u003cindex\u003e \u003ccollection\u003e`\n    - _eg: `kourou collection:truncate iot sensors` _\n\n.\n\n - `\u003ccommand\u003e \u003cindex\u003e \u003ccollection\u003e \u003cbody\u003e`\n    - _eg: `kourou bulk:import iot sensors '{bulkData: []}'` _\n\n.\n\n - `\u003ccommand\u003e \u003cindex\u003e \u003ccollection\u003e \u003cid\u003e`\n    - _eg: `kourou document:delete iot sensors sigfox-123` _\n\n.\n\n - `\u003ccommand\u003e \u003cindex\u003e \u003ccollection\u003e \u003cid\u003e \u003cbody\u003e`\n    - _eg: `kourou document:create iot sensors sigfox-123 '{temperature: 42}'` _\n\nAll other arguments and options will be passed as-is to the `sdk:query` method.\n\n\u003e Note: you can pass arguments to the API actions with the `--arg` or `-a` option in your command, e.g.\n\u003e `kourou security:createFirstAdmin '{ ...credentials here... }' -a reset=true`\n\n# Commands\n\n\u003c!-- commands --\u003e\n* [`kourou api-key:check TOKEN`](#kourou-api-keycheck-token)\n* [`kourou api-key:create USER`](#kourou-api-keycreate-user)\n* [`kourou api-key:delete USER ID`](#kourou-api-keydelete-user-id)\n* [`kourou api-key:search USER`](#kourou-api-keysearch-user)\n* [`kourou app:debug-proxy`](#kourou-appdebug-proxy)\n* [`kourou app:doctor`](#kourou-appdoctor)\n* [`kourou app:scaffold DESTINATION`](#kourou-appscaffold-destination)\n* [`kourou app:start-services`](#kourou-appstart-services)\n* [`kourou autocomplete [SHELL]`](#kourou-autocomplete-shell)\n* [`kourou collection:create INDEX COLLECTION [BODY]`](#kourou-collectioncreate-index-collection-body)\n* [`kourou collection:export INDEX COLLECTION`](#kourou-collectionexport-index-collection)\n* [`kourou collection:import PATH`](#kourou-collectionimport-path)\n* [`kourou collection:migrate SCRIPT PATH`](#kourou-collectionmigrate-script-path)\n* [`kourou config:diff FIRST SECOND`](#kourou-configdiff-first-second)\n* [`kourou document:search INDEX COLLECTION [QUERY]`](#kourou-documentsearch-index-collection-query)\n* [`kourou es:aliases:cat`](#kourou-esaliasescat)\n* [`kourou es:indices:cat`](#kourou-esindicescat)\n* [`kourou es:indices:get INDEX ID`](#kourou-esindicesget-index-id)\n* [`kourou es:indices:insert INDEX`](#kourou-esindicesinsert-index)\n* [`kourou es:migrate`](#kourou-esmigrate)\n* [`kourou es:snapshot:create REPOSITORY NAME`](#kourou-essnapshotcreate-repository-name)\n* [`kourou es:snapshot:create-repository REPOSITORY LOCATION`](#kourou-essnapshotcreate-repository-repository-location)\n* [`kourou es:snapshot:list REPOSITORY`](#kourou-essnapshotlist-repository)\n* [`kourou es:snapshot:restore REPOSITORY NAME`](#kourou-essnapshotrestore-repository-name)\n* [`kourou file:decrypt FILE`](#kourou-filedecrypt-file)\n* [`kourou file:encrypt FILE`](#kourou-fileencrypt-file)\n* [`kourou file:test FILE`](#kourou-filetest-file)\n* [`kourou help [COMMAND]`](#kourou-help-command)\n* [`kourou import PATH`](#kourou-import-path)\n* [`kourou index:export INDEX`](#kourou-indexexport-index)\n* [`kourou index:import PATH`](#kourou-indeximport-path)\n* [`kourou instance:kill`](#kourou-instancekill)\n* [`kourou instance:list`](#kourou-instancelist)\n* [`kourou instance:logs`](#kourou-instancelogs)\n* [`kourou instance:spawn`](#kourou-instancespawn)\n* [`kourou paas:login`](#kourou-paaslogin)\n* [`kourou profile:export`](#kourou-profileexport)\n* [`kourou profile:import PATH`](#kourou-profileimport-path)\n* [`kourou realtime:subscribe INDEX COLLECTION [FILTERS]`](#kourou-realtimesubscribe-index-collection-filters)\n* [`kourou redis:list-keys [MATCH]`](#kourou-redislist-keys-match)\n* [`kourou role:export`](#kourou-roleexport)\n* [`kourou role:import PATH`](#kourou-roleimport-path)\n* [`kourou sdk:execute [CODE]`](#kourou-sdkexecute-code)\n* [`kourou sdk:query CONTROLLER:ACTION`](#kourou-sdkquery-controlleraction)\n* [`kourou user:export`](#kourou-userexport)\n* [`kourou user:export-mappings`](#kourou-userexport-mappings)\n* [`kourou user:import PATH`](#kourou-userimport-path)\n* [`kourou user:import-mappings PATH`](#kourou-userimport-mappings-path)\n* [`kourou vault:add SECRETS-FILE KEY VALUE`](#kourou-vaultadd-secrets-file-key-value)\n* [`kourou vault:decrypt FILE`](#kourou-vaultdecrypt-file)\n* [`kourou vault:encrypt FILE`](#kourou-vaultencrypt-file)\n* [`kourou vault:show SECRETS-FILE [KEY]`](#kourou-vaultshow-secrets-file-key)\n* [`kourou vault:test SECRETS-FILE`](#kourou-vaulttest-secrets-file)\n\n## `kourou api-key:check TOKEN`\n\nChecks an API key validity\n\n```\nUSAGE\n  $ kourou api-key:check TOKEN\n\nARGUMENTS\n  TOKEN  API key token\n\nOPTIONS\n  --api-key=api-key    Kuzzle user api-key\n  --as=as              Impersonate a user\n  --help               show CLI help\n  --host=host          [default: localhost] Kuzzle server host\n  --password=password  Kuzzle user password\n  --port=port          [default: 7512] Kuzzle server port\n  --protocol=protocol  [default: ws] Kuzzle protocol (http or ws)\n  --ssl                Use SSL to connect to Kuzzle\n  --username=username  [default: anonymous] Kuzzle username (local strategy)\n\nEXAMPLE\n  kourou api-key:check eyJhbG...QxfQrc\n```\n\n_See code: [lib/commands/api-key/check.js](lib/commands/api-key/check.js)_\n\n## `kourou api-key:create USER`\n\nCreates a new API Key for a user\n\n```\nUSAGE\n  $ kourou api-key:create USER\n\nARGUMENTS\n  USER  User kuid\n\nOPTIONS\n  -d, --description=description  (required) API Key description\n  --api-key=api-key              Kuzzle user api-key\n  --as=as                        Impersonate a user\n  --expire=expire                [default: -1] API Key validity\n  --help                         show CLI help\n  --host=host                    [default: localhost] Kuzzle server host\n  --id=id                        API Key unique ID\n  --password=password            Kuzzle user password\n  --port=port                    [default: 7512] Kuzzle server port\n  --protocol=protocol            [default: ws] Kuzzle protocol (http or ws)\n  --ssl                          Use SSL to connect to Kuzzle\n  --username=username            [default: anonymous] Kuzzle username (local strategy)\n```\n\n_See code: [lib/commands/api-key/create.js](lib/commands/api-key/create.js)_\n\n## `kourou api-key:delete USER ID`\n\nDeletes an API key.\n\n```\nUSAGE\n  $ kourou api-key:delete USER ID\n\nARGUMENTS\n  USER  User kuid\n  ID    API Key unique ID\n\nOPTIONS\n  --api-key=api-key    Kuzzle user api-key\n  --as=as              Impersonate a user\n  --help               show CLI help\n  --host=host          [default: localhost] Kuzzle server host\n  --password=password  Kuzzle user password\n  --port=port          [default: 7512] Kuzzle server port\n  --protocol=protocol  [default: ws] Kuzzle protocol (http or ws)\n  --ssl                Use SSL to connect to Kuzzle\n  --username=username  [default: anonymous] Kuzzle username (local strategy)\n\nEXAMPLE\n  kourou vault:delete sigfox-gateway 1k-BF3EBjsXdvA2PR8x\n```\n\n_See code: [lib/commands/api-key/delete.js](lib/commands/api-key/delete.js)_\n\n## `kourou api-key:search USER`\n\nLists a user's API Keys.\n\n```\nUSAGE\n  $ kourou api-key:search USER\n\nARGUMENTS\n  USER  User kuid\n\nOPTIONS\n  --api-key=api-key    Kuzzle user api-key\n  --as=as              Impersonate a user\n  --filter=filter      Filter to match the API Key descriptions\n  --help               show CLI help\n  --host=host          [default: localhost] Kuzzle server host\n  --password=password  Kuzzle user password\n  --port=port          [default: 7512] Kuzzle server port\n  --protocol=protocol  [default: ws] Kuzzle protocol (http or ws)\n  --ssl                Use SSL to connect to Kuzzle\n  --username=username  [default: anonymous] Kuzzle username (local strategy)\n```\n\n_See code: [lib/commands/api-key/search.js](lib/commands/api-key/search.js)_\n\n## `kourou app:debug-proxy`\n\nCreate a Proxy Server that allows Chrome to debug Kuzzle remotely using the DebugController\n\n```\nUSAGE\n  $ kourou app:debug-proxy\n\nOPTIONS\n  --api-key=api-key          Kuzzle user api-key\n  --as=as                    Impersonate a user\n  --forwardPort=forwardPort  [default: 9222] Port of the forwarding server\n  --help                     show CLI help\n  --host=host                [default: localhost] Kuzzle server host\n  --keepAuth                 Keep the user authenticated\n\n  --noAutoEnableDebugger     True if Kourou should not enable and disable the Debugger automatically before and after\n                             usage\n\n  --password=password        Kuzzle user password\n\n  --port=port                [default: 7512] Kuzzle server port\n\n  --protocol=protocol        [default: ws] Kuzzle protocol (http or ws)\n\n  --showDebuggerEvents       Verbose mode to display events sent to the Chrome Debugger\n\n  --showDebuggerPayloads     Verbose mode to display payloads sent by and to the Chrome Debugger\n\n  --ssl                      Use SSL to connect to Kuzzle\n\n  --ttl=ttl                  [default: 1h] Kuzzle login TTL\n\n  --username=username        [default: anonymous] Kuzzle username (local strategy)\n```\n\n_See code: [lib/commands/app/debug-proxy.js](lib/commands/app/debug-proxy.js)_\n\n## `kourou app:doctor`\n\nAnalyze a Kuzzle application\n\n```\nUSAGE\n  $ kourou app:doctor\n\nOPTIONS\n  --api-key=api-key              Kuzzle user api-key\n  --as=as                        Impersonate a user\n  --elasticsearch=elasticsearch  [default: http://localhost:9200] Elasticsearch server URL\n  --help                         show CLI help\n  --host=host                    [default: localhost] Kuzzle server host\n  --password=password            Kuzzle user password\n  --port=port                    [default: 7512] Kuzzle server port\n  --protocol=protocol            [default: ws] Kuzzle protocol (http or ws)\n  --ssl                          Use SSL to connect to Kuzzle\n  --username=username            [default: anonymous] Kuzzle username (local strategy)\n```\n\n_See code: [lib/commands/app/doctor.js](lib/commands/app/doctor.js)_\n\n## `kourou app:scaffold DESTINATION`\n\nScaffolds a new Kuzzle application\n\n```\nUSAGE\n  $ kourou app:scaffold DESTINATION\n\nARGUMENTS\n  DESTINATION  Directory to scaffold the app\n\nOPTIONS\n  --flavor=flavor  [default: generic] Template flavor (\"generic\", \"iot\").\n  --help           show CLI help\n```\n\n_See code: [lib/commands/app/scaffold.js](lib/commands/app/scaffold.js)_\n\n## `kourou app:start-services`\n\nStarts Kuzzle services (Elasticsearch and Redis)\n\n```\nUSAGE\n  $ kourou app:start-services\n\nOPTIONS\n  --check  Check prerequisite before running services\n  --help   show CLI help\n```\n\n_See code: [lib/commands/app/start-services.js](lib/commands/app/start-services.js)_\n\n## `kourou autocomplete [SHELL]`\n\ndisplay autocomplete installation instructions\n\n```\nUSAGE\n  $ kourou autocomplete [SHELL]\n\nARGUMENTS\n  SHELL  shell type\n\nOPTIONS\n  -r, --refresh-cache  Refresh cache (ignores displaying instructions)\n\nEXAMPLES\n  $ kourou autocomplete\n  $ kourou autocomplete bash\n  $ kourou autocomplete zsh\n  $ kourou autocomplete --refresh-cache\n```\n\n_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v1.3.10/src/commands/autocomplete/index.ts)_\n\n## `kourou collection:create INDEX COLLECTION [BODY]`\n\nCreates a collection\n\n```\nUSAGE\n  $ kourou collection:create INDEX COLLECTION [BODY]\n\nARGUMENTS\n  INDEX       Index name\n  COLLECTION  Collection name\n  BODY        Collection mappings and settings in JS or JSON format. Will be read from STDIN if available\n\nOPTIONS\n  --api-key=api-key    Kuzzle user api-key\n  --as=as              Impersonate a user\n  --help               show CLI help\n  --host=host          [default: localhost] Kuzzle server host\n  --password=password  Kuzzle user password\n  --port=port          [default: 7512] Kuzzle server port\n  --protocol=protocol  [default: ws] Kuzzle protocol (http or ws)\n  --ssl                Use SSL to connect to Kuzzle\n  --username=username  [default: anonymous] Kuzzle username (local strategy)\n```\n\n_See code: [lib/commands/collection/create.js](lib/commands/collection/create.js)_\n\n## `kourou collection:export INDEX COLLECTION`\n\nExports a collection (JSONL format)\n\n```\nUSAGE\n  $ kourou collection:export INDEX COLLECTION\n\nARGUMENTS\n  INDEX       Index name\n  COLLECTION  Collection name\n\nOPTIONS\n  --api-key=api-key\n      Kuzzle user api-key\n\n  --as=as\n      Impersonate a user\n\n  --batch-size=batch-size\n      [default: 2000] Maximum batch size (see limits.documentsFetchCount config)\n\n  --editor\n      Open an editor (EDITOR env variable) to edit the query before sending\n\n  --fields=fields\n      [CSV format only] The list of fields to be included in the CSV export in dot-path format.\n\n      Example:\n      --fields oneField,anotherField,yetAnotherOne.nested.moarNested\n\n      Note that the '_id' field is always included in the CSV export. Leaving this option empty implies that all\n      exportable fields in the mapping will be exported.\n\n  --format=jsonl|kuzzle|csv\n      [default: jsonl] \"kuzzle\" will export in Kuzzle format usable for internal fixtures,\n      \"jsonl\" allows to import that data back with kourou,\n      \"csv\" allows to import data into Excel (please, specify the fields to export using the --fields option).\n\n  --help\n      show CLI help\n\n  --host=host\n      [default: localhost] Kuzzle server host\n\n  --password=password\n      Kuzzle user password\n\n  --path=path\n      Dump root directory\n\n  --port=port\n      [default: 7512] Kuzzle server port\n\n  --protocol=protocol\n      [default: ws] Kuzzle protocol (http or websocket)\n\n  --query=query\n      [default: {}] Only dump documents matching the query (JS or JSON format)\n\n  --scrollTTL=scrollTTL\n      [default: 20s] The scroll TTL option to pass to the dump operation (which performs a document.search under the\n      hood),\n      expressed in ms format, e.g. '2s', '1m', '3h'.\n\n  --ssl\n      Use SSL to connect to Kuzzle\n\n  --type=type\n      [default: all] Type of the export: all, mappings, data\n\n  --username=username\n      [default: anonymous] Kuzzle username (local strategy)\n\nEXAMPLES\n  kourou collection:export nyc-open-data yellow-taxi\n  kourou collection:export nyc-open-data yellow-taxi --query '{ term: { city: \"Saigon\" } }'\n```\n\n_See code: [lib/commands/collection/export.js](lib/commands/collection/export.js)_\n\n## `kourou collection:import PATH`\n\nImports a collection\n\n```\nUSAGE\n  $ kourou collection:import PATH\n\nARGUMENTS\n  PATH  Dump directory path\n\nOPTIONS\n  --api-key=api-key        Kuzzle user api-key\n  --as=as                  Impersonate a user\n  --batch-size=batch-size  [default: 200] Maximum batch size (see limits.documentsWriteCount config)\n  --collection=collection  If set, override the collection destination name\n  --help                   show CLI help\n  --host=host              [default: localhost] Kuzzle server host\n  --index=index            If set, override the index destination name\n  --no-mappings            Skip collection mappings\n  --password=password      Kuzzle user password\n  --port=port              [default: 7512] Kuzzle server port\n  --protocol=protocol      [default: ws] Kuzzle protocol (http or websocket)\n  --ssl                    Use SSL to connect to Kuzzle\n  --username=username      [default: anonymous] Kuzzle username (local strategy)\n```\n\n_See code: [lib/commands/collection/import.js](lib/commands/collection/import.js)_\n\n## `kourou collection:migrate SCRIPT PATH`\n\nMigrate a collection by transforming documents from a dump file and importing them into Kuzzle\n\n```\nUSAGE\n  $ kourou collection:migrate SCRIPT PATH\n\nARGUMENTS\n  SCRIPT  Migration script path\n  PATH    Collection dump path\n\nOPTIONS\n  --api-key=api-key        Kuzzle user api-key\n  --as=as                  Impersonate a user\n  --batch-size=batch-size  [default: 200] Maximum batch size (see limits.documentsWriteCount config)\n  --collection=collection  If set, override the collection destination name\n  --help                   show CLI help\n  --host=host              [default: localhost] Kuzzle server host\n  --index=index            If set, override the index destination name\n  --password=password      Kuzzle user password\n  --port=port              [default: 7512] Kuzzle server port\n  --protocol=protocol      [default: ws] Kuzzle protocol (http or websocket)\n  --ssl                    Use SSL to connect to Kuzzle\n  --username=username      [default: anonymous] Kuzzle username (local strategy)\n```\n\n_See code: [lib/commands/collection/migrate.js](lib/commands/collection/migrate.js)_\n\n## `kourou config:diff FIRST SECOND`\n\nReturns differences between two Kuzzle configuration files (kuzzlerc)\n\n```\nUSAGE\n  $ kourou config:diff FIRST SECOND\n\nARGUMENTS\n  FIRST   First configuration file\n  SECOND  Second configuration file\n\nOPTIONS\n  --strict  Exit with an error if differences are found\n  --values  Also displays value changes\n\nEXAMPLE\n  kourou config:diff config/local/kuzzlerc config/production/kuzzlerc\n```\n\n_See code: [lib/commands/config/diff.js](lib/commands/config/diff.js)_\n\n## `kourou document:search INDEX COLLECTION [QUERY]`\n\nSearches for documents\n\n```\nUSAGE\n  $ kourou document:search INDEX COLLECTION [QUERY]\n\nARGUMENTS\n  INDEX       Index name\n  COLLECTION  Collection name\n  QUERY       Search query in JS or JSON format.\n\nOPTIONS\n  --api-key=api-key    Kuzzle user api-key\n  --as=as              Impersonate a user\n  --editor             Open an editor (EDITOR env variable) to edit the request before sending\n  --from=from          Optional offset\n  --help               show CLI help\n  --host=host          [default: localhost] Kuzzle server host\n  --lang=lang          [default: koncorde] Specify the query language to use\n  --password=password  Kuzzle user password\n  --port=port          [default: 7512] Kuzzle server port\n  --protocol=protocol  [default: ws] Kuzzle protocol (http or ws)\n  --scroll=scroll      Optional scroll TTL\n  --size=size          Optional page size\n  --sort=sort          [default: {}] Sort in JS or JSON format.\n  --ssl                Use SSL to connect to Kuzzle\n  --username=username  [default: anonymous] Kuzzle username (local strategy)\n\nEXAMPLES\n  kourou document:search iot sensors '{ equals: { name: \"corona\" } }'\n  kourou document:search iot sensors '{ match: { name: \"cOrOnna\" } }' -a lang=elasticsearch\n  kourou document:search iot sensors --editor\n```\n\n_See code: [lib/commands/document/search.js](lib/commands/document/search.js)_\n\n## `kourou es:aliases:cat`\n\nLists available ES aliases\n\n```\nUSAGE\n  $ kourou es:aliases:cat\n\nOPTIONS\n  -g, --grep=grep  Match output with pattern\n  -n, --node=node  [default: http://localhost:9200] Elasticsearch server URL\n  --help           show CLI help\n```\n\n_See code: [lib/commands/es/aliases/cat.js](lib/commands/es/aliases/cat.js)_\n\n## `kourou es:indices:cat`\n\nLists available ES indexes\n\n```\nUSAGE\n  $ kourou es:indices:cat\n\nOPTIONS\n  -g, --grep=grep  Match output with pattern\n  -n, --node=node  [default: http://localhost:9200] Elasticsearch server URL\n  --help           show CLI help\n```\n\n_See code: [lib/commands/es/indices/cat.js](lib/commands/es/indices/cat.js)_\n\n## `kourou es:indices:get INDEX ID`\n\nGets a document from ES\n\n```\nUSAGE\n  $ kourou es:indices:get INDEX ID\n\nARGUMENTS\n  INDEX  ES Index name\n  ID     Document ID\n\nOPTIONS\n  -n, --node=node  [default: http://localhost:9200] Elasticsearch server URL\n  --help           show CLI help\n```\n\n_See code: [lib/commands/es/indices/get.js](lib/commands/es/indices/get.js)_\n\n## `kourou es:indices:insert INDEX`\n\nInserts a document directly into ES (will replace if exists)\n\n```\nUSAGE\n  $ kourou es:indices:insert INDEX\n\nARGUMENTS\n  INDEX  ES Index name\n\nOPTIONS\n  -n, --node=node  [default: http://localhost:9200] Elasticsearch server URL\n  --body=body      [default: {}] Document body in JSON\n  --help           show CLI help\n  --id=id          Document ID\n```\n\n_See code: [lib/commands/es/indices/insert.js](lib/commands/es/indices/insert.js)_\n\n## `kourou es:migrate`\n\nMigrate all the index from an Elasticsearch (or a file) to another Elasticsearch\n\n```\nUSAGE\n  $ kourou es:migrate\n\nOPTIONS\n  --batch-size=batch-size  [default: 1000] How many documents to move in batch per operation\n  --dest=dest              (required) Migration destination provider\n  --dry-run                Print witch collections will be migrated\n  --esVersion=7|8          [default: 7] Elasticsearch version to use for the migration\n  --help                   show CLI help\n  --no-interactive         Skip confirmation interactive prompts (perfect for scripting)\n  --only-mappings          Only migrate mappings\n  --pattern=pattern        Pattern to match indices to migrate\n  --reset                  Reset destination Elasticsearch server\n  --scroll=scroll          [default: 30s] Scroll duration for Elasticsearch scrolling\n  --src=src                (required) Migration source provider\n\nEXAMPLES\n  kourou es:migrate --src http://elasticsearch:9200 --dest ./my-backup\n  kourou es:migrate --src ./my-backup --dest http://elasticsearch:9200\n  kourou es:migrate --src ./my-backup --dest http://username:password@elasticsearch:9200 --reset\n  kourou es:migrate --src ./my-backup --dest http://nologin:api-key@elasticsearch:9200 --reset // nologin is a special \n  username that allows you to use an API key as password\n  kourou es:migrate --src http://elasticsearch:9200 --dest ./my-backup --batch-size 2000 --pattern \n  '\u0026myindexes.collection-*'\n  kourou es:migrate --src ./my-backup --dest http://elasticsearch:9200 --reset --batch-size 2000 --no-interactive\n  kourou es:migrate --src ./my-backup --dest http://elasticsearch:9200 --reset --batch-size 2000 --no-interactive \n  --esVersion 8\n```\n\n_See code: [lib/commands/es/migrate.js](lib/commands/es/migrate.js)_\n\n## `kourou es:snapshot:create REPOSITORY NAME`\n\nCreate a snapshot repository inside an ES instance\n\n```\nUSAGE\n  $ kourou es:snapshot:create REPOSITORY NAME\n\nARGUMENTS\n  REPOSITORY  ES repository name\n  NAME        ES snapshot name\n\nOPTIONS\n  -n, --node=node  [default: http://localhost:9200] Elasticsearch server URL\n  --help           show CLI help\n```\n\n_See code: [lib/commands/es/snapshot/create.js](lib/commands/es/snapshot/create.js)_\n\n## `kourou es:snapshot:create-repository REPOSITORY LOCATION`\n\nCreate a FS snapshot repository inside an ES instance\n\n```\nUSAGE\n  $ kourou es:snapshot:create-repository REPOSITORY LOCATION\n\nARGUMENTS\n  REPOSITORY  ES repository name\n  LOCATION    ES snapshot repository location\n\nOPTIONS\n  -n, --node=node  [default: http://localhost:9200] Elasticsearch server URL\n  --compress       Compress data when storing them\n  --help           show CLI help\n```\n\n_See code: [lib/commands/es/snapshot/create-repository.js](lib/commands/es/snapshot/create-repository.js)_\n\n## `kourou es:snapshot:list REPOSITORY`\n\nList all snapshot from a repository acknowledge by an ES instance\n\n```\nUSAGE\n  $ kourou es:snapshot:list REPOSITORY\n\nARGUMENTS\n  REPOSITORY  Name of repository from which to fetch the snapshot information\n\nOPTIONS\n  -n, --node=node  [default: http://localhost:9200] Elasticsearch server URL\n  --help           show CLI help\n```\n\n_See code: [lib/commands/es/snapshot/list.js](lib/commands/es/snapshot/list.js)_\n\n## `kourou es:snapshot:restore REPOSITORY NAME`\n\nRestore a snapshot repository inside an ES instance\n\n```\nUSAGE\n  $ kourou es:snapshot:restore REPOSITORY NAME\n\nARGUMENTS\n  REPOSITORY  ES repository name\n  NAME        ES snapshot name\n\nOPTIONS\n  -n, --node=node  [default: http://localhost:9200] Elasticsearch server URL\n  --help           show CLI help\n```\n\n_See code: [lib/commands/es/snapshot/restore.js](lib/commands/es/snapshot/restore.js)_\n\n## `kourou file:decrypt FILE`\n\nDecrypts an encrypted file.\n\n```\nUSAGE\n  $ kourou file:decrypt FILE\n\nARGUMENTS\n  FILE  Encrypted file\n\nOPTIONS\n  -f, --force                    Overwrite the output file if it already exists\n  -o, --output-file=output-file  Output file (default: remove \".enc\")\n  --vault-key=vault-key          Kuzzle Vault Key (or KUZZLE_VAULT_KEY)\n\nEXAMPLES\n  kourou file:decrypt books/cryptonomicon.txt.enc --vault-key \u003cvault-key\u003e\n  kourou file:decrypt books/cryptonomicon.txt.enc -o books/cryptonomicon.txt --vault-key \u003cvault-key\u003e\n```\n\n_See code: [lib/commands/file/decrypt.js](lib/commands/file/decrypt.js)_\n\n## `kourou file:encrypt FILE`\n\nEncrypts an entire file.\n\n```\nUSAGE\n  $ kourou file:encrypt FILE\n\nARGUMENTS\n  FILE  Filename\n\nOPTIONS\n  -f, --force                    Overwrite the output file if it already exists\n  -o, --output-file=output-file  Output file (default: \u003cfilename\u003e.enc)\n  --vault-key=vault-key          Kuzzle Vault Key (or KUZZLE_VAULT_KEY)\n\nEXAMPLES\n  kourou file:encrypt books/cryptonomicon.txt --vault-key \u003cvault-key\u003e\n  kourou file:encrypt books/cryptonomicon.txt -o books/cryptonomicon.txt.enc --vault-key \u003cvault-key\u003e\n```\n\n_See code: [lib/commands/file/encrypt.js](lib/commands/file/encrypt.js)_\n\n## `kourou file:test FILE`\n\nTests if an encrypted file can be decrypted.\n\n```\nUSAGE\n  $ kourou file:test FILE\n\nARGUMENTS\n  FILE  Encrypted file\n\nOPTIONS\n  --vault-key=vault-key  Kuzzle Vault Key (or KUZZLE_VAULT_KEY)\n\nEXAMPLE\n  kourou file:test books/cryptonomicon.txt.enc --vault-key \u003cvault-key\u003e\n```\n\n_See code: [lib/commands/file/test.js](lib/commands/file/test.js)_\n\n## `kourou help [COMMAND]`\n\ndisplay help for kourou\n\n```\nUSAGE\n  $ kourou help [COMMAND]\n\nARGUMENTS\n  COMMAND  command to show help for\n\nOPTIONS\n  --all  see all commands in CLI\n```\n\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.18/src/commands/help.ts)_\n\n## `kourou import PATH`\n\nRecursively imports dump files from a root directory\n\n```\nUSAGE\n  $ kourou import PATH\n\nARGUMENTS\n  PATH  Root directory containing dumps\n\nOPTIONS\n  --api-key=api-key        Kuzzle user api-key\n  --as=as                  Impersonate a user\n  --batch-size=batch-size  [default: 200] Maximum batch size (see limits.documentsWriteCount config)\n  --help                   show CLI help\n  --host=host              [default: localhost] Kuzzle server host\n  --password=password      Kuzzle user password\n  --port=port              [default: 7512] Kuzzle server port\n  --preserve-anonymous     Preserve anonymous rights\n  --protocol=protocol      [default: ws] Kuzzle protocol (http or websocket)\n  --ssl                    Use SSL to connect to Kuzzle\n  --username=username      [default: anonymous] Kuzzle username (local strategy)\n```\n\n_See code: [lib/commands/import.js](lib/commands/import.js)_\n\n## `kourou index:export INDEX`\n\nExports an index (JSONL or Kuzzle format)\n\n```\nUSAGE\n  $ kourou index:export INDEX\n\nARGUMENTS\n  INDEX  Index name\n\nOPTIONS\n  --api-key=api-key        Kuzzle user api-key\n  --as=as                  Impersonate a user\n  --batch-size=batch-size  [default: 2000] Maximum batch size (see limits.documentsFetchCount config)\n\n  --format=format          [default: jsonl] \"jsonl or kuzzle - kuzzle will export in Kuzzle format usable for internal\n                           fixtures and jsonl allows to import that data back with kourou\n\n  --help                   show CLI help\n\n  --host=host              [default: localhost] Kuzzle server host\n\n  --password=password      Kuzzle user password\n\n  --path=path              Dump root directory\n\n  --port=port              [default: 7512] Kuzzle server port\n\n  --protocol=protocol      [default: ws] Kuzzle protocol (http or websocket)\n\n  --query=query            [default: {}] Only dump documents in collections matching the query (JS or JSON format)\n\n  --scrollTTL=scrollTTL    [default: 20s] The scroll TTL option to pass to the dump operation (which performs a\n                           document.search under the hood),\n                           expressed in ms format, e.g. '2s', '1m', '3h'.\n\n  --ssl                    Use SSL to connect to Kuzzle\n\n  --type=type              [default: all] Type of the export: all, mappings, data\n\n  --username=username      [default: anonymous] Kuzzle username (local strategy)\n\nEXAMPLES\n  kourou index:export nyc-open-data\n  kourou index:export nyc-open-data --query '{\"range\":{\"_kuzzle_info.createdAt\":{\"gt\":1632935638866}}}'\n```\n\n_See code: [lib/commands/index/export.js](lib/commands/index/export.js)_\n\n## `kourou index:import PATH`\n\nImports an index (JSONL format)\n\n```\nUSAGE\n  $ kourou index:import PATH\n\nARGUMENTS\n  PATH  Dump directory or file\n\nOPTIONS\n  --api-key=api-key        Kuzzle user api-key\n  --as=as                  Impersonate a user\n  --batch-size=batch-size  [default: 200] Maximum batch size (see limits.documentsWriteCount config)\n  --help                   show CLI help\n  --host=host              [default: localhost] Kuzzle server host\n  --index=index            If set, override the index destination name\n  --no-mappings            Skip collections mappings\n  --password=password      Kuzzle user password\n  --port=port              [default: 7512] Kuzzle server port\n  --protocol=protocol      [default: ws] Kuzzle protocol (http or websocket)\n  --ssl                    Use SSL to connect to Kuzzle\n  --username=username      [default: anonymous] Kuzzle username (local strategy)\n\nEXAMPLES\n  kourou index:import ./dump/iot-data\n  kourou index:import ./dump/iot-data --index iot-data-production --no-mappings\n```\n\n_See code: [lib/commands/index/import.js](lib/commands/index/import.js)_\n\n## `kourou instance:kill`\n\nStop and remove all the containers of a running kuzzle instance\n\n```\nUSAGE\n  $ kourou instance:kill\n\nOPTIONS\n  -a, --all                Kill all instances\n  -i, --instance=instance  Kuzzle instance name [ex: stack-0]\n```\n\n_See code: [lib/commands/instance/kill.js](lib/commands/instance/kill.js)_\n\n## `kourou instance:list`\n\nLists the Kuzzle running instances\n\n```\nUSAGE\n  $ kourou instance:list\n```\n\n_See code: [lib/commands/instance/list.js](lib/commands/instance/list.js)_\n\n## `kourou instance:logs`\n\nDisplays the logs of a running Kuzzle\n\n```\nUSAGE\n  $ kourou instance:logs\n\nOPTIONS\n  -f, --follow             Follow log output\n  -i, --instance=instance  Kuzzle instance name\n```\n\n_See code: [lib/commands/instance/logs.js](lib/commands/instance/logs.js)_\n\n## `kourou instance:spawn`\n\nSpawn a new Kuzzle instance\n\n```\nUSAGE\n  $ kourou instance:spawn\n\nOPTIONS\n  -v, --version=version  [default: 2] Core-version of the instance to spawn\n  --check                Check prerequisite before running Kuzzle\n  --help                 show CLI help\n```\n\n_See code: [lib/commands/instance/spawn.js](lib/commands/instance/spawn.js)_\n\n## `kourou paas:login`\n\nLogin for a PaaS project\n\n```\nUSAGE\n  $ kourou paas:login\n\nOPTIONS\n  --help               show CLI help\n  --only_npm           Only perform the login on the private NPM registry\n  --project=project    Current PaaS project\n  --username=username  PaaS username\n```\n\n_See code: [lib/commands/paas/login.js](lib/commands/paas/login.js)_\n\n## `kourou profile:export`\n\nExports profiles\n\n```\nUSAGE\n  $ kourou profile:export\n\nOPTIONS\n  --api-key=api-key    Kuzzle user api-key\n  --as=as              Impersonate a user\n  --help               show CLI help\n  --host=host          [default: localhost] Kuzzle server host\n  --password=password  Kuzzle user password\n  --path=path          [default: profiles] Dump directory\n  --port=port          [default: 7512] Kuzzle server port\n  --protocol=protocol  [default: ws] Kuzzle protocol (http or websocket)\n  --ssl                Use SSL to connect to Kuzzle\n  --username=username  [default: anonymous] Kuzzle username (local strategy)\n```\n\n_See code: [lib/commands/profile/export.js](lib/commands/profile/export.js)_\n\n## `kourou profile:import PATH`\n\nImports profiles\n\n```\nUSAGE\n  $ kourou profile:import PATH\n\nARGUMENTS\n  PATH  Dump file\n\nOPTIONS\n  --api-key=api-key    Kuzzle user api-key\n  --as=as              Impersonate a user\n  --help               show CLI help\n  --host=host          [default: localhost] Kuzzle server host\n  --password=password  Kuzzle user password\n  --port=port          [default: 7512] Kuzzle server port\n  --protocol=protocol  [default: ws] Kuzzle protocol (http or websocket)\n  --ssl                Use SSL to connect to Kuzzle\n  --username=username  [default: anonymous] Kuzzle username (local strategy)\n```\n\n_See code: [lib/commands/profile/import.js](lib/commands/profile/import.js)_\n\n## `kourou realtime:subscribe INDEX COLLECTION [FILTERS]`\n\nSubscribes to realtime notifications\n\n```\nUSAGE\n  $ kourou realtime:subscribe INDEX COLLECTION [FILTERS]\n\nARGUMENTS\n  INDEX       Index name\n  COLLECTION  Collection name\n  FILTERS     Set of Koncorde filters\n\nOPTIONS\n  --api-key=api-key    Kuzzle user api-key\n  --as=as              Impersonate a user\n\n  --display=display    [default: result] Path of the property to display from the notification (empty string to display\n                       everything)\n\n  --editor             Open an editor (EDITOR env variable) to edit the filters before subscribing.\n\n  --help               show CLI help\n\n  --host=host          [default: localhost] Kuzzle server host\n\n  --password=password  Kuzzle user password\n\n  --port=port          [default: 7512] Kuzzle server port\n\n  --protocol=protocol  [default: websocket] Kuzzle protocol (only websocket for realtime)\n\n  --scope=scope        [default: all] Subscribe to document entering or leaving the scope (all, in, out, none)\n\n  --ssl                Use SSL to connect to Kuzzle\n\n  --username=username  [default: anonymous] Kuzzle username (local strategy)\n\n  --users=users        [default: all] Subscribe to users entering or leaving the room (all, in, out, none)\n\n  --volatile=volatile  [default: {}] Additional subscription information used in user join/leave notifications\n\nEXAMPLES\n  kourou realtime:subscribe iot-data sensors\n  kourou realtime:subscribe iot-data sensors '{ range: { temperature: { gt: 0 } } }'\n  kourou realtime:subscribe iot-data sensors '{ exists: \"position\" }' --scope out\n  kourou realtime:subscribe iot-data sensors --users all --volatile '{ clientId: \"citizen-kane\" }'\n  kourou realtime:subscribe iot-data sensors --display result._source.temperature\n```\n\n_See code: [lib/commands/realtime/subscribe.js](lib/commands/realtime/subscribe.js)_\n\n## `kourou redis:list-keys [MATCH]`\n\nLists keys stored in Redis\n\n```\nUSAGE\n  $ kourou redis:list-keys [MATCH]\n\nARGUMENTS\n  MATCH  [default: *] Match Redis keys with a pattern\n\nOPTIONS\n  --api-key=api-key    Kuzzle user api-key\n  --as=as              Impersonate a user\n  --help               show CLI help\n  --host=host          [default: localhost] Kuzzle server host\n  --max=max            [default: -1] Maximum number of page to retrieve (-1 to retrieve everything)\n  --password=password  Kuzzle user password\n  --port=port          [default: 7512] Kuzzle server port\n  --protocol=protocol  [default: ws] Kuzzle protocol (http or ws)\n  --remove             Remove matching keys\n  --size=size          [default: 100] Page size\n  --ssl                Use SSL to connect to Kuzzle\n  --username=username  [default: anonymous] Kuzzle username (local strategy)\n\nEXAMPLES\n  kourou redis:list-keys \"*cluster*\"\n  kourou redis:list-keys \"counters/*\" --remove\n```\n\n_See code: [lib/commands/redis/list-keys.js](lib/commands/redis/list-keys.js)_\n\n## `kourou role:export`\n\nExports roles\n\n```\nUSAGE\n  $ kourou role:export\n\nOPTIONS\n  --api-key=api-key    Kuzzle user api-key\n  --as=as              Impersonate a user\n  --help               show CLI help\n  --host=host          [default: localhost] Kuzzle server host\n  --password=password  Kuzzle user password\n  --path=path          [default: roles] Dump directory\n  --port=port          [default: 7512] Kuzzle server port\n  --protocol=protocol  [default: ws] Kuzzle protocol (http or websocket)\n  --ssl                Use SSL to connect to Kuzzle\n  --username=username  [default: anonymous] Kuzzle username (local strategy)\n```\n\n_See code: [lib/commands/role/export.js](lib/commands/role/export.js)_\n\n## `kourou role:import PATH`\n\nImport roles\n\n```\nUSAGE\n  $ kourou role:import PATH\n\nARGUMENTS\n  PATH  Dump file\n\nOPTIONS\n  --api-key=api-key     Kuzzle user api-key\n  --as=as               Impersonate a user\n  --help                show CLI help\n  --host=host           [default: localhost] Kuzzle server host\n  --password=password   Kuzzle user password\n  --port=port           [default: 7512] Kuzzle server port\n  --preserve-anonymous  Preserve anonymous rights\n  --protocol=protocol   [default: ws] Kuzzle protocol (http or websocket)\n  --ssl                 Use SSL to connect to Kuzzle\n  --username=username   [default: anonymous] Kuzzle username (local strategy)\n```\n\n_See code: [lib/commands/role/import.js](lib/commands/role/import.js)_\n\n## `kourou sdk:execute [CODE]`\n\nExecutes arbitrary code.\n\n```\nUSAGE\n  $ kourou sdk:execute [CODE]\n\nARGUMENTS\n  CODE  Code to execute. Will be read from STDIN if available.\n\nOPTIONS\n  -v, --var=var        Additional arguments injected into the code. (eg: --var 'index=\"iot-data\"'\n  --api-key=api-key    Kuzzle user api-key\n  --as=as              Impersonate a user\n  --editor             Open an editor (EDITOR env variable) to edit the code before executing it.\n  --help               show CLI help\n  --host=host          [default: localhost] Kuzzle server host\n  --keep-alive         Keep the connection running (websocket only)\n  --password=password  Kuzzle user password\n  --port=port          [default: 7512] Kuzzle server port\n  --print-raw          Print only the script result to stdout\n  --protocol=protocol  [default: ws] Kuzzle protocol (http or ws)\n  --ssl                Use SSL to connect to Kuzzle\n  --username=username  [default: anonymous] Kuzzle username (local strategy)\n\nDESCRIPTION\n  Executes arbitrary code.\n\n  Code Execution\n\n    Provided code will be executed in an async method.\n    You can access a connected and authenticated SDK with the \"sdk\" variable.\n    Templated variable passed as the command arguments are also accessible within the same name.\n    Returned value will be printed on the standard output (e.g. 'return await sdk.server.now();').\n    Errors will be caught and printed on the error output (e.g. 'throw new Error(\"failure\");').\n\n  Provide code\n\n    code can be passed as an argument\n    code will be read from STDIN if available\n\n    Examples:\n      - kourou sdk:execute 'return await sdk.server.now()'\n      - kourou sdk:execute 'return await sdk.index.exists(index)' --var 'index=\"iot-data\"'\n      - kourou sdk:execute \u003c snippet.js\n      - echo 'return await sdk.server.now()' | kourou sdk:execute\n\n  Other\n\n    use the --editor flag to modify the code before executing it\n\n    Examples:\n      - kourou sdk:execute 'return await sdk.server.now()' --editor\n```\n\n_See code: [lib/commands/sdk/execute.js](lib/commands/sdk/execute.js)_\n\n## `kourou sdk:query CONTROLLER:ACTION`\n\nExecutes an API query.\n\n```\nUSAGE\n  $ kourou sdk:query CONTROLLER:ACTION\n\nARGUMENTS\n  CONTROLLER:ACTION  Controller and action (eg: \"server:now\")\n\nOPTIONS\n  -a, --arg=arg                Additional argument. Repeatable. (e.g. \"-a refresh=wait_for\")\n  -c, --collection=collection  Collection argument\n  -i, --index=index            Index argument\n  --api-key=api-key            Kuzzle user api-key\n  --as=as                      Impersonate a user\n  --body=body                  [default: {}] Request body in JS or JSON format. Will be read from STDIN if available.\n  --body-editor                Open an editor (EDITOR env variable) to edit the body before sending.\n\n  --display=display            [default: result] Path of the property to display from the response (empty string to\n                               display the result)\n\n  --editor                     Open an editor (EDITOR env variable) to edit the request before sending.\n\n  --help                       show CLI help\n\n  --host=host                  [default: localhost] Kuzzle server host\n\n  --id=id                      ID argument (_id)\n\n  --password=password          Kuzzle user password\n\n  --port=port                  [default: 7512] Kuzzle server port\n\n  --print-raw                  Print only the query result to stdout\n\n  --protocol=protocol          [default: ws] Kuzzle protocol (http or ws)\n\n  --ssl                        Use SSL to connect to Kuzzle\n\n  --username=username          [default: anonymous] Kuzzle username (local strategy)\n\nDESCRIPTION\n  Executes an API query.\n\n  Query arguments\n\n    Arguments can be passed and repeated using the --arg or -a flag.\n    Index and collection names can be passed with --index (-i) and --collection (-c) flags\n    ID can be passed with the --id flag.\n\n    Examples:\n      - kourou sdk:query document:delete -i iot -c sensors -a refresh=wait_for\n\n  Query body\n\n    Body can be passed with the --body flag with either a JSON or JS string.\n    Body will be read from STDIN if available\n\n    Examples:\n      - kourou sdk:query document:create -i iot -c sensors --body '{creation: Date.now())}'\n      - kourou sdk:query admin:loadMappings \u003c mappings.json\n      - echo '{dynamic: \"strict\"}' | kourou sdk:query collection:create -i iot -c sensors\n\n  Other\n\n    Use the --editor flag to modify the query before sending it to Kuzzle\n    Use the --display flag to display a specific property of the response\n\n    Examples:\n      - kourou sdk:query document:create -i iot -c sensors --editor\n      - kourou sdk:query server:now --display 'result.now'\n\n  Default fallback to API action\n\n    It's possible to use the \"sdk:query\" command by only specifying the corresponding controller\n    and action as first argument.\n\n    Kourou will try to infer the first arguments to one the following pattern:\n      - \u003ccommand\u003e \u003cindex\u003e\n      - \u003ccommand\u003e \u003cbody\u003e\n      - \u003ccommand\u003e \u003cindex\u003e \u003ccollection\u003e\n      - \u003ccommand\u003e \u003cindex\u003e \u003ccollection\u003e \u003cid\u003e\n      - \u003ccommand\u003e \u003cindex\u003e \u003ccollection\u003e \u003cbody\u003e\n      - \u003ccommand\u003e \u003cindex\u003e \u003ccollection\u003e \u003cid\u003e \u003cbody\u003e\n\n    If a flag is given (-i, -c, --body or --id), then the flag value has priority over\n    argument infering.\n\n    Examples:\n      - kourou collection:list iot\n      - kourou security:createUser '{ \"content\": { \"profileIds\": [\"default\"] } }' --id yagmur\n      - kourou collection:delete iot sensors\n      - kourou document:createOrReplace iot sensors sigfox-1 '{}'\n      - kourou bulk:import iot sensors '{ bulkData: [...] }'\n      - kourou admin:loadMappings \u003c mappings.json\n```\n\n_See code: [lib/commands/sdk/query.js](lib/commands/sdk/query.js)_\n\n## `kourou user:export`\n\nExports users to JSON.\n\n```\nUSAGE\n  $ kourou user:export\n\nOPTIONS\n  --api-key=api-key                        Kuzzle user api-key\n  --as=as                                  Impersonate a user\n  --batch-size=batch-size                  [default: 2000] Maximum batch size (see limits.documentsFetchCount config)\n  --exclude=exclude                        Exclude users by matching their IDs with a regexp\n  --generate-credentials                   Generate credentials with a random password for users\n  --generated-username=generated-username  [default: _id] User content property used as a username for local credentials\n  --help                                   show CLI help\n  --host=host                              [default: localhost] Kuzzle server host\n  --password=password                      Kuzzle user password\n  --path=path                              [default: users] Dump directory\n  --port=port                              [default: 7512] Kuzzle server port\n  --protocol=protocol                      [default: ws] Kuzzle protocol (http or websocket)\n  --ssl                                    Use SSL to connect to Kuzzle\n  --username=username                      [default: anonymous] Kuzzle username (local strategy)\n\nDESCRIPTION\n  Exports users to JSON.\n\n  The users will be exported WITHOUT their credentials since Kuzzzle can't access them.\n\n  You can either:\n    - Manually re-create credentials for your users\n    - Use the \"mustChangePasswordIfSetByAdmin\" option Kuzzle password policies (see \n  https://github.com/kuzzleio/kuzzle-plugin-auth-passport-local/#optional-properties)\n    - Use the \"--generate-credentials\" flag to auto-generate credentials for your users\n\n  Auto-generation of credentials\n\n    With the \"--generate-credentials\" flag, Kourou will add credentials for the \"local\" strategy.\n    By default, the username will be the user ID.\n    Use the \"generated-username\" flag to use an other property than the user ID for the generated username\n    The password will be a strong random 40 characters string\n\n  Examples:\n\n    - kourou user:export\n    - kourou user:export --exclude '.*admin.*' --exclude 'supervisor.*'\n    - kourou user:export --generate-credentials\n    - kourou user:export --generate-credentials --generated-username content.email\n```\n\n_See code: [lib/commands/user/export.js](lib/commands/user/export.js)_\n\n## `kourou user:export-mappings`\n\nExports users collection mappings to JSON.\n\n```\nUSAGE\n  $ kourou user:export-mappings\n\nOPTIONS\n  --api-key=api-key    Kuzzle user api-key\n  --as=as              Impersonate a user\n  --help               show CLI help\n  --host=host          [default: localhost] Kuzzle server host\n  --password=password  Kuzzle user password\n  --path=path          [default: users] Dump directory\n  --port=port          [default: 7512] Kuzzle server port\n  --protocol=protocol  [default: ws] Kuzzle protocol (http or websocket)\n  --ssl                Use SSL to connect to Kuzzle\n  --username=username  [default: anonymous] Kuzzle username (local strategy)\n```\n\n_See code: [lib/commands/user/export-mappings.js](lib/commands/user/export-mappings.js)_\n\n## `kourou user:import PATH`\n\nImports users\n\n```\nUSAGE\n  $ kourou user:import PATH\n\nARGUMENTS\n  PATH  Dump file\n\nOPTIONS\n  --api-key=api-key    Kuzzle user api-key\n  --as=as              Impersonate a user\n  --help               show CLI help\n  --host=host          [default: localhost] Kuzzle server host\n  --password=password  Kuzzle user password\n  --port=port          [default: 7512] Kuzzle server port\n  --protocol=protocol  [default: ws] Kuzzle protocol (http or websocket)\n  --ssl                Use SSL to connect to Kuzzle\n  --username=username  [default: anonymous] Kuzzle username (local strategy)\n```\n\n_See code: [lib/commands/user/import.js](lib/commands/user/import.js)_\n\n## `kourou user:import-mappings PATH`\n\nImports users collection mappings\n\n```\nUSAGE\n  $ kourou user:import-mappings PATH\n\nARGUMENTS\n  PATH  Dump file\n\nOPTIONS\n  --api-key=api-key    Kuzzle user api-key\n  --as=as              Impersonate a user\n  --help               show CLI help\n  --host=host          [default: localhost] Kuzzle server host\n  --password=password  Kuzzle user password\n  --port=port          [default: 7512] Kuzzle server port\n  --protocol=protocol  [default: ws] Kuzzle protocol (http or websocket)\n  --ssl                Use SSL to connect to Kuzzle\n  --username=username  [default: anonymous] Kuzzle username (local strategy)\n```\n\n_See code: [lib/commands/user/import-mappings.js](lib/commands/user/import-mappings.js)_\n\n## `kourou vault:add SECRETS-FILE KEY VALUE`\n\nAdds an encrypted key to an encrypted secrets file.\n\n```\nUSAGE\n  $ kourou vault:add SECRETS-FILE KEY VALUE\n\nARGUMENTS\n  SECRETS-FILE  Encrypted secrets file\n  KEY           Path to the key (lodash style)\n  VALUE         Value to encrypt\n\nOPTIONS\n  --vault-key=vault-key  Kuzzle Vault Key (or KUZZLE_VAULT_KEY)\n\nDESCRIPTION\n  Adds an encrypted key to an encrypted secrets file.\n\n  A new secrets file is created if it does not yet exist.\n\n  Encrypted secrets are meant to be loaded inside an application with Kuzzle Vault.\n\n  See https://github.com/kuzzleio/kuzzle-vault/ for more information.\n\nEXAMPLE\n  kourou vault:add config/secrets.enc.json aws.s3.keyId b61e267676660c314b006b06 --vault-key \u003cvault-key\u003e\n```\n\n_See code: [lib/commands/vault/add.js](lib/commands/vault/add.js)_\n\n## `kourou vault:decrypt FILE`\n\nDecrypts an entire secrets file.\n\n```\nUSAGE\n  $ kourou vault:decrypt FILE\n\nARGUMENTS\n  FILE  File containing encrypted secrets\n\nOPTIONS\n  -f, --force                    Overwrite the output file if it already exists\n  -o, --output-file=output-file  Output file (default: remove \".enc\")\n  --vault-key=vault-key          Kuzzle Vault Key (or KUZZLE_VAULT_KEY)\n\nDESCRIPTION\n  Decrypts an entire secrets file.\n\n  Decrypted secrets file must NEVER be committed into the repository.\n\n  See https://github.com/kuzzleio/kuzzle-vault/ for more information.\n\nEXAMPLES\n  kourou vault:decrypt config/secrets.enc.json --vault-key \u003cvault-key\u003e\n  kourou vault:decrypt config/secrets.enc.json -o config/secrets.json --vault-key \u003cvault-key\u003e\n```\n\n_See code: [lib/commands/vault/decrypt.js](lib/commands/vault/decrypt.js)_\n\n## `kourou vault:encrypt FILE`\n\nEncrypts an entire secrets file.\n\n```\nUSAGE\n  $ kourou vault:encrypt FILE\n\nARGUMENTS\n  FILE  File containing unencrypted secrets\n\nOPTIONS\n  -f, --force                    Overwrite the output file if it already exists\n  -o, --output-file=output-file  Output file (default: \u003cfile\u003e.enc.json)\n  --vault-key=vault-key          Kuzzle Vault Key (or KUZZLE_VAULT_KEY)\n\nDESCRIPTION\n  Encrypts an entire secrets file.\n\n  The secrets file must be in JSON format and it must contain only strings or objects.\n\n  Example:\n  {\n    aws: {\n      s3: {\n        keyId: 'b61e267676660c314b006b06'\n      }\n    }\n  }\n\n  Encrypted secrets are meant to be loaded inside an application with Kuzzle Vault.\n\n  See https://github.com/kuzzleio/kuzzle-vault/ for more information.\n\nEXAMPLES\n  kourou vault:encrypt config/secrets.json --vault-key \u003cvault-key\u003e\n  kourou vault:encrypt config/secrets.json -o config/secrets_prod.enc.json --vault-key \u003cvault-key\u003e\n```\n\n_See code: [lib/commands/vault/encrypt.js](lib/commands/vault/encrypt.js)_\n\n## `kourou vault:show SECRETS-FILE [KEY]`\n\nPrints an encrypted secrets file content.\n\n```\nUSAGE\n  $ kourou vault:show SECRETS-FILE [KEY]\n\nARGUMENTS\n  SECRETS-FILE  Encrypted secrets file\n  KEY           Path to a key (lodash style)\n\nOPTIONS\n  --vault-key=vault-key  Kuzzle Vault Key (or KUZZLE_VAULT_KEY)\n\nDESCRIPTION\n  Prints an encrypted secrets file content.\n\n  This method can display either:\n   - the entire content of the secrets file\n   - a single key value\n\n  See https://github.com/kuzzleio/kuzzle-vault/ for more information.\n\nEXAMPLES\n  kourou vault:show config/secrets.enc.json --vault-key \u003cvault-key\u003e\n  kourou vault:show config/secrets.enc.json aws.s3.secretKey --vault-key \u003cvault-key\u003e\n```\n\n_See code: [lib/commands/vault/show.js](lib/commands/vault/show.js)_\n\n## `kourou vault:test SECRETS-FILE`\n\nTests if an encrypted secrets file can be decrypted.\n\n```\nUSAGE\n  $ kourou vault:test SECRETS-FILE\n\nARGUMENTS\n  SECRETS-FILE  Encrypted secrets file\n\nOPTIONS\n  --vault-key=vault-key  Kuzzle Vault Key (or KUZZLE_VAULT_KEY)\n\nDESCRIPTION\n  Tests if an encrypted secrets file can be decrypted.\n\n  See https://github.com/kuzzleio/kuzzle-vault/ for more information.\n\nEXAMPLE\n  kourou vault:test config/secrets.enc.json --vault-key \u003cvault-key\u003e\n```\n\n_See code: [lib/commands/vault/test.js](lib/commands/vault/test.js)_\n\u003c!-- commandsstop --\u003e\n\n# Where does this weird name come from?\n\nWe liked the idea that this CLI is like a launchpad for the Kuzzle rocket. The place where you launch and pilot your Kuzzle instance. The place where the European Space Agency launches their rockets is in the country near the city of [Kourou](https://www.wikiwand.com/en/Kourou), in French Guiana, so we liked the idea that the Kuzzle rockets would take off from there.\n\n# Have fun with a quine\n\n[Quine](https://en.wikipedia.org/wiki/Quine_(computing)) are programs able to print their own source code.\n\n```bash\n$ kourou sdk:execute --print-raw '(\n  function quine() {\n    const quote = String.fromCharCode(39);\n    const lparen = String.fromCharCode(40);\n    const rparen = String.fromCharCode(41);\n\n    console.log(\"kourou sdk:execute --print-raw \" + quote + lparen + quine.toString() + rparen + lparen + rparen + \";\" + quote)\n  }\n)()'\n```\n\n(Kuzzle must be accessible and running in local)\n\n# Telemetry\n\nWe use a custom Open Source analytics backend (you can check the code [here](https://github.com/kuzzleio/kepler)) to record the use of Kourou by users.\n\nCollected metrics will allow us to study the use of our products in order to improve them. We do not collect any personal data about users.\n\nYou can disable usage metrics collection by setting the `KOUROU_USAGE` environment variable to `false`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuzzleio%2Fkourou","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkuzzleio%2Fkourou","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuzzleio%2Fkourou/lists"}