Provide build commands, architecture overview, and tech stack summary to help future Claude Code instances be productive quickly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.2 KiB
2.2 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
CV Generator - A Python tool that generates polished PDF CVs from Markdown files with YAML frontmatter. Reads structured CV data and cover letter content, renders them into professionally styled PDFs using Jinja2 templates and WeasyPrint.
Commands
# Run the application
uv run cv path/to/your_cv.md # Generate CV to default output
uv run cv path/to/your_cv.md -o out.pdf # Specify custom output path
# Development environment (with Nix)
nix develop # Enter dev shell with all dependencies
# Code quality (run in nix develop shell or via pre-commit)
basedpyright # Type checking
ruff check # Linting
ruff format # Code formatting
# Testing
pytest # Run test suite
Architecture
Data Flow:
- Input: Markdown file with YAML frontmatter + optional image/signature assets
- Parsing:
main.pyuses Typer CLI, callsgenerator.pywhich parses withpython-frontmatter - Validation: YAML frontmatter validated via Pydantic models in
models.py - Rendering: Jinja2 template (
cv.html.j2) populated with data, styled bycv.css - Output: WeasyPrint converts HTML+CSS to PDF
Key Files:
main.py- CLI entry point (Typer)src/cv_generator/generator.py- Core PDF generation logicsrc/cv_generator/models.py- Pydantic data models (CVData, ContactInfo, Experience, etc.)src/cv_generator/cv.html.j2- Jinja2 HTML template (two-column layout)src/cv_generator/cv.css- WeasyPrint-compatible CSS stylingexample/alberteinstein.md- Reference example showing complete YAML structure
Template Structure:
- Two-column layout: sidebar (photo, contact, skills) + main content (cover letter, experience)
- Separate
@pagerules for letter vs CV pages - Uses Fira Sans Condensed fonts and Bootstrap Icons
Tech Stack
- Python 3.13, Typer (CLI), Pydantic (validation), Jinja2 (templates), WeasyPrint (PDF)
- Build: Nix Flakes with uv2nix, uv package manager
- Quality: BasedPyright, Ruff, Commitizen (commit messages)