From bd645b90f0ec802395f9ac8522f62b2c012a52bc Mon Sep 17 00:00:00 2001 From: Pavel Jbanov Date: Thu, 9 May 2024 17:09:38 -0400 Subject: [PATCH 1/8] Added firebase emulator instructions --- docs/firebase.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/firebase.md b/docs/firebase.md index 3f4c8e061..e30792692 100644 --- a/docs/firebase.md +++ b/docs/firebase.md @@ -308,3 +308,23 @@ app: Open the web app by visiting the URL printed by the `deploy` command. The app requires you to sign in with a Google account, after which you can initiate endpoint requests. + +## Developing using Firebase Local Emulator Suite + +Firebase offers a suite of emualtors for local development and you can use Genkit with [Firebase Local Emulator Suite](https://firebase.google.com/docs/emulator-suite). + +To use Genkit with Firebase emulator start the emulator like this: + +```bash +GENKIT_ENV=dev firebase emulators:start --inspect-functions +``` + +this will run your code in the emulator and run genkit framework in dev mode which launches and exposes the Genkit reflection API (but not the Dev UI). + +To launch the Genkit Dev UI that talks to your code running inside the Firebase Emulator run this command: + +```bash +genkit start --attach http://localhost:3100 --port 4001 +``` + +To see traces from Firestore in the Dev UI you can navigate to the Inspect tab and toggle the "Dev/Prod" switch. When toggled to "prod" it will be loading traces from firestore. \ No newline at end of file From f9b8c299e24c235faaf0ed4ad806ebfbca757e17 Mon Sep 17 00:00:00 2001 From: Pavel Jbanov Date: Fri, 10 May 2024 11:39:34 -0400 Subject: [PATCH 2/8] Update docs/firebase.md Co-authored-by: Peter Friese --- docs/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/firebase.md b/docs/firebase.md index e30792692..c7c94d632 100644 --- a/docs/firebase.md +++ b/docs/firebase.md @@ -311,7 +311,7 @@ endpoint requests. ## Developing using Firebase Local Emulator Suite -Firebase offers a suite of emualtors for local development and you can use Genkit with [Firebase Local Emulator Suite](https://firebase.google.com/docs/emulator-suite). +Firebase offers a suite of emulators for local development and you can use Genkit with [Firebase Local Emulator Suite](https://firebase.google.com/docs/emulator-suite). To use Genkit with Firebase emulator start the emulator like this: From 6a1e1c96b19d6d16311f6d837193c7f2e851e2d8 Mon Sep 17 00:00:00 2001 From: Pavel Jbanov Date: Fri, 10 May 2024 11:39:45 -0400 Subject: [PATCH 3/8] Update docs/firebase.md Co-authored-by: Peter Friese --- docs/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/firebase.md b/docs/firebase.md index c7c94d632..28d67319d 100644 --- a/docs/firebase.md +++ b/docs/firebase.md @@ -313,7 +313,7 @@ endpoint requests. Firebase offers a suite of emulators for local development and you can use Genkit with [Firebase Local Emulator Suite](https://firebase.google.com/docs/emulator-suite). -To use Genkit with Firebase emulator start the emulator like this: +To use Genkit with the Firebase Emulator Suite, start the the Firebase emulators like this: ```bash GENKIT_ENV=dev firebase emulators:start --inspect-functions From 91bfd9af64b72bef212ab9e6bef09006ecda9ceb Mon Sep 17 00:00:00 2001 From: Pavel Jbanov Date: Mon, 13 May 2024 16:38:08 -0400 Subject: [PATCH 4/8] Update docs/firebase.md Co-authored-by: Kevin Cheung --- docs/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/firebase.md b/docs/firebase.md index 28d67319d..a2fc2c857 100644 --- a/docs/firebase.md +++ b/docs/firebase.md @@ -319,7 +319,7 @@ To use Genkit with the Firebase Emulator Suite, start the the Firebase emulators GENKIT_ENV=dev firebase emulators:start --inspect-functions ``` -this will run your code in the emulator and run genkit framework in dev mode which launches and exposes the Genkit reflection API (but not the Dev UI). +This will run your code in the emulator and run the Genkit framework in development mode, which launches and exposes the Genkit reflection API (but not the Dev UI). To launch the Genkit Dev UI that talks to your code running inside the Firebase Emulator run this command: From 898e3c9130abb25efa85e34e295247b50202f914 Mon Sep 17 00:00:00 2001 From: Pavel Jbanov Date: Mon, 13 May 2024 16:38:21 -0400 Subject: [PATCH 5/8] Update docs/firebase.md Co-authored-by: Kevin Cheung --- docs/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/firebase.md b/docs/firebase.md index a2fc2c857..2399ed5fa 100644 --- a/docs/firebase.md +++ b/docs/firebase.md @@ -321,7 +321,7 @@ GENKIT_ENV=dev firebase emulators:start --inspect-functions This will run your code in the emulator and run the Genkit framework in development mode, which launches and exposes the Genkit reflection API (but not the Dev UI). -To launch the Genkit Dev UI that talks to your code running inside the Firebase Emulator run this command: +Then, launch the Genkit Dev UI with the `--attach` option to connect it to your code running inside the Firebase Emulator: ```bash genkit start --attach http://localhost:3100 --port 4001 From 81cc031aeccd2b4ce17b519f8144b5b56bc0c182 Mon Sep 17 00:00:00 2001 From: Pavel Jbanov Date: Mon, 13 May 2024 16:38:42 -0400 Subject: [PATCH 6/8] Update docs/firebase.md Co-authored-by: Kevin Cheung --- docs/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/firebase.md b/docs/firebase.md index 2399ed5fa..21bfeade6 100644 --- a/docs/firebase.md +++ b/docs/firebase.md @@ -311,7 +311,7 @@ endpoint requests. ## Developing using Firebase Local Emulator Suite -Firebase offers a suite of emulators for local development and you can use Genkit with [Firebase Local Emulator Suite](https://firebase.google.com/docs/emulator-suite). +Firebase offers a [suite of emulators for local development](https://firebase.google.com/docs/emulator-suite), which you can use Genkit. To use Genkit with the Firebase Emulator Suite, start the the Firebase emulators like this: From de657e45cd5643d9401672094d03c5de8095251c Mon Sep 17 00:00:00 2001 From: Pavel Jbanov Date: Mon, 13 May 2024 16:39:43 -0400 Subject: [PATCH 7/8] Update docs/firebase.md --- docs/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/firebase.md b/docs/firebase.md index 21bfeade6..e0432f2b7 100644 --- a/docs/firebase.md +++ b/docs/firebase.md @@ -311,7 +311,7 @@ endpoint requests. ## Developing using Firebase Local Emulator Suite -Firebase offers a [suite of emulators for local development](https://firebase.google.com/docs/emulator-suite), which you can use Genkit. +Firebase offers a [suite of emulators for local development](https://firebase.google.com/docs/emulator-suite), which you can use with Genkit. To use Genkit with the Firebase Emulator Suite, start the the Firebase emulators like this: From c2ca5dc895661094dbd0b996c47ccc0d68772f77 Mon Sep 17 00:00:00 2001 From: Pavel Jbanov Date: Mon, 13 May 2024 16:56:03 -0400 Subject: [PATCH 8/8] format --- docs/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/firebase.md b/docs/firebase.md index e0432f2b7..79d86cd7a 100644 --- a/docs/firebase.md +++ b/docs/firebase.md @@ -327,4 +327,4 @@ Then, launch the Genkit Dev UI with the `--attach` option to connect it to your genkit start --attach http://localhost:3100 --port 4001 ``` -To see traces from Firestore in the Dev UI you can navigate to the Inspect tab and toggle the "Dev/Prod" switch. When toggled to "prod" it will be loading traces from firestore. \ No newline at end of file +To see traces from Firestore in the Dev UI you can navigate to the Inspect tab and toggle the "Dev/Prod" switch. When toggled to "prod" it will be loading traces from firestore.