Vertesia CLI

The Vertesia CLI provides a set of commands to manage and interact with the Vertesia Platform. This documentation covers all available commands, grouped by their logical functionality, and provides examples on how to use each command.

Installation

To install the CLI, follow these steps:

  1. Ensure Node.js is installed: The Vertesia CLI requires Node.js. You can download and install it from nodejs.org. You can verify Node.js is installed by running:

    node --version
    
  2. Install the Vertesia CLI globally: Open your terminal and run the following command to install the Vertesia CLI globally using npm:

    npm install -g @vertesia/cli
    
  3. Verify the installation: After installation, you can verify that the Vertesia CLI is installed correctly by running:

    vertesia --version
    

This command displays the version of the CLI installed on your system.

Help

To get help with the CLI.

vertesia --help

To get help with any CLI command.

vertesia help [command]

Option to get help with any CLI command.

vertesia <command> --help

Authentication

Commands to manage authentication, such as obtaining JWT tokens and managing API keys.

Commands

  • auth token: Get a JWT token for the API key used in the authentication.

    vertesia auth token
    
  • auth pk <projectId> [options]: Get or create a public API key associated with the account owning the current API key.

    vertesia auth pk <projectId> --name <keyName> --ttl <timeToLive>
    

Profiles

Commands to manage configuration profiles which enable using the CLI with different Vertesia accounts, projects, and infrastructure.

Commands

  • profiles show [name]: Show the configured profiles or the profile with the given name.

    vertesia profiles show [name]
    
  • profiles use [name]: Switch to another configuration profile.

    vertesia profiles use [name]
    
  • profiles add [name] [options]: Create a new configuration profile.

    vertesia profiles add [name] --target <environment>
    
  • profiles edit [name]: Edit an existing configuration profile.

    vertesia profiles edit [name]
    
  • profiles refresh: Refresh token for the current configuration profile.

    vertesia profiles refresh
    
  • profiles delete <name>: Delete an existing configuration profile.

    vertesia profiles delete <name>
    
  • profiles file: Print the configuration file path.

    vertesia profiles file
    

Projects

Command to list projects.

Command

  • projects: List the projects you have access to.

    vertesia projects
    

Environments

Command to list environments.

Command

  • envs [envId]: List the environments you have access to.

    vertesia envs [envId]
    

Interactions

Commands to list interactions, generate test data, run, and search interactions.

Commands

  • interactions: List the interactions available in the current project.

    vertesia interactions
    
  • interactions <interactionId>: List the details of an interaction given its ID.

    vertesia interactions <interactionId>
    
  • datagen <interaction> [options]: Generate test data for an interaction given its ID.

    vertesia datagen <interactionId> --env <envId> --model <model> --temperature <value> --output <file> --count <number>
    
  • run <interactionId> [options]: Run an interaction by ID.

    vertesia run <interactionId> --input <file> --output <file> --data <json> --tags <tags> --temperature <temperature> --model <model> --env <environmentId> --no-stream --count <count> --verbose --jsonl --data-only
    
  • runs <interactionId> [options]: Search the run history by interaction ID.

    vertesia runs <interactionId> --tags <tags> --status <status> --env <environmentId> --model <model> --query <query> --limit <limit> --page <page> --format <format> --output <file> --before <date> --after <date>
    

Content Objects

Commands to manage content objects.

Commands

  • content post <file...> [options]: Post a new object to the store. The path to the file can include wildcards by using *.

    vertesia content post <file...> --name <name> --type <type> --mime <mime> --path <parentPath> --recursive
    
  • content delete <objectId>: Delete an existing object given its ID.

    vertesia content delete <objectId>
    
  • content get <objectId>: Get an existing object given its ID.

    vertesia content get <objectId>
    
  • content list <folderPath> [options]: List the objects inside a folder.

    vertesia content list <folderPath> --limit <limit> --skip <skip>
    

Workflow

Commands to manage workflows and workflow rules.

Commands

  • workflows rules create [options]: Create a new workflow rule.

    vertesia workflows rules create --name <name> --on <event> --run <endpoint>
    
  • workflows rules get <workflowId> [options]: Get a workflow rule given its ID.

    vertesia workflows rules get <workflowId> --file <file>
    
  • workflows rules apply [options]: Apply a workflow rule.

    vertesia workflows rules apply --file <file>
    
  • workflows rules list: List all workflow rules.

    vertesia workflows rules list
    
  • workflows rules execute <workflowId> [options]: Execute a workflow rule given its ID.

    vertesia workflows rules execute <workflowId> --objectId <objectId>
    
  • workflows rules delete <objectId>: Delete a workflow rule given its ID.

    vertesia workflows rules delete <objectId>
    
  • workflows definitions transpile <files...> [options]: Transpile a TypeScript workflow definition to JSON.

    vertesia workflows definitions transpile <files...> --out <file>
    
  • workflows definitions create [options]: Create a new workflow definition.

    vertesia workflows definitions create --file <file>
    
  • workflows definitions apply [workflowId] [options]: Apply a workflow definition.

    vertesia workflows definitions apply [workflowId] --file <file> --skip-validation
    
  • workflows definitions list: List all workflow definitions.

    vertesia workflows definitions list
    
  • workflows definitions get <objectId> [options]: Get a workflow definition given its ID.

    vertesia workflows definitions get <objectId> --file <file>
    
  • workflows definitions delete <objectId>: Delete a workflow definition given its ID.

    vertesia workflows definitions delete <objectId>
    

Code Generation

Commands to generate code based on interactions.

Commands

  • codegen [interactionName]: Generate code given an interaction name or for all the interactions in the project.

    vertesia codegen [interactionName] --versions <versions> --all --dir <file> --export <version>
    

Package Management

Commands to manage the Vertesia CLI package.

This command checks if there is a newer version of the CLI available. If a new version is found, it prompts the user to confirm the upgrade. If the user confirms, the Vertesia CLI will update itself to the latest version. If no updates are available, it will notify the user.

Commands

  • upgrade: Upgrade to the latest version of the CLI.

    vertesia upgrade
    

Was this page helpful?