axem-solutions / dem

Containerized Development Environment Manager for embedded development
Other
96 stars 15 forks source link

[FeatureRequest] Rename the existing clone command to `cp` #130

Closed janosmurai closed 1 year ago

janosmurai commented 1 year ago

The dem clone command will have a new purpose: it will copy the selected Dev Env descriptor from the catalog and save it in the local dev_env.json.

The new dem cp command should have the same functionality as the current dem clone one, meaning there is no need to modify the command logic.

Documentation: Commands - dem

The expected behavior (this is already implemented as the clone command):

  1. The DEM looks for the DEV_ENV_NAME in the local dev_env.json file.
    If it can’t find it, an error should be raised and the DEM aborts the execution.
  2. The DEM should check if there is already a Dev Env with the name of NEW_DEV_ENV_NAME.
    If the new name has already been taken, the DEM should ask the user to overwrite it: If yes, overwrite the Dev Env descriptor with the one coming from the DEV_ENV_NAME If no, abort the execution. If the name is not taken, then just create a new Dev Env descriptor entry in the local dev_env.json file.
  3. If either the DEV_ENV_NAME or the NEW_DEV_ENV_NAME are empty strings, then the DEM should report an error and abort the execution. (Handled by typer)
  4. The DEM should autocomplete the DEV_ENV_NAME parameter from the list of already available local Dev Envs.
rabroldan commented 1 year ago

hey there can I take this one?

janosmurai commented 1 year ago

Hey @rabroldan Sure, go for it! If you have any questions, feel free to ask them on Discord.