Usage
- SERMAS CLI overview
-
Manage applications
- Administer applications
- Export applications
- Import applications
- Delete applications
- Run chats in batch to validate interactions
- Chat with an agent
- Create a new application structure
- List user applications
- 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
- Generate bash completion
- Interact with dialogue models
- Generate markdown documentation
- Manage platform
- Handle sessions
- Stats for the sermas api
Manage and interact with the SERMAS Toolkit API
sermas-cli [options] [command]
Options:
-V, --versionoutput the version number-l, --log-level <level>Set log level (choices: "error", "warn", "info", "http", "verbose", "debug", "silly", default: "info", env: LOG_LEVEL)-j, --jsonReturn as JSON output. This option will disable interactive prompts. (env: OUTPUT_JSON)-y, --yamlReturn 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:
stats [options]stats for the sermas apisessionhandle sessionsplatformmanage platformdialogueinteract with dialogue modelsauthhandle users and authenticationappmanage applicationsdocs-gengenerate markdown documentationcompletiongenerate bash completion
Manage applications
sermas-cli app [options] [command]
Commands:
update <path>Update an new applicationselect [appId]Select an applicationsub <topic...>Subscribe to a topicsave [options] [name]Create a new applicationremove [options] [appId]Delete an applicationlistList user applicationsinit [options] <path>Create a new application structurechat [options] [appId]Chat with an agentbatch [options] [path]Run chats in batch to validate interactionstokenmanage applications tokenadminadminister applications
Administer applications
sermas-cli app admin [options] [command]
Commands:
remove <appId...>Delete applicationsimport [options] <dirpath>import applicationsexport [options] [filepath]export applications
Export applications
sermas-cli app admin export [options] [filepath]
Arguments:
filepathFile 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:
dirpathThe repository containing applications structures to import
Options:
-s, --skip-clientsSkip the update of the authorization clients and only update the application. Defaults to false-u, --skip-uploadSkip 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-websitesImport RAG scraping the website list in the app configuration
Delete applications
sermas-cli app admin remove [options] <appId...>
Arguments:
appIdApplications ID
Run chats in batch to validate interactions
sermas-cli app batch [options] [path]
Arguments:
pathPath to load chat definitions
Options:
-n, --name <string...>Name of the batch to run (can be repeated)-o, --output <string>Output path where to store results-f, --only-failedStore only failed results-s, --show-chatShow chat messages-p, --parallelize <number>Parallelize tests (default: 1)
Chat with an agent
sermas-cli app chat [options] [appId]
Arguments:
appIdReference to an application or the selected one will be used
Options:
-l, --language [language]Language used in the formaten-US(choices: "es-ES", "pt-PT", "it-IT", "de-DE", "en-GB", "fr-FR", default: "en-GB")-m, --message [message]Message to send to the avatar
Create a new application structure
sermas-cli app init [options] <path>
Arguments:
pathDestination path
Options:
-f, --forceForce creation, overwriting the directory if it exists
List user applications
sermas-cli app list [options]
Delete an application
sermas-cli app remove [options] [appId]
Arguments:
appIdApplication ID
Options:
--publicSave credentials locally
Create a new application
sermas-cli app save [options] [name]
Arguments:
nameApplication name
Options:
--publicExpose as a public application
Select an application
sermas-cli app select [options] [appId]
Arguments:
appIdApplication ID
Subscribe to a topic
sermas-cli app sub [options] <topic...>
Arguments:
topicThe 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:
getretrieve an app token
Retrieve an app token
sermas-cli app token get [options]
Update an new application
sermas-cli app update [options] <path>
Arguments:
patha JSON with one or more application definition
Handle users and authentication
sermas-cli auth [options] [command]
Commands:
whoami [options]Show the user JWT informationtokenretrieve a user tokenlogin [options] [username] [password]Login and obtain user credentialsadminmanage users
Manage users
sermas-cli auth admin [options] [command]
Commands:
import <file>import users
Import users
sermas-cli auth admin import [options] <file>
Arguments:
fileA file with the list of users to import
Login and obtain user credentials
sermas-cli auth login [options] [username] [password]
Arguments:
usernameYour usernamepasswordYour password
Options:
--saveLocallySave credentials locally
Retrieve a user token
sermas-cli auth token [options]
Show the user JWT information
sermas-cli auth whoami [options]
Options:
--tokenReturn the JWT token
Generate bash completion
sermas-cli completion [options]
Interact with dialogue models
sermas-cli dialogue [options] [command]
Commands:
modelsList 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:
modulemanage 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:
openapiSpecModule Open API specification URL
Handle sessions
sermas-cli session [options] [command]
Commands:
search [options] [appId]Retrieve a chat history by app IDhistory [appId] [sessionId]Retrieve a chat history by session ID
Retrieve a chat history by session ID
sermas-cli session history [options] [appId] [sessionId]
Arguments:
appIdThe appId referencesessionIdThe sessionId to retrieve
Retrieve a chat history by app ID
sermas-cli session search [options] [appId]
Arguments:
appIdThe 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-s, --statsExport also stats as yaml, depends on --dump-f, --dump-format [format]history format (raw or simple). Default to simple (default: "simple")-s, --skip-emptyskip empty session, where the user has not interacted. default true (default: true)-p, --printprint history to screen (default: false)
Stats for the sermas api
sermas-cli stats [options] [command]
Options:
--since <iso_datetime|timestamp_in_ms|interval_string>collect stats since this UTC moment. Also accepts XX[d|h|m|s] intervals like '10m', '30s', etc. (default: "60s")--until <iso_datetime|timestamp_in_ms>collect stats until this UTC moment. Defaults to now.--output-file <file_path>Save stats in this CSV file
Commands:
getget stats
Get stats
sermas-cli stats get [options]