CLI tool to screen CVs against a Job Description using Google Gemini and Notion
Project description
AI Recruitment Scanning Agent
A CLI tool that screens CVs against a Job Description using Google Gemini and populates a Notion database with ranked candidate profiles.
Stack
- Python 3.9+ with Typer CLI
- Google Gemini 1.5 Flash — JD parsing + CV analysis
- Notion API — candidate record storage
- pdfplumber / python-docx — PDF and DOCX text extraction
Setup
# 1. Clone and enter the repo
git clone <repo-url> && cd ai-recruitment-cli-agent
# 2. Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Configure environment variables
cp .env.example .env
Edit .env:
GOOGLE_GEMINI_API_KEY=your_gemini_api_key
NOTION_API_KEY=your_notion_integration_secret
DEFAULT_NOTION_DB_ID=your_notion_database_id
Notion Setup
- Create an integration at notion.so/my-integrations with Read, Insert, and Update permissions.
- Share your target database with the integration (database
•••> Connections). - Required database properties:
| Property | Type |
|---|---|
| Candidate Name | Title |
| Contact Number | Phone |
| Skills | Multi-select |
| Position Title (JD) | Text |
| Job ID (JD) | Text |
| Experience Summary | Text |
| AI Ranking Reason | Text |
| Match Score | Number |
| Ranking Category | Select (High Fit, Medium Fit, Low Fit) |
| Status | Select (New - AI Processed) |
| CV Filename | Text |
| Processing Date | Date |
Usage
# Show help
python main.py
python main.py process --help
# Run
python main.py process <CV_FOLDER> <JD_PDF> [--notion-db-id <DB_ID>]
# Example
python main.py process ./cvs/ ./jds/job_description.pdf --notion-db-id xxxx-xxxx-xxxx
--notion-db-id overrides DEFAULT_NOTION_DB_ID from .env.
What it does
- Validates API keys and Notion database access on startup.
- Extracts text from the JD PDF and pulls out Position Title and Job ID via Gemini.
- Iterates all
.pdfand.docxfiles in the CV folder. - For each CV: extracts text, sends to Gemini with the JD for scoring (0–100), ranking, and structured field extraction.
- Checks Notion for duplicates by email + Job ID before inserting.
- Prints a summary table of processed / skipped / failed counts.
Tests
pip install pytest pytest-mock
pytest tests/ -v
Troubleshooting
| Issue | Fix |
|---|---|
GOOGLE_GEMINI_API_KEY not found |
Check .env is present and key is valid |
NOTION_API_KEY not found |
Verify integration secret in .env |
Notion initialization failed |
Confirm database is shared with the integration |
Could not extract text from JD PDF |
PDF may be scanned/password-protected |
| Duplicate entries appearing | Ensure Email and Job ID (JD) properties exist with exact names |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ai_recruitment_agent-0.1.0.tar.gz
(335.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ai_recruitment_agent-0.1.0.tar.gz.
File metadata
- Download URL: ai_recruitment_agent-0.1.0.tar.gz
- Upload date:
- Size: 335.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20ce287cec14a06add436300863b14b38237c757278129686376c1888d1b5001
|
|
| MD5 |
680f993e6deb2f2f9f19c7d3e2fd9609
|
|
| BLAKE2b-256 |
25e8ce8f6c865d070e7522fb4662e0d5d297035da9a780496d8d90787aae5f94
|
File details
Details for the file ai_recruitment_agent-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ai_recruitment_agent-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a3ae44905112cd902214ffcb688f17bd1848fa913e135629db09b409e549f12
|
|
| MD5 |
084afc2ab7daa129f93d9b5a93ecb09d
|
|
| BLAKE2b-256 |
46983aaa0808982dd7b9c5d389d6b732620697ecb43f18bcb01bb4b82bd9d896
|