A command-line tool that uses Google's Gemini AI to generate tailored, professional cover letters by analyzing your resume (PDF) and a job description.
- 📄 Analyzes your resume PDF and job description
- 🤖 Uses Gemini 2.5 Flash AI model for intelligent cover letter generation
- 📋 Automatically copies the generated cover letter to your clipboard
- ⚡ Fast and efficient CLI interface
- 🎯 Creates tailored cover letters using STAR methodology
- Go 1.25.3 or higher
- A Google Gemini API key (Get one here)
git clone https://github.com/jerinthomas1404/gocvg.git
cd gocvgmake depsOr manually:
go mod download
go mod tidyExport your Gemini API key as an environment variable:
export GEMINI_API_KEY="your-api-key-here"To make it permanent, add it to your shell profile (~/.zshrc, ~/.bashrc, etc.):
echo 'export GEMINI_API_KEY="your-api-key-here"' >> ~/.zshrc
source ~/.zshrcmake buildOr install globally:
make installgo run main.go -resume=path/to/resume.pdf -jd=path/to/job-description.txt./bin/gocvg -resume=path/to/resume.pdf -jd=path/to/job-description.txtmake run ARGS="-resume=resume.pdf -jd=job-description.txt"# Using go run
go run main.go -resume=my-resume.pdf -jd=job-description.txt
# Using the binary
./bin/gocvg -resume=my-resume.pdf -jd=job-description.txt
# The cover letter will be automatically copied to your clipboardThe project includes a Makefile for common development tasks:
| Command | Description |
|---|---|
make build |
Build the binary to bin/gocvg |
make run ARGS="..." |
Build and run the application with arguments |
make clean |
Remove build artifacts |
make test |
Run tests |
make fmt |
Format code using go fmt |
make vet |
Run go vet for code analysis |
make deps |
Install/update dependencies |
make install |
Install binary to $GOPATH/bin |
make help |
Display help with all available commands |
Common modifications:
- Change the binary name: Edit the
BINARY_NAMEvariable at the top - Add new build flags: Modify the
buildtarget - Add pre-commit hooks: Create a new
pre-committarget - Add linting: Create a
linttarget with your preferred linter
.
├── main.go # Main application code
├── go.mod # Go module dependencies
├── Makefile # Build automation
├── job-description.txt # Sample job description
└── README.md # This file
- Input: Takes your resume (PDF) and job description (text file) as inputs
- AI Analysis: Sends both to Google's Gemini AI with a carefully crafted prompt
- Generation: AI analyzes requirements and creates a tailored cover letter using:
- Top 3 core requirements from the job description
- 2-3 specific achievements from your resume
- STAR methodology (Situation, Task, Action, Result)
- Output: Copies the generated cover letter to your clipboard for easy use
- google.golang.org/genai - Google Generative AI SDK
- github.com/atotto/clipboard - Clipboard management
make fmt
make vetmake testmake cleanError: GEMINI_API_KEY environment variable is not set
Solution: Export your API key as described in the Installation section.
If clipboard copy fails, the cover letter will still be printed to the terminal.
Failed to read resume PDF: no such file or directory
Solution: Ensure the paths to your resume and job description are correct.
MIT License - feel free to use and modify as needed.
Contributions are welcome! Feel free to open issues or submit pull requests.