CLI

AI GO! command line interface (CLI) is distributed as a lightweight Python package that allows programmatic interface for using AI GO!

You can use --help with any command of the CLI to understand what it does and what are its arguments.

lf --help
lf <command> --help
👍

To install AI GO! CLI, please follow the installation guide

The following commands are supported:

Configuration and Status

configureConfigure AI GO! CLI options.
switchSwitch AI app context.
statusShows the current AI app context and the saved AI GO! CLI options.

Applications

appAI app commands
Shorthand Commands
appsList all AI apps as JSON or in a table. Shorthand for lf app list.

Evaluation

To run, create, manage and debug existing tasks and evaluations, the following commands exist:

runCreate and run an evaluation and its dependencies from a run config file.
evaluationEvaluation commands
taskTask commands
Shorthand Commands
evaluationsList all evaluations as JSON or in a table. Shorthand for lf evaluation list.
tasksList all tasks as JSON or in a table. Shorthand for lf task list.

To create template for new evaluations:

templateGenerate a YAML template for a run config.

Model and Dataset Integration

modelModel commands
model-adapterModel adapter commands
datasetDataset commands
dataset-generatorDataset generator commands
integrationThird-party integration commands
Shorthand Commands
modelsList all models as JSON or in a table. Shorthand for lf model list.
model-adaptersList all model adapters as JSON or in a table. Shorthand for lf model-adapter list.
dataset-generatorsList all dataset generators as JSON or in a table. Shorthand for lf dataset-generator list.
datasetsList all datasets as JSON or in a table. Shorthand for lf dataset list.

User Management & Administration

userUser commands
tenantControl plane (tenant & user) commands

Environment Variables

Environment variables can be used in YAML files to pass sensitive or repetitive information that you might want to reuse. These can be specified in an .env. The CLI reads the .env in the current working directory.

For example, you can define the following .env file:

MY_API_KEY="my_api_key"

and then use it within the configuration files as follows:

...
config:
  ...
  api_key: $MY_API_KEY

YAML

YAML files are just means to provide structured information to the CLI. After the entity is created/updated, the YAML file is no longer needed and can always be retrieved using lf <entity> export 'my-key' --output '<entity>.yaml'.

Directive

Description

!include

YAML files can include text contents of other files verbatim using the !include <file_path> directive. The directive works with any text file type (.txt, .jinja, .py, json, ...). It allows the user to leverage the text editor/IDE file type highlighting and formatting.

Example

Instead of writing a Jinja templates inline in the model adapter YAML definition, we can write the templates in separate files input_transform.jinja and output_transform.jinja and then use the !include directive.

display_name: "Dify"
key: "adapter-dify"
...
process_input:
  language: "jinja"
  source_code: !include input_transform.jinja
process_output:
  language: "jinja"
  source_code: !include output_transform.jinja

$VAR or ${VAR}

Environment variables can be used in YAML files to pass sensitive or repetitive information that you might want to reuse.

Expansion attempts to replace the environment variable references $VAR or ${VAR} with its environment variable value. If the variable is not set, the string is left unchanged, i.e. $USER will stay $USER, and the user will be warned about it with a corresponding message. Variables are expanded only if they are the only thing in the string, i.e. $VAR (expanded) and Bearer $VAR (not expanded).

Example If the YAML file is referencing an environment variable $API_KEY as below:

api_key: $API_KEY

and the environment variable is set export API_KEY=secret, then the YAML file is loaded as:

api_key: secret

$ref

The $ref directive lets you inline the contents of another local YAML file (remote files are not supported) at the position of the reference. The provided path must be either absolute or relative to the current YAML file's location. Currently, references starting with # (JSON Pointer / in-document fragments) are not supported.

adapter:
  $ref: ./common/adapter.yaml   # ✅ loads and inlines the contents of adapter.yaml

ptr:
  $ref: "#/components/x"        # ❌ in-document fragments not supported
remote:
  $ref: "https://example.com/a" # ❌ remote references not supported

If $ref appears alongside other keys and the referenced value is a mapping (dict), the two mappings are merged with the referenced mapping taking precedence on key conflicts. If the referenced value is not a mapping, it must be the only value (no sibling keys).

config:
  retries: 2
  $ref: ./defaults.yaml
  # If ./defaults.yaml is:
  # { retries: 3, timeout: 10 }
  # ✅ Result:
  # config: { retries: 3, timeout: 10 }

limit:
  $ref: ./numbers.yaml   # suppose this loads: 100
  unit: items            # ❌ invalid - cannot merge a non-dict with other keys

CLI Reference

LatticeFlow AI GO! CLI

Usage

lf [OPTIONS] COMMAND [ARGS]...

lf configure

Interactively set AI GO! configuration options and save them to the nearest configuration file. Use --global/-g to edit the home-directory configuration instead.

Usage

lf configure [OPTIONS]

Options

NameTypeDescriptionDefault
--urltextURL to your AI GO! deployment.
--api-keytextYour AI GO! API Key.
--verify-ssl / --no-verify-sslbooleanFlag whether to verify SSL certificates.
--apptextAI app key to set as context.
--global, -gbooleanWhether to edit the global configuration in the home directory instead of writing to the current directory.False

lf switch

This command switches AI app context. All subsequent commands will be executed within the AI app context until switched to another. Command raises if the AI app with the specified key does not exist. The AI app context is stored in the nearest configuration file.

Usage

lf switch [OPTIONS] [AI_APP_KEY]

lf status

Shows the current AI app context and the saved AI GO! CLI options.

Usage

lf status [OPTIONS]

Options

NameTypeDescriptionDefault
-j, --jsonbooleanIf set, the output is printed to stdout as JSON.False

lf init

Creates a project config in the current directory. Use --atlas <key> to download an AI Atlas template directly, --url <URL> to download from a public ZIP URL, --empty to only initialize the config file, or run without arguments for an interactive setup.

Usage

lf init [OPTIONS]

Options

NameTypeDescriptionDefault
--atlastextAn AI Atlas template key to initialize (e.g. some-template).
--url, -utextA public URL to a ZIP file containing a template.
--empty, -ebooleanOnly initialize the project config, without a template.False

lf run

Create and run an evaluation along with its dependencies (models, model adapters, dataset generators, datasets, and tasks) as specified in a run config YAML file. You can optionally validate the configuration.

Usage

lf run [OPTIONS] [PATH]

Options

NameTypeDescriptionDefault
--file, -fpathPath to a single run config.
-v, --validatebooleanWhether to only validate the config file without creating or updating any entities.False
--wait, -wbooleanBlock until the evaluation finishes, printing progress every 10 seconds.False
--no-updatebooleanWhether to force skip updating the existing entities.False
--idtextEvaluation ID to re-run.

lf skills

Load LatticeFlow AI GO! agentic skills and download supporting resources.

Usage

lf skills [OPTIONS] COMMAND [ARGS]...

lf skills install

Install the AI GO! skill for a specific coding agent.

Usage

lf skills install [OPTIONS]

Options

NameTypeDescriptionDefault
--agentchoice (antigravity , claude_code , codex , cursor , opencode)Coding agent to install the skill for.
--dirpathInstalls the skill to the specified skills directory instead of the current working directory, e.g., '--dir /path/to/.agent/skills'

lf add

Create/update entities from run config or entity YAML files.

Usage

lf add [OPTIONS] COMMAND [ARGS]...

lf add app

Create/update AI app(s) based on YAML configuration(s).

Usage

lf add app [OPTIONS]

Options

NameTypeDescriptionDefault
--file, -fpathGlob path to AI app definitions.
-v, --validatebooleanWhether to only validate the config file without creating or updating any entities.False
--no-updatebooleanWhether to force skip updating the existing entities.False

lf add model-adapter

Create/update model adapter(s) based on YAML configuration(s) or run config.

Usage

lf add model-adapter [OPTIONS]

Options

NameTypeDescriptionDefault
--file, -fpathEither a path to a single run YAML file or a glob path to model adapter definitions.
-p, --providertextThe model adapter provider and model adapter key in the format '<provider_id>/<adapter_key>' (e.g. 'latticeflow/openai_chat_completion').
-v, --validatebooleanWhether to only validate the config file without creating or updating any entities.False
--no-updatebooleanWhether to force skip updating the existing entities.False

lf add model

Create/update model(s) based on YAML configuration(s) or run config.

Usage

lf add model [OPTIONS]

Options

NameTypeDescriptionDefault
--file, -fpathEither a path to a single run YAML file or a glob path to model definitions.
-p, --providertextThe model provider and model key in the format '<provider_id>/<model_key>' to integrate a model from a third-party provider (e.g. 'openai/gpt-4o'). The model key must match the provider's official model key/ID, as it is what will be sent to the provider during inference.
-v, --validatebooleanWhether to only validate the config file without creating or updating any entities.False
--no-updatebooleanWhether to force skip updating the existing entities.False

lf add dataset-generator

Create/update dataset generator(s) based on YAML configuration(s) or run config.

Usage

lf add dataset-generator [OPTIONS]

Options

NameTypeDescriptionDefault
--file, -fpathEither a path to a single run YAML file or a glob path to dataset generator definitions.
-v, --validatebooleanWhether to only validate the config file without creating or updating any entities.False
--no-updatebooleanWhether to force skip updating the existing entities.False

lf add dataset

Create/update dataset(s) based on YAML configuration(s) or run config.

Usage

lf add dataset [OPTIONS]

Options

NameTypeDescriptionDefault
--file, -fpathEither a path to a single run YAML file or a glob path to dataset definitions.
-v, --validatebooleanWhether to only validate the config file without creating or updating any entities.False
--no-updatebooleanWhether to force skip updating the existing entities.False

lf add task

Create/update task(s) based on YAML configuration(s) or run config.

Usage

lf add task [OPTIONS]

Options

NameTypeDescriptionDefault
--file, -fpathEither a path to a single run YAML file or a glob path to task definitions.
-v, --validatebooleanWhether to only validate the config file without creating or updating any entities.False
--no-updatebooleanWhether to force skip updating the existing entities.False

lf set

Set entities from run config (currently only policies are supported).

Usage

lf set [OPTIONS] COMMAND [ARGS]...

lf set policies

Update policies for the AI app (replacing the existing ones).

Usage

lf set policies [OPTIONS]

Options

NameTypeDescriptionDefault
--file, -fpathPath to a single run config.
-v, --validatebooleanWhether to only validate the config file without creating or updating any entities.False

lf list

List entities as JSON or in a table.

Usage

lf list [OPTIONS] COMMAND [ARGS]...

lf list app

List all AI apps as JSON or in a table.

Usage

lf list app [OPTIONS]

Options

NameTypeDescriptionDefault
-j, --jsonbooleanIf set, the output is printed to stdout as JSON.False

lf list model

List all models as JSON or in a table. Equivalent to 'lf models'.

Usage

lf list model [OPTIONS]

Options

NameTypeDescriptionDefault
-j, --jsonbooleanIf set, the output is printed to stdout as JSON.False

lf list model-adapter

List all model adapters as JSON or in a table. Equivalent to 'lf model-adapters'.

Usage

lf list model-adapter [OPTIONS]

Options

NameTypeDescriptionDefault
-j, --jsonbooleanIf set, the output is printed to stdout as JSON.False

lf list dataset

List all datasets as JSON or in a table. Equivalent to 'lf datasets'.

Usage

lf list dataset [OPTIONS]

Options

NameTypeDescriptionDefault
-j, --jsonbooleanIf set, the output is printed to stdout as JSON.False

lf list dataset-generator

List all dataset generators as JSON or in a table. Equivalent to 'lf dataset-generators'.

Usage

lf list dataset-generator [OPTIONS]

Options

NameTypeDescriptionDefault
-j, --jsonbooleanIf set, the output is printed to stdout as JSON.False

lf list task

List all tasks as JSON or in a table. Equivalent to 'lf tasks'.

Usage

lf list task [OPTIONS]

Options

NameTypeDescriptionDefault
-j, --jsonbooleanIf set, the output is printed to stdout as JSON.False

lf list eval

List all evaluations as JSON or in a table. Equivalent to 'lf evals'.

Usage

lf list eval [OPTIONS]

Options

NameTypeDescriptionDefault
-j, --jsonbooleanIf set, the output is printed to stdout as JSON.False

lf delete

Delete entities by key (or ID for evaluations).

Usage

lf delete [OPTIONS] COMMAND [ARGS]...

lf delete app

Delete the AI app with the provided key.

Usage

lf delete app [OPTIONS] KEY

lf delete model-adapter

Delete the model adapter with the provided key.

Usage

lf delete model-adapter [OPTIONS] KEY

lf delete model

Delete the model with the provided key.

Usage

lf delete model [OPTIONS] KEY

lf delete dataset-generator

Delete the dataset generator with the provided key.

Usage

lf delete dataset-generator [OPTIONS] KEY

lf delete dataset

Delete the dataset with the provided key.

Usage

lf delete dataset [OPTIONS] KEY

lf delete task

Delete the task with the provided key.

Usage

lf delete task [OPTIONS] KEY

lf delete eval

Delete the evaluation with the provided ID.

Usage

lf delete eval [OPTIONS] [ID]

Options

NameTypeDescriptionDefault
--idtextID of the evaluation to be deleted.

lf overview

Show overview of entities (currently only policies and evaluations are supported).

Usage

lf overview [OPTIONS] COMMAND [ARGS]...

lf overview eval

Show overview of an evaluation with the given ID as JSON or in a table.

Usage

lf overview eval [OPTIONS]

Options

NameTypeDescriptionDefault
--idtextID of the evaluation to show overview for.
-j, --jsonbooleanIf set, the output is printed to stdout as JSON.False

lf overview policies

Show an overview of policies (all or a specific one if key is provided) as JSON or in a table.

Usage

lf overview policies [OPTIONS]

Options

NameTypeDescriptionDefault
--keytextKey of the policy to show overview for.
-j, --jsonbooleanIf set, the output is printed to stdout as JSON.False

lf export

Export entities or evaluation results.

Usage

lf export [OPTIONS] COMMAND [ARGS]...

lf export app

Export the AI app with the provided key to a file or print as JSON.

Usage

lf export app [OPTIONS] KEY

Options

NameTypeDescriptionDefault
-o, --outputpathPath to output YAML file. Omit to print as JSON to stdout.

lf export model

Export the model with the provided key to a file or print as JSON.

Usage

lf export model [OPTIONS] KEY

Options

NameTypeDescriptionDefault
-o, --outputpathPath to output YAML file. Omit to print as JSON to stdout.

lf export model-adapter

Export the model adapter with the provided key to a file or print as JSON.

Usage

lf export model-adapter [OPTIONS] KEY

Options

NameTypeDescriptionDefault
-o, --outputpathPath to output YAML file. Omit to print as JSON to stdout.

lf export dataset

Export the dataset with the provided key (including the data contents) to a file or print as JSON.

Usage

lf export dataset [OPTIONS] KEY

Options

NameTypeDescriptionDefault
-o, --outputpathPath to output YAML file. Omit to print as JSON to stdout.
-do, --data-outputpathPath to output JSONL or CSV file (determined from the extension). Omit to print the first 10 samples to stdout.
-lo, --log-outputpathPath to output a JSON file with dataset generation logs. Only applicable for datasets generated via a dataset generator.

lf export dataset-generator

Export the dataset generator with the provided key to a file or print as JSON.

Usage

lf export dataset-generator [OPTIONS] KEY

Options

NameTypeDescriptionDefault
-o, --outputpathPath to output YAML file. Omit to print as JSON to stdout.

lf export task

Export the task with the provided key to a file or print as JSON.

Usage

lf export task [OPTIONS] KEY

Options

NameTypeDescriptionDefault
-o, --outputpathPath to output YAML file. Omit to print as JSON to stdout.

lf export eval

Export the evaluation results in a folder.

Usage

lf export eval [OPTIONS] [ID]

Options

NameTypeDescriptionDefault
--idtextID of the evaluation for which the results will be downloaded.
--output, -opathTarget folder path.
--link-logsbooleanWhether to link task result logs in the downloaded configuration.False
--with-secretsbooleanWhether to include resolved secret values in the exported configuration. Requires admin permissions.False

lf export policies

Exports policies to a YAML file or prints them as JSON.

Usage

lf export policies [OPTIONS]

Options

NameTypeDescriptionDefault
-o, --outputpathPath to output YAML file. Omit to print as JSON to stdout.

lf cancel

Cancel running evaluation by ID.

Usage

lf cancel [OPTIONS] COMMAND [ARGS]...

lf cancel eval

Cancel the running evaluation with the provided ID.

Usage

lf cancel eval [OPTIONS] [ID]

Options

NameTypeDescriptionDefault
--idtextID of the evaluation to be cancelled.

lf test

Test models, dataset generation, and task specifications.

Usage

lf test [OPTIONS] COMMAND [ARGS]...

lf test model

Test model connection, inference and I/O adapter mapping of the model with the provided key.

Usage

lf test model [OPTIONS] KEY

Options

NameTypeDescriptionDefault
--model-inputpathPath to a JSON file with a model input in LatticeFlow AI format.If not provided, default is used, for more details see https://aigo.latticeflow.io/docs/model-io.

lf test dataset

Preview a few samples from a generated dataset defined in a YAML file or a run config.

Usage

lf test dataset [OPTIONS]

Options

NameTypeDescriptionDefault
--file, -fpathPath to a dataset YAML file or a run config YAML file.
--key, -ktextKey of the dataset to extract from run config. Only used when --file points to a run config.
--num-samples, -ninteger range (between 1 and 10)The number of samples to generate. Can be at most 10.3
--verbose, -vbooleanShow each source sample and the input/output of the synthesizers.False
--show-iobooleanShow the model I/O of synthesizers. Only meaningful with --verbose.False

lf test task

Test a task based on its specification, extracted from a run YAML file.

Usage

lf test task [OPTIONS]

Options

NameTypeDescriptionDefault
--file, -fpathPath to a single run config.
--spec-key, -sktextKey of the task specification to test.
--num-samples, -ninteger range (1 and above)The number of samples to test the task with.1

lf regenerate

Regenerate datasets using a dataset generator.

Usage

lf regenerate [OPTIONS] COMMAND [ARGS]...

lf regenerate dataset

Regenerate a dataset by re-running its generator, even if the configuration has not changed.

Usage

lf regenerate dataset [OPTIONS]

Options

NameTypeDescriptionDefault
--file, -fpathPath to a dataset YAML or a run config YAML.
--key, -ktextKey of the dataset to regenerate. Required when '--file' points to a run config YAML containing multiple datasets.

lf user

User commands.

Usage

lf user [OPTIONS] COMMAND [ARGS]...

lf user list

List all users as JSON or in a table.

Usage

lf user list [OPTIONS]

Options

NameTypeDescriptionDefault
-j, --jsonbooleanIf set, the output is printed to stdout as JSON.False

lf user add

Create/update a user with the provided email.

Usage

lf user add [OPTIONS]

Options

NameTypeDescriptionDefault
--emailtextA unique email for the user. Example: '[email protected]'.
--nametextName of the user. Example: 'John Doe'.
--rolestextRole(s) to assign to the user (comma-separated). Possible values are: 'admin', 'member', 'viewer'. Example:'admin,member'.

lf user enable

Enable the user with the provided email.

Usage

lf user enable [OPTIONS]

Options

NameTypeDescriptionDefault
--emailtextEmail of the user to be enabled. Example: '[email protected]'

lf user disable

Disable the user with the provided email.

Usage

lf user disable [OPTIONS]

Options

NameTypeDescriptionDefault
--emailtextEmail of the user to be disabled. Example: '[email protected]'

lf user reset-password

Reset the password for the user with the provided email.

Usage

lf user reset-password [OPTIONS]

Options

NameTypeDescriptionDefault
--emailtextEmail of the user whose password to reset. Example: '[email protected]'.

lf secret

Secret management commands.

Usage

lf secret [OPTIONS] COMMAND [ARGS]...

lf secret list

List all secrets as JSON or in a table.

Usage

lf secret list [OPTIONS]

Options

NameTypeDescriptionDefault
-j, --jsonbooleanIf set, the output is printed to stdout as JSON.False

lf secret add

Create/update a secret with the given name.

Usage

lf secret add [OPTIONS]

Options

NameTypeDescriptionDefault
--nametextThe name of the secret to be created or updated.
--valuetextThe value of the secret to be assigned to the variable.

lf secret delete

Delete a secret with the given name.

Usage

lf secret delete [OPTIONS]

Options

NameTypeDescriptionDefault
--nametextThe name of the secret to be deleted.

lf integration

Third-party integration commands.

Usage

lf integration [OPTIONS] COMMAND [ARGS]...

lf integration add

Configure a third-party provider integration.

Usage

lf integration add [OPTIONS]

Options

NameTypeDescriptionDefault
--providerchoice (anthropic , fireworks , gemini , novita , openai , sambanova , together)The provider's integration ID.
--api-keytextThe API key for the provider
--zenguard-tiertext[DEPRECATED] The ZenGuard tier to use. Only applicable if integration is 'zenguard'.

lf tenant

Control plane (tenant & user) commands.

Usage

lf tenant [OPTIONS] COMMAND [ARGS]...

lf tenant list

List all tenants as JSON or in a table.

Usage

lf tenant list [OPTIONS]

Options

NameTypeDescriptionDefault
-j, --jsonbooleanIf set, the output is printed to stdout as JSON.False

lf tenant add

Create a new tenant.

Usage

lf tenant add [OPTIONS]

Options

NameTypeDescriptionDefault
--nametextA unique name for the tenant. Example: 'My Organization'.
--aliastextA unique identifier for the tenant (allowed [a-z0-9-]). Example: 'my-org'.
--domainstextThe internet domain(s) associated with the tenant (comma-separated).Example: 'latticeflow.ai,latticeflow.org'.

lf tenant delete

Delete the tenant with the provided alias.

Usage

lf tenant delete [OPTIONS]

Options

NameTypeDescriptionDefault
--aliastextAlias of the tenant to be deleted. Example: 'my-org'.

lf tenant list-users

List all users for the tenant with the provided alias as JSON or in a table.

Usage

lf tenant list-users [OPTIONS]

Options

NameTypeDescriptionDefault
--aliastextAlias of the tenant for which the user should be displayed. Example: 'my-org'.
-j, --jsonbooleanIf set, the output is printed to stdout as JSON.False

lf tenant add-user

Create a user for the tenant with the provided alias.

Usage

lf tenant add-user [OPTIONS]

Options

NameTypeDescriptionDefault
--tenant-aliastextAlias of the tenant for which the user should be created. Example: 'my-org'.
--emailtextA unique email for the user. Example: '[email protected]'.
--nametextName of the user. Example: 'John Doe'.
--rolestextRole(s) to assign to the user (comma-separated). Possible values are: 'admin', 'member', 'viewer'. Example:'admin,member'.

lf tenant reset-password

Reset the password for the user with the provided email.

Usage

lf tenant reset-password [OPTIONS]

Options

NameTypeDescriptionDefault
--tenant-aliastextAlias of the tenant to which the user belongs. Example: 'my-org'.
--emailtextEmail of the user whose password to reset. Example: '[email protected]'.