Skip to content
Back to top
View this page

# mindroot.coreplugins.env_manager package

## Submodules

## mindroot.coreplugins.env_manager.mod module

mindroot.coreplugins.env_manager.mod.load_env_file()

  Load environment variables from .env file.

  Returns:

    Dictionary of environment variables from .env file

  Return type:

    dict

mindroot.coreplugins.env_manager.mod.save_env_file(env_vars)

  Save environment variables to .env file.

  Parameters:

    env_vars (dict) – Dictionary of environment variables to save

  Returns:

    True if successful, False otherwise

  Return type:

    bool

mindroot.coreplugins.env_manager.mod.scan_directory_for_env_vars(directory)

  Scan a directory for environment variable references using grep.

  Parameters:

    directory (str) – Path to the directory to scan

  Returns:

    Set of environment variable names found

  Return type:

    set

async mindroot.coreplugins.env_manager.mod.scan_env_vars(params=None, context=None)

  Scan all enabled plugins for environment variable references.

  Debug logs added to help troubleshoot path resolution and scanning.

  Returns:

    Dictionary with plugin names as keys and environment variable info as values

  Return type:

    dict

mindroot.coreplugins.env_manager.mod.should_skip_directory(directory)

  Check if a directory should be skipped during scanning.

  Parameters:

    directory (str) – Path to check

  Returns:

    True if the directory should be skipped, False otherwise

  Return type:

    bool

async mindroot.coreplugins.env_manager.mod.update_env_var(var_name, var_value, context=None)

  Update an environment variable.

  Parameters:

    - var_name (str) – Name of the environment variable

    - var_value (str) – Value to set

  Returns:

    Status of the operation

  Return type:

    dict

## mindroot.coreplugins.env_manager.router module

async mindroot.coreplugins.env_manager.router.get_env_vars(request: Request)

  Scan all enabled plugins for environment variable references.

async mindroot.coreplugins.env_manager.router.update_environment_var(request: Request, var_name: str = Body(PydanticUndefined), var_value: str = Body(PydanticUndefined))

  Update an environment variable.

## Module contents