Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: don't require .env to exist #427

Merged
merged 2 commits into from
Nov 20, 2024
Merged

Conversation

odilitime
Copy link
Contributor

Risks

Medium, haven't discussed this widely

Background

What does this PR do?

Removes the requirement for .env to exists

What kind of change is this?

Improvement

Why are we doing this? Any context or related work?

Large multiagent instances will have to rely on character.json to have all the settings and secrets for that agent. Have a default .env in these instances to set defaults might be helpful but also hurtful. This allows the admin to choose if they want any defaults across all their agents or nots.

Documentation changes needed?

My changes do not require a change to the project documentation.

Testing

Ran against stable-11-17 branch without issue

@odilitime odilitime changed the title don't require .env to exist ux: don't require .env to exist Nov 20, 2024
// Load the .env file
const result = config({ path: envPath });
// attempt to Load the .env file into process.env
const result = config(envPath ? { path: envPath } : {});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirming that config({}) doesn't cause any errors?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not, I checked

@monilpat
Copy link
Contributor

FYI: There is another approach to agent specific envs added in: #410 still via env but in a segmented way.

@odilitime
Copy link
Contributor Author

I saw that, complementary to this. Wasn't sure if that's going to get merged so left it out of this description

@monilpat
Copy link
Contributor

monilpat commented Nov 20, 2024 via email

@monilpat
Copy link
Contributor

Looks like the limitations are: feat|fix|docs|style|refactor|test|chore:any description see

if [[ ! "$PR_TITLE" =~ ^(feat|fix|docs|style|refactor|test|chore):\ .+ ]]; then
                   echo "PR title does not match the required pattern."
                   exit 1
                 fi

@odilitime odilitime changed the title ux: don't require .env to exist feat: don't require .env to exist Nov 20, 2024
@monilpat
Copy link
Contributor

LGTM! 🥇

@jkbrooks jkbrooks merged commit 9a0e474 into ai16z:main Nov 20, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants