Skip to content

feat: add .env.example and python-dotenv support for easier local setup#112

Merged
reachkritz merged 3 commits into
google-gemini:mainfrom
MuhammedSenn:add-dotenv-support
Jun 4, 2026
Merged

feat: add .env.example and python-dotenv support for easier local setup#112
reachkritz merged 3 commits into
google-gemini:mainfrom
MuhammedSenn:add-dotenv-support

Conversation

@MuhammedSenn

Copy link
Copy Markdown
Contributor
  • Adds .env.example as a template showing all required environment variables
  • Adds python-dotenv so .env is automatically loaded on startup
  • Updates README.md with a new "Using a .env file" section (Section C)
  • Removes the need to manually export env vars each terminal session

@google-cla

google-cla Bot commented Feb 22, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @MuhammedSenn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the developer experience for local setup by integrating python-dotenv. It streamlines the process of managing environment variables, making it easier for new contributors to get started and for existing developers to switch between projects without manually configuring their shell environment. The addition of an example .env file and updated documentation ensures clarity and ease of use.

Highlights

  • Simplified Local Setup: Introduced support for .env files, allowing environment variables to be loaded automatically on startup, removing the need for manual exports.
  • Environment Variable Template: Added a .env.example file to provide a clear template of all required environment variables for the project.
  • Updated Documentation: The README.md has been updated with a new section (Section C) detailing how to use the .env file for local development.
Changelog
  • .env.example
    • Added a template file listing all necessary environment variables for project configuration.
  • README.md
    • Added a new section (Section C) titled "Using a .env file" with instructions for copying and populating the .env file.
    • Included a note explaining that the project will automatically load environment variables from the .env file.
  • main.py
    • Imported load_dotenv from the dotenv library.
    • Called load_dotenv() at the beginning of the script to automatically load environment variables.
  • requirements.txt
    • Added python-dotenv to the list of project dependencies.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for .env files using python-dotenv, which is a great improvement for simplifying local development setup. The changes include adding a .env.example template, updating the README.md with instructions, and modifying main.py to automatically load the environment variables. My review includes a couple of suggestions to improve code consistency and ensure reproducible builds.

Comment thread main.py Outdated
Comment thread requirements.txt Outdated

@reachkritz reachkritz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving the changes.

@reachkritz reachkritz merged commit 56c5f74 into google-gemini:main Jun 4, 2026
9 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.

2 participants