Skip to content

Override the default config directory of the Cortex CLI #1222

Closed
@RobertLucian

Description

@RobertLucian

Description

Currently, all Cortex CLI configs are stored in ~/.cortex directory. Make this overridable with an environment variable such as CORTEX_CLI_CONFIG_DIR.

Motivation

Allows the user to set their own config directory, which is useful in the context of having multiple versions of the Cortex CLI. For instance, one could have multiple conda environments set on their development machine that have different versions of the CLI installed, and thus, require different config directories for each environment.

To automatically export the CORTEX_CLI_CONFIG_DIR on conda activate <env> (with the assumption that the Cortex CLI is already installed in that environment's path), the following technique can be employed:
https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#setting-environment-variables

Extra

Might have to modify get-cli.sh to accept a new argument that would specify the install path of the CLI executable.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions