eliza icon indicating copy to clipboard operation
eliza copied to clipboard

Standardize boolean values and fix pattern for .env file

Open hcaumo opened this issue 1 year ago • 1 comments

Title: Standardize boolean values and fix pattern for .env file

Describe the bug The .env file contains some inconsistencies in how boolean values and specific strings are represented. For instance, the variable POST_IMMEDIATELY uses the string "NO", while a boolean value like TWITTER_SEARCH_ENABLE uses false. This inconsistency could lead to parsing issues and is prone to human error.

To Reproduce

  1. Open the .env file. 2. Observe that POST_IMMEDIATELY=NO is used instead of the expected false.

Expected behavior Boolean variables should consistently use true or false, and all string-based boolean values such as POST_IMMEDIATELY should use true/false instead of "YES"/"NO".

Additional context This change will standardize boolean values, making the .env file easier to parse and reducing the risk of errors. The parseBooleanFromText function, declared as const parseBooleanFromText: (text: string) => boolean;, can be used outside the .env context to ensure boolean parsing is consistent across the codebase.

Guidelines for .env values

  1. Boolean values: Always use true or false (not "YES" or "NO"). Example: TWITTER_SEARCH_ENABLE=true POST_IMMEDIATELY=false

Adhering to these guidelines will ensure consistency and make it easier for automated scripts to process the .env file while reduce human error.

hcaumo avatar Dec 23 '24 06:12 hcaumo