Welcome aboard! 🚀 Vibe is a Go-based CLI tool that leverages Google’s Gemini AI API to generate Protocol Buffer (.proto) files and Prisma schema (.prisma) files based on your specifications. Whether you’re architecting gRPC services, setting up a modern ORM layer, or exploring AI-driven code generation, Vibe has got your back.
- Flexible generation: Create
.proto,schema.prisma, or both in one go. - Customizable models: Pick your favorite Gemini model (default:
gemini-2.0-flash). - Smart extraction: Automatically strips AI chat markdown, giving you clean code output.
- Go 1.18+ installed on your machine.
- A valid Google API Key with access to Gemini API (set as
GOOGLE_API_KEY).
- Install
go install github.com/Raezil/vibe@latest
vibe \
-prompt "<YOUR SPECIFICATION>" \
-generator <proto|prisma|both> \
-o example.proto \
-schema schema.prisma \
-model gemini-2.0-flash| Flag | Description | Default |
|---|---|---|
-prompt |
(Required) Input specification for generation | |
-generator |
Type of file to generate (proto, prisma, or both) |
proto |
-o |
Output filename for .proto |
example.proto |
-schema |
Output filename for Prisma schema | schema.prisma |
-model |
Gemini AI model to use | gemini-2.0-flash |
Tip: If you forget the
-promptflag, Vibe will prompt you to include it—no more guesswork!
- Generate only a
.protofilevibe -prompt "Create blog where users create posts and comments" -generator proto - Generate only a Prisma schema
vibe -prompt "Create blog where users create posts and comments" -generator prisma - Generate both files
vibe -prompt "Create blog where users create posts and comments" -generator both
- Flag parsing: Reads your CLI flags and validates them.
- GenAI client setup: Connects to Gemini AI using your
GOOGLE_API_KEY. - Prompt crafting: Builds a tailored prompt for
.protoand/or Prisma generation. - AI chat session: Sends the prompt to Gemini, receives AI-generated content.
- Code extraction: Strips away Markdown fences to isolate pure code.
- File writing: Saves the output to your specified filenames.
- Missing
GOOGLE_API_KEY: Make sure the environment variable is set:export GOOGLE_API_KEY=YOUR_KEY_HERETo get key go to the https://aistudio.google.com/apikey
- Invalid generator type: Use one of
proto,prisma, orboth. - Go version issues: Ensure you’re running Go 1.18 or newer.