Skip to content

Configuration¤

In order to work with cmemc, you have to configure it according to your needs.

  • File-based Configuration


    The most common way to configure cmemc is with a central configuration file.

  • Environment-based Configuration


    In addition to configuration files, cmemc can be widely configured and parameterized with environment variables.

  • Completion Setup


    Setting up command completion is optional but highly recommended and will greatly speed up your cmemc terminal sessions.

  • Security Considerations


    cmemc can be configured to fetch your credentials from external processes, such as password stores. In addition to that, cmemc can work with custom certificates.

Configuration value resolution order

When the same key is defined in multiple places, cmemc resolves values in the following order:

  1. Named connection section — When you run cmemc with a specific connection (e.g. -c my-connection), all keys from the corresponding [my-connection] section are used. This takes full precedence, including over OS environment variables, so you can define self-contained, reproducible connection profiles that are not affected by your shell environment.

  2. Environment variables — If a key is set as an environment variable and no named connection section is active, the environment variable value is used.

  3. [DEFAULT] section — The [DEFAULT] section in cmemc.ini acts as a fallback for all connections. Its values are ignored if the same key is already set as an environment variable. Keys present in the [DEFAULT] section but absent from the named connection section still apply as a fallback.

  4. Command specific environment variables — Command-specific variables (e.g. CMEMC_GRAPH_LIST_ID_ONLY) are never overridden or cleared when switching connections. They apply regardless of whether -c is active, from either the config file or the environment.

Comments