agenta
agenta copied to clipboard
Manage Variant Configuration in CLI
This PR adds functionality in the CLI to allow manage App Variants configuration from the CLI.
The following Commands have been introduced;
Manage App Variant Configurations
-
agenta config pull
/agenta config pull <app_name.variant_name>
-> Pull the configuration for all app variants belong to the app whereagenta init
was done or for a specific app variant, into a configuration file by the name of the respective variant(s) <app_name.variant_name>.toml -
agenta config update
/agenta config update <app_name.variant_name>
-> Updates the configuration for all app variants belong to the app whereagenta init
was done or for a specific app variant into the variant(s) configuration file
Add an App variant
-
agenta variant add
-> This command will list all the variants in the app and ask you to choose which one to use as the base for the new variant.
-
agenta variant add --from <variant_name>
-> Create a variant from an existing variant as the base
-
agenta variant add --config_file app.<variant_name>.toml
-> Add a new variant based on a valid toml configuration file
Every add variant command would pull the config file for the variant and save it after creating the variant.
The following existing commands have been enhanced;
-
agenta variant delete
-> would now also delete the configuration file associated with a variant, if present. -
agenta variant serve <file_name>.py
/agenta variant serve --file_name <file_name>.py
-> Would now pull the config file for the default variant created.
Other enhancements
Configuration check will now also pull the latest version of all variant configuration/remove config files for variants that have been deleted from the backend.