Skip to content

Conversation

fredzqm
Copy link
Contributor

@fredzqm fredzqm commented Oct 3, 2025

Today, firebase init requires firebase login. This is a reasonable requirement for most use cases.

However, if you want to try out the emulator experience without a project, login shouldn't be necessary theoretically.

This PR supports firebase init --project demo-no-project, which relax the login requirement and skips the project selection.

The FDC Data Connect extensions can show "run init" button in zero state with no login and no project connected.
Developers can setup the local emulator and try things out quickly.

Screenshot 2025-10-02 at 7 45 30 PM Screenshot 2025-10-02 at 7 46 21 PM Screenshot 2025-10-03 at 1 18 32 PM

Copy link
Contributor

Summary of Changes

Hello @fredzqm, 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 introduces significant changes to the Firebase CLI and its VS Code extension to support a more streamlined and accessible emulator experience. By allowing firebase init to run without requiring a user login or a specific Firebase project association (via a new --project demo-no-project flag), developers can now quickly spin up and experiment with the Firebase emulators without the initial overhead of authentication and project setup. This enhances the developer onboarding and experimentation flow, especially for those new to Firebase or wanting to test features in isolation.

Highlights

  • Loginless firebase init: The firebase init command no longer strictly requires prior authentication, enabling a loginless setup for emulator use cases.
  • Projectless firebase init: Introduces a special --project demo-no-project flag for firebase init that allows skipping project association and login, facilitating a quick emulator experience.
  • VS Code UI Adjustment: The VS Code extension UI (SidebarApp.tsx) now renders content regardless of user login status, aligning with the new loginless emulator experience.
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.

Copy link
Contributor

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

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 a project-less and login-less emulator experience in VS Code by allowing firebase init to run with a placeholder project. The changes look good and align with the goal, but I found one issue where the wrong option property was being checked, which would prevent the feature from working correctly. My review includes a suggestion to fix this.

fredzqm and others added 3 commits October 2, 2025 19:43
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@fredzqm
Copy link
Contributor Author

fredzqm commented Oct 3, 2025

@joehan Hope you are less busy today.

Wonder what's your take on this.

There are many ways (interactive & non-interactive) to skip project setup in Firebase init. Though login is always required.

It's reasonable to expect FDC emulator experience to work e2e without login and project.

Given our prior art to use demo-no-project, do you think we can use it to skip both auth and project in init?

@joehan
Copy link
Contributor

joehan commented Oct 3, 2025

@joehan Hope you are less busy today.

Wonder what's your take on this.

There are many ways (interactive & non-interactive) to skip project setup in Firebase init. Though login is always required.

It's reasonable to expect FDC emulator experience to work e2e without login and project.

Given our prior art to use demo-no-project, do you think we can use it to skip both auth and project in init?

I think this is a totally valid use case! In general, init shouldn't require auth unless you choose a project, and if there is no project/user, it should just write files and skip any provisioning. This current implementation seems quite laser focused on the VSCE use case, but i'd prefer to expand it to cover all flows.

expect(prompt.select).to.be.calledOnce;
expect(prompt.input).to.be.calledTwice;
expect(createFirebaseProjectStub).to.be.not.called;
});
Copy link
Contributor Author

@fredzqm fredzqm Oct 3, 2025

Choose a reason for hiding this comment

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

Still work. The validation is at prompt layer.

Image

expect(prompt.select).to.be.calledOnce;
expect(promptAvailableProjectIdStub).to.be.calledOnce;
expect(addFirebaseProjectStub).to.be.not.called;
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This still works. I moved the validation into promptAvailableProjectId.

@fredzqm fredzqm force-pushed the fz/fdc-no-login-init branch from d362d3d to edbb6df Compare October 6, 2025 15:56
@fredzqm fredzqm enabled auto-merge (squash) October 6, 2025 18:23
@fredzqm fredzqm disabled auto-merge October 6, 2025 18:23
@fredzqm fredzqm changed the title [VS Code] Support projectless & loginless emulator experience firebase init no longer requires login if no project is selected Oct 6, 2025
@fredzqm fredzqm enabled auto-merge (squash) October 6, 2025 18:24
@fredzqm fredzqm merged commit 8cf3685 into master Oct 6, 2025
60 of 61 checks passed
@fredzqm fredzqm deleted the fz/fdc-no-login-init branch October 6, 2025 18:48
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions Oct 6, 2025
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