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> --helpTo install AI GO! CLI, please follow the installation guide
The following commands are supported:
Configuration and Status
Applications
| app | AI app commands |
Shorthand Commands
| apps | List 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:
| run | Create and run an evaluation and its dependencies from a run config file. |
| evaluation | Evaluation commands |
| task | Task commands |
Shorthand Commands
| evaluations | List all evaluations as JSON or in a table. Shorthand for lf evaluation list. |
| tasks | List all tasks as JSON or in a table. Shorthand for lf task list. |
To create template for new evaluations:
| template | Generate a YAML template for a run config. |
Model and Dataset Integration
| model | Model commands |
| model-adapter | Model adapter commands |
| dataset | Dataset commands |
| dataset-generator | Dataset generator commands |
| integration | Third-party integration commands |
Shorthand Commands
| models | List all models as JSON or in a table. Shorthand for lf model list. |
| model-adapters | List all model adapters as JSON or in a table. Shorthand for lf model-adapter list. |
| dataset-generators | List all dataset generators as JSON or in a table. Shorthand for lf dataset-generator list. |
| datasets | List all datasets as JSON or in a table. Shorthand for lf dataset list. |
User Management & Administration
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_KEYYAML
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 |
|---|---|
| YAML files can include text contents of other files verbatim using the Example Instead of writing a Jinja templates inline in the model adapter YAML definition, we can write the templates in separate files |
| 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 Example
If the YAML file is referencing an environment variable and the environment variable is set |
| The If |
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
| Name | Type | Description | Default |
|---|---|---|---|
--url | text | URL to your AI GO! deployment. | |
--api-key | text | Your AI GO! API Key. | |
--verify-ssl / --no-verify-ssl | boolean | Flag whether to verify SSL certificates. | |
--app | text | AI app key to set as context. | |
--global, -g | boolean | Whether 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
| Name | Type | Description | Default |
|---|---|---|---|
-j, --json | boolean | If 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
| Name | Type | Description | Default |
|---|---|---|---|
--atlas | text | An AI Atlas template key to initialize (e.g. some-template). | |
--url, -u | text | A public URL to a ZIP file containing a template. | |
--empty, -e | boolean | Only 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
| Name | Type | Description | Default |
|---|---|---|---|
--file, -f | path | Path to a single run config. | |
-v, --validate | boolean | Whether to only validate the config file without creating or updating any entities. | False |
--wait, -w | boolean | Block until the evaluation finishes, printing progress every 10 seconds. | False |
--no-update | boolean | Whether to force skip updating the existing entities. | False |
--id | text | Evaluation 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
| Name | Type | Description | Default |
|---|---|---|---|
--agent | choice (antigravity , claude_code , codex , cursor , opencode) | Coding agent to install the skill for. | |
--dir | path | Installs 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
| Name | Type | Description | Default |
|---|---|---|---|
--file, -f | path | Glob path to AI app definitions. | |
-v, --validate | boolean | Whether to only validate the config file without creating or updating any entities. | False |
--no-update | boolean | Whether 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
| Name | Type | Description | Default |
|---|---|---|---|
--file, -f | path | Either a path to a single run YAML file or a glob path to model adapter definitions. | |
-p, --provider | text | The model adapter provider and model adapter key in the format '<provider_id>/<adapter_key>' (e.g. 'latticeflow/openai_chat_completion'). | |
-v, --validate | boolean | Whether to only validate the config file without creating or updating any entities. | False |
--no-update | boolean | Whether 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
| Name | Type | Description | Default |
|---|---|---|---|
--file, -f | path | Either a path to a single run YAML file or a glob path to model definitions. | |
-p, --provider | text | The 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, --validate | boolean | Whether to only validate the config file without creating or updating any entities. | False |
--no-update | boolean | Whether 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
| Name | Type | Description | Default |
|---|---|---|---|
--file, -f | path | Either a path to a single run YAML file or a glob path to dataset generator definitions. | |
-v, --validate | boolean | Whether to only validate the config file without creating or updating any entities. | False |
--no-update | boolean | Whether 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
| Name | Type | Description | Default |
|---|---|---|---|
--file, -f | path | Either a path to a single run YAML file or a glob path to dataset definitions. | |
-v, --validate | boolean | Whether to only validate the config file without creating or updating any entities. | False |
--no-update | boolean | Whether 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
| Name | Type | Description | Default |
|---|---|---|---|
--file, -f | path | Either a path to a single run YAML file or a glob path to task definitions. | |
-v, --validate | boolean | Whether to only validate the config file without creating or updating any entities. | False |
--no-update | boolean | Whether 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
| Name | Type | Description | Default |
|---|---|---|---|
--file, -f | path | Path to a single run config. | |
-v, --validate | boolean | Whether 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
| Name | Type | Description | Default |
|---|---|---|---|
-j, --json | boolean | If 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
| Name | Type | Description | Default |
|---|---|---|---|
-j, --json | boolean | If 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
| Name | Type | Description | Default |
|---|---|---|---|
-j, --json | boolean | If 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
| Name | Type | Description | Default |
|---|---|---|---|
-j, --json | boolean | If 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
| Name | Type | Description | Default |
|---|---|---|---|
-j, --json | boolean | If 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
| Name | Type | Description | Default |
|---|---|---|---|
-j, --json | boolean | If 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
| Name | Type | Description | Default |
|---|---|---|---|
-j, --json | boolean | If 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] KEYlf delete model-adapter
Delete the model adapter with the provided key.
Usage
lf delete model-adapter [OPTIONS] KEYlf delete model
Delete the model with the provided key.
Usage
lf delete model [OPTIONS] KEYlf delete dataset-generator
Delete the dataset generator with the provided key.
Usage
lf delete dataset-generator [OPTIONS] KEYlf delete dataset
Delete the dataset with the provided key.
Usage
lf delete dataset [OPTIONS] KEYlf delete task
Delete the task with the provided key.
Usage
lf delete task [OPTIONS] KEYlf delete eval
Delete the evaluation with the provided ID.
Usage
lf delete eval [OPTIONS] [ID]Options
| Name | Type | Description | Default |
|---|---|---|---|
--id | text | ID 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
| Name | Type | Description | Default |
|---|---|---|---|
--id | text | ID of the evaluation to show overview for. | |
-j, --json | boolean | If 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
| Name | Type | Description | Default |
|---|---|---|---|
--key | text | Key of the policy to show overview for. | |
-j, --json | boolean | If 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] KEYOptions
| Name | Type | Description | Default |
|---|---|---|---|
-o, --output | path | Path 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] KEYOptions
| Name | Type | Description | Default |
|---|---|---|---|
-o, --output | path | Path 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] KEYOptions
| Name | Type | Description | Default |
|---|---|---|---|
-o, --output | path | Path 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] KEYOptions
| Name | Type | Description | Default |
|---|---|---|---|
-o, --output | path | Path to output YAML file. Omit to print as JSON to stdout. | |
-do, --data-output | path | Path to output JSONL or CSV file (determined from the extension). Omit to print the first 10 samples to stdout. | |
-lo, --log-output | path | Path 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] KEYOptions
| Name | Type | Description | Default |
|---|---|---|---|
-o, --output | path | Path 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] KEYOptions
| Name | Type | Description | Default |
|---|---|---|---|
-o, --output | path | Path 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
| Name | Type | Description | Default |
|---|---|---|---|
--id | text | ID of the evaluation for which the results will be downloaded. | |
--output, -o | path | Target folder path. | |
--link-logs | boolean | Whether to link task result logs in the downloaded configuration. | False |
--with-secrets | boolean | Whether 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
| Name | Type | Description | Default |
|---|---|---|---|
-o, --output | path | Path 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
| Name | Type | Description | Default |
|---|---|---|---|
--id | text | ID 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] KEYOptions
| Name | Type | Description | Default |
|---|---|---|---|
--model-input | path | Path 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
| Name | Type | Description | Default |
|---|---|---|---|
--file, -f | path | Path to a dataset YAML file or a run config YAML file. | |
--key, -k | text | Key of the dataset to extract from run config. Only used when --file points to a run config. | |
--num-samples, -n | integer range (between 1 and 10) | The number of samples to generate. Can be at most 10. | 3 |
--verbose, -v | boolean | Show each source sample and the input/output of the synthesizers. | False |
--show-io | boolean | Show 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
| Name | Type | Description | Default |
|---|---|---|---|
--file, -f | path | Path to a single run config. | |
--spec-key, -sk | text | Key of the task specification to test. | |
--num-samples, -n | integer 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
| Name | Type | Description | Default |
|---|---|---|---|
--file, -f | path | Path to a dataset YAML or a run config YAML. | |
--key, -k | text | Key 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
| Name | Type | Description | Default |
|---|---|---|---|
-j, --json | boolean | If 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
| Name | Type | Description | Default |
|---|---|---|---|
--email | text | A unique email for the user. Example: '[email protected]'. | |
--name | text | Name of the user. Example: 'John Doe'. | |
--roles | text | Role(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
| Name | Type | Description | Default |
|---|---|---|---|
--email | text | Email 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
| Name | Type | Description | Default |
|---|---|---|---|
--email | text | Email 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
| Name | Type | Description | Default |
|---|---|---|---|
--email | text | Email 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
| Name | Type | Description | Default |
|---|---|---|---|
-j, --json | boolean | If 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
| Name | Type | Description | Default |
|---|---|---|---|
--name | text | The name of the secret to be created or updated. | |
--value | text | The 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
| Name | Type | Description | Default |
|---|---|---|---|
--name | text | The 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
| Name | Type | Description | Default |
|---|---|---|---|
--provider | choice (anthropic , fireworks , gemini , novita , openai , sambanova , together) | The provider's integration ID. | |
--api-key | text | The API key for the provider | |
--zenguard-tier | text | [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
| Name | Type | Description | Default |
|---|---|---|---|
-j, --json | boolean | If set, the output is printed to stdout as JSON. | False |
lf tenant add
Create a new tenant.
Usage
lf tenant add [OPTIONS]Options
| Name | Type | Description | Default |
|---|---|---|---|
--name | text | A unique name for the tenant. Example: 'My Organization'. | |
--alias | text | A unique identifier for the tenant (allowed [a-z0-9-]). Example: 'my-org'. | |
--domains | text | The 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
| Name | Type | Description | Default |
|---|---|---|---|
--alias | text | Alias 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
| Name | Type | Description | Default |
|---|---|---|---|
--alias | text | Alias of the tenant for which the user should be displayed. Example: 'my-org'. | |
-j, --json | boolean | If 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
| Name | Type | Description | Default |
|---|---|---|---|
--tenant-alias | text | Alias of the tenant for which the user should be created. Example: 'my-org'. | |
--email | text | A unique email for the user. Example: '[email protected]'. | |
--name | text | Name of the user. Example: 'John Doe'. | |
--roles | text | Role(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
| Name | Type | Description | Default |
|---|---|---|---|
--tenant-alias | text | Alias of the tenant to which the user belongs. Example: 'my-org'. | |
--email | text | Email of the user whose password to reset. Example: '[email protected]'. |
