Skip to content

jerinthomas1404/gocvg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gocvg - Go Cover Letter Generator

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.

Features

  • 📄 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

Prerequisites

  • Go 1.25.3 or higher
  • A Google Gemini API key (Get one here)

Installation

1. Clone the repository

git clone https://github.com/jerinthomas1404/gocvg.git
cd gocvg

2. Install dependencies

make deps

Or manually:

go mod download
go mod tidy

3. Set up your API key

Export 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 ~/.zshrc

4. Build the binary (optional)

make build

Or install globally:

make install

Usage

Basic Usage

go run main.go -resume=path/to/resume.pdf -jd=path/to/job-description.txt

Using the built binary

./bin/gocvg -resume=path/to/resume.pdf -jd=path/to/job-description.txt

Using Make

make run ARGS="-resume=resume.pdf -jd=job-description.txt"

Example

# 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 clipboard

Make Commands

The 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

Modifying Make Targets

Common modifications:

  1. Change the binary name: Edit the BINARY_NAME variable at the top
  2. Add new build flags: Modify the build target
  3. Add pre-commit hooks: Create a new pre-commit target
  4. Add linting: Create a lint target with your preferred linter

Project Structure

.
├── main.go              # Main application code
├── go.mod               # Go module dependencies
├── Makefile             # Build automation
├── job-description.txt  # Sample job description
└── README.md            # This file

How It Works

  1. Input: Takes your resume (PDF) and job description (text file) as inputs
  2. AI Analysis: Sends both to Google's Gemini AI with a carefully crafted prompt
  3. 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)
  4. Output: Copies the generated cover letter to your clipboard for easy use

Dependencies

Development

Format code before committing

make fmt
make vet

Run tests

make test

Clean build artifacts

make clean

Troubleshooting

API Key not set

Error: GEMINI_API_KEY environment variable is not set

Solution: Export your API key as described in the Installation section.

Clipboard copy failed

If clipboard copy fails, the cover letter will still be printed to the terminal.

File not found

Failed to read resume PDF: no such file or directory

Solution: Ensure the paths to your resume and job description are correct.

License

MIT License - feel free to use and modify as needed.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors