SkillAgentSearch skills...

Kourou

The CLI that helps you manage your Kuzzle application

Install / Use

/learn @kuzzleio/Kourou
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

kourou

The CLI that helps you manage your Kuzzle instances.

oclif Version Downloads/week License

<!-- toc --> <!-- tocstop -->

:warning: This project is currently in beta and breaking changes may occur until the 1.0.0

Usage

<!-- usage -->
$ npm install -g kourou
$ kourou COMMAND
running command...
$ kourou (-v|--version|version)
kourou/1.2.0 linux-x64 node-v22.16.0
$ kourou --help [COMMAND]
USAGE
  $ kourou COMMAND
...
<!-- usagestop -->

Connect and authenticate to Kuzzle API

Commands that needs to send requests to Kuzzle API can specify the Kuzzle server address and authentication informations.

By command line:


  --host=host                    [default: localhost] Kuzzle server host
  --port=port                    [default: 7512] Kuzzle server port
  --username=username            [default: anonymous] Kuzzle user
  --password=password            Kuzzle user password
  --api-key=api-key              Kuzzle user api-key
  --ssl                          [default: true for port 443] Use SSL to connect to Kuzzle
  --protocol                     [default: ws] Protocol used to connect to Kuzzle ( `http` or `ws` )

By environment variables:


  KUZZLE_HOST                [default: localhost] Kuzzle server host
  KUZZLE_PORT                [default: 7512] Kuzzle server port
  KUZZLE_USERNAME            [default: anonymous] Kuzzle user
  KUZZLE_PASSWORD            Kuzzle user password
  KUZZLE_API_KEY             Kuzzle user api-key
  KUZZLE_SSL                 Use SSL to connect to Kuzzle
  KUZZLE_PROTOCOL            Protocol used to connect to Kuzzle ( `http` or `ws` )

User impersonation

You can impersonate a user before executing a command with the --as flag and a user kuid .

User impersonation require the following rights for the authenticated user: security:createApiKey , security:deleteApiKey

$ kourou sdk:query auth:getCurrentUser --as gordon --username admin --password admin

 🚀 Kourou - Executes an API query.

 [ℹ] Connecting to http://localhost:7512 ...
 [ℹ] Impersonate user "gordon"

[...]

Automatic command infering for API actions

When no command is found, Kourou will try to execute the given command with the sdk:query command.

The first argument has to be the name of the controller and the action separated by a semicolon (eg document:create )

Kourou will try to infer common arguments like index , collection , _id or body .

It will automatically infer and accept the following lists of arguments:

  • <command> <index>
    • _eg: kourou collection:list iot _

.

  • <command> <body>
    • _eg: kourou security:createUser '{"content":{"profileIds":["default"]}}' --id yagmur _

.

  • <command> <index> <collection>
    • _eg: kourou collection:truncate iot sensors _

.

  • <command> <index> <collection> <body>
    • _eg: kourou bulk:import iot sensors '{bulkData: []}' _

.

  • <command> <index> <collection> <id>
    • _eg: kourou document:delete iot sensors sigfox-123 _

.

  • <command> <index> <collection> <id> <body>
    • _eg: kourou document:create iot sensors sigfox-123 '{temperature: 42}' _

All other arguments and options will be passed as-is to the sdk:query method.

Note: you can pass arguments to the API actions with the --arg or -a option in your command, e.g. kourou security:createFirstAdmin '{ ...credentials here... }' -a reset=true

Commands

<!-- commands -->

kourou api-key:check TOKEN

Checks an API key validity

USAGE
  $ kourou api-key:check TOKEN

ARGUMENTS
  TOKEN  API key token

OPTIONS
  --api-key=api-key    Kuzzle user api-key
  --as=as              Impersonate a user
  --help               show CLI help
  --host=host          [default: localhost] Kuzzle server host
  --password=password  Kuzzle user password
  --port=port          [default: 7512] Kuzzle server port
  --protocol=protocol  [default: ws] Kuzzle protocol (http or ws)
  --ssl                Use SSL to connect to Kuzzle
  --username=username  [default: anonymous] Kuzzle username (local strategy)

EXAMPLE
  kourou api-key:check eyJhbG...QxfQrc

See code: lib/commands/api-key/check.js

kourou api-key:create USER

Creates a new API Key for a user

USAGE
  $ kourou api-key:create USER

ARGUMENTS
  USER  User kuid

OPTIONS
  -d, --description=description  (required) API Key description
  --api-key=api-key              Kuzzle user api-key
  --as=as                        Impersonate a user
  --expire=expire                [default: -1] API Key validity
  --help                         show CLI help
  --host=host                    [default: localhost] Kuzzle server host
  --id=id                        API Key unique ID
  --password=password            Kuzzle user password
  --port=port                    [default: 7512] Kuzzle server port
  --protocol=protocol            [default: ws] Kuzzle protocol (http or ws)
  --ssl                          Use SSL to connect to Kuzzle
  --username=username            [default: anonymous] Kuzzle username (local strategy)

See code: lib/commands/api-key/create.js

kourou api-key:delete USER ID

Deletes an API key.

USAGE
  $ kourou api-key:delete USER ID

ARGUMENTS
  USER  User kuid
  ID    API Key unique ID

OPTIONS
  --api-key=api-key    Kuzzle user api-key
  --as=as              Impersonate a user
  --help               show CLI help
  --host=host          [default: localhost] Kuzzle server host
  --password=password  Kuzzle user password
  --port=port          [default: 7512] Kuzzle server port
  --protocol=protocol  [default: ws] Kuzzle protocol (http or ws)
  --ssl                Use SSL to connect to Kuzzle
  --username=username  [default: anonymous] Kuzzle username (local strategy)

EXAMPLE
  kourou vault:delete sigfox-gateway 1k-BF3EBjsXdvA2PR8x

_See code: [lib/commands/api-key/delete.js](lib/commands/api-key/delet

View on GitHub
GitHub Stars32
CategoryDevelopment
Updated2mo ago
Forks4

Languages

TypeScript

Security Score

95/100

Audited on Jan 13, 2026

No findings