CLI Config File
Introduction
Configuration files in general are files that define parameters and values for any software or codebase settings. In this case, Catalyst provides CLI commands that enable you to set and manage the location of Python, and certain versions of Java downloaded in your local system, in a specific configuration file.
This particular configuration file is a hidden local file maintained in your system in varied locations, based on the OS installed in your system. It controls the operations of various utilities in your system. It also contains the configurations that allow the system to communicate effectively with the CLI.
Set a Key-Value Pair
You can add an entry to the config file in your local machine specifying the path of Python, Java 11, or Java 17 stored in your system, by providing the inputs in the form of a key-value pair. To do so, execute the command mentioned below from your system’s terminal:
You can set the path information for the function stacks in the following manner:
- Python:
- Java 8:
- Java 11:
- Java 17:
- Currently, you can only set the key as python3_9.bin, java8.bin, java11.bin, or java17.bin
- Replace the path listed in the above commands with your JDK or Python path
- If your local system is running on Windows OS, kindly enclose the path in double-quotes. For example, you will set the Java 11 path in the following manner:
copycatalyst config:set java11.bin="/Library/Java/JavaVirtualMachines/jdk-11.0.17.jdk/Contents/Home/bin"
Get the Value of a Specific Key
You can fetch the value of any specific key in this particular configuration file by executing the terminal command below with the key:
- Python:
- Java 8:
- Java 11:
- Java 17:
This will return the path or the value of the key stored in the config file. For example:
- Python: /Users/amelia-426/Downloads/Python-3.9.16
- Java 8: /Library/Java/JavaVirtualMachines/jdk1.8.0_291
- Java 11: /Library/Java/JavaVirtualMachines/jdk-11.0.17
- Java 17: /Library/Java/JavaVirtualMachines/jdk-17
- Currently, you can only retrieve the Python, Java 8, Java 11, or Java 17 path information from this file using this CLI command.
- Replace the path listed in the above commands with your JDK or Python path
- If your local system is running on Windows OS, kindly enclose the path in double-quotes. For example, you will set the Java 11 path in the following manner:
copycatalyst config:get java11.bin="/Library/Java/JavaVirtualMachines/jdk-11.0.17.jdk/Contents/Home/bin"
List Configurations
You can retrieve the list of all configurations (key-value pairs) that are present in the configuration file by executing the following command:
Delete Key
You can delete an entry in the configuration file by executing the CLI command mentioned below:
You must specify the key name of the entry that you want to delete.
- Python:
- Java 8:
- Java 11:
- Java 17:
This will delete the key-value pair from the file.
Last Updated 2024-06-18 12:08:24 +0530 +0530
Yes
No
Send your feedback to us