Skip to main content

Usage

Manage and interact with the SERMAS Toolkit API

sermas-cli [options] [command]

Options:

  • -V, --version output the version number
  • -l, --log-level <level> Set log level (choices: "error", "warn", "info", "http", "verbose", "debug", "silly", default: "info", env: LOG_LEVEL)
  • -j, --json Return as JSON output. This option will disable interactive prompts. (env: OUTPUT_JSON)
  • -y, --yaml Return as YAML output. This option will disable interactive prompts. (env: OUTPUT_YAML)
  • -o, --output [format] Return as parsable output. This option will disable interactive prompts. (choices: "json", "yaml", preset: "json", env: OUTPUT)

Commands:

  • session handle sessions
  • platform manage platform
  • dialogue interact with dialogue models
  • auth handle users and authentication
  • app manage applications
  • docs-gen generate markdown documentation
  • completion generate bash completion

Manage applications

sermas-cli app [options] [command]

Commands:

  • update <path> Update an new application
  • sub <topic...> Subscribe to a topic
  • select [appId] Select an application
  • save [options] [name] Create a new application
  • remove [options] [appId] Delete an application
  • init [options] <path> Create a new application structure
  • chat [options] [appId] [sessionId] Chat with an agent
  • token manage applications token
  • admin administer applications

Administer applications

sermas-cli app admin [options] [command]

Commands:

  • remove <appId...> Delete applications
  • import [options] <dirpath> import applications
  • export [options] [filepath] export applications

Export applications

sermas-cli app admin export [options] [filepath]

Arguments:

  • filepath File where to save the export. Leave empty to print to stdout

Options:

  • -n, --filter-name [filterName] Filter applications with name matching the provided filter
  • -id, --filter-id [filterName] Filter applications with id matching the provided filter

Import applications

sermas-cli app admin import [options] <dirpath>

Arguments:

  • dirpath The repository containing applications structures to import

Options:

  • -s, --skip-clients Skip the update of the authorization clients and only update the application. Defaults to false
  • -u, --skip-upload Skip upload of the repository files. Default to false
  • -f, --filter [filterName] Import only applications with a directory name matching the provided filter. Provide a list separated by comma.
  • -iw, --import-websites Import RAG scraping the website list in the app configuration

Delete applications

sermas-cli app admin remove [options] <appId...>

Arguments:

  • appId Applications ID

Chat with an agent

sermas-cli app chat [options] [appId] [sessionId]

Arguments:

  • appId Reference to an application or the selected one will be used
  • sessionId A session ID to reuse or a new one is created

Options:

  • -l, --language [language] Language used in the format en-US (choices: "es-ES", "pt-PT", "it-IT", "de-DE", "en-GB", "fr-FR", default: "en-GB")
  • -g, --gender [gender] Gender of the avatar (used by TTS) (choices: "F", "M", "X", default: "F")
  • -m, --llm [llm] LLM model to use (default: "chatgpt")

Create a new application structure

sermas-cli app init [options] <path>

Arguments:

  • path Destination path

Options:

  • -f, --force Force creation, overwriting the directory if it exists

Delete an application

sermas-cli app remove [options] [appId]

Arguments:

  • appId Application ID

Options:

  • --public Save credentials locally

Create a new application

sermas-cli app save [options] [name]

Arguments:

  • name Application name

Options:

  • --public Expose as a public application

Select an application

sermas-cli app select [options] [appId]

Arguments:

  • appId Application ID

Subscribe to a topic

sermas-cli app sub [options] <topic...>

Arguments:

  • topic The topic(s) to subscribe in the form 'app/<appId>/resource/scope[/more]'. Specify more topics separated by space. Wildcard are supported.

Manage applications token

sermas-cli app token [options] [command]

Commands:

  • get retrieve an app token

Retrieve an app token

sermas-cli app token get [options]

Update an new application

sermas-cli app update [options] <path>

Arguments:

  • path a JSON with one or more application definition

Handle users and authentication

sermas-cli auth [options] [command]

Commands:

  • whoami [options] Show the user JWT information
  • token retrieve a user token
  • login [options] [username] [password] Login and obtain user credentials
  • admin manage users

Manage users

sermas-cli auth admin [options] [command]

Commands:

  • import <file> import users

Import users

sermas-cli auth admin import [options] <file>

Arguments:

  • file A file with the list of users to import

Login and obtain user credentials

sermas-cli auth login [options] [username] [password]

Arguments:

  • username Your username
  • password Your password

Options:

  • --saveLocally Save credentials locally

Retrieve a user token

sermas-cli auth token [options]

Show the user JWT information

sermas-cli auth whoami [options]

Options:

  • --token Return the JWT token

Generate bash completion

sermas-cli completion [options]

Interact with dialogue models

sermas-cli dialogue [options] [command]

Commands:

  • models List available models

List available models

sermas-cli dialogue models [options]

Generate markdown documentation

sermas-cli docs-gen [options]

Manage platform

sermas-cli platform [options] [command]

Commands:

  • module manage platform modules

Manage platform modules

sermas-cli platform module [options] [command]

Commands:

  • add [openapiSpec] Add or update a platform module

Add or update a platform module

sermas-cli platform module add [options] [openapiSpec]

Arguments:

  • openapiSpec Module Open API specification URL

Handle sessions

sermas-cli session [options] [command]

Commands:

  • search [options] [appId] Retrieve a chat history by app ID
  • history [appId] [sessionId] Retrieve a chat history by session ID

Retrieve a chat history by session ID

sermas-cli session history [options] [appId] [sessionId]

Arguments:

  • appId The appId reference
  • sessionId The sessionId to retrieve

Retrieve a chat history by app ID

sermas-cli session search [options] [appId]

Arguments:

  • appId The appId reference

Options:

  • -l, --limit [limit] Limit the number of results. Defaults to 10 (default: "10")
  • --from [from] From date
  • --to [to] To date
  • -d, --dump [path] Export session contents as yaml files to path
  • -f, --dump-format [format] history format (raw or simple). Default to simple (default: "simple")
  • -p, --print print history to screen (default: false)
  • Manage and interact with the SERMAS Toolkit API
  • Manage applications
  • Administer applications
  • Export applications
  • Import applications
  • Delete applications
  • Chat with an agent
  • Create a new application structure
  • Delete an application
  • Create a new application
  • Select an application
  • Subscribe to a topic
  • Manage applications token
  • Retrieve an app token
  • Update an new application
  • Handle users and authentication
  • Manage users
  • Import users
  • Login and obtain user credentials
  • Retrieve a user token
  • Show the user JWT information
  • Generate bash completion
  • Interact with dialogue models
  • List available models
  • Generate markdown documentation
  • Manage platform
  • Manage platform modules
  • Add or update a platform module
  • Handle sessions
  • Retrieve a chat history by session ID
  • Retrieve a chat history by app ID