Skip to content

yukinagae/genkit-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

genkit-sample

genkit-sample is your starting point for learning about Firebase Genkit, an open-source framework that helps developers create AI-powered applications.

Requirements

Before you start, make sure you have these installed:

  • Node.js version 22 or later
  • npm
  • Genkit

For Genkit installation, see the official guide.

Check your installations by running:

$ node --version # the below version is on my environment
v22.4.1
$ npm --version # the below version is on my environment
10.7.0
$ genkit --version # the below version is on my environment
0.5.4

Setup

Install Project Dependencies: Open your terminal, navigate to this project's folder, and run:

$ npm install

Usage

  1. Set the OPENAI_API_KEY Environment Variable

Before running the project, you need to provide your OpenAI API key. This key allows your application to communicate with OpenAI's services. Replace your_api_key with the actual API key you obtained from OpenAI.

$ export OPENAI_API_KEY=your_api_key
  1. Run the Genkit server locally

This command starts the project and automatically opens your default web browser to http://localhost:4000.

$ npm run genkit

Now you can play with it!

Making Changes

Building the Project

After making changes, you might need to build the project to see your changes in action:

$ npm run build

Formatting and Linting

To ensure your code follows the project's coding standards, run the formatting and linting tools:

$ npm run typecheck # type check without modifying files
$ npm run check     # scan without modifying files
$ npm run fix       # modify files

Thanks

Big thanks to:

License

MIT