agenta icon indicating copy to clipboard operation
agenta copied to clipboard

Manage Variant Configuration in CLI

Open devgenix opened this issue 6 months ago • 0 comments

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 where agenta 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 where agenta init was done or for a specific app variant into the variant(s) configuration file
image

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.
image
  • agenta variant add --from <variant_name> -> Create a variant from an existing variant as the base
image
  • agenta variant add --config_file app.<variant_name>.toml -> Add a new variant based on a valid toml configuration file
image image

Every add variant command would pull the config file for the variant and save it after creating the variant. image

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. image

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.

devgenix avatar Dec 26 '23 12:12 devgenix