npm package: @khannara/resume-generator
Description: Markdown-to-PDF resume generator with professional themes. Single source of truth for your career.
Author: Khannara Phay
Latest version: 1.0.0

# @khannara/resume-generator

Markdown-to-PDF resume generator with professional themes. **Single source of truth for your career.**

[![npm version](https://img.shields.io/npm/v/@khannara/resume-generator.svg)](https://www.npmjs.com/package/@khannara/resume-generator)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Why This Exists

Your resume shouldn't be a Word doc that gets out of sync across 5 different versions. This tool lets you:

- **Maintain one markdown file** as the source of truth
- **Generate professional PDFs** with a single command
- **Version control your career** with Git
- **Automate updates** in CI/CD pipelines

Built for developers who want their resume workflow to be as clean as their code.

## Installation

```bash
npm install -g @khannara/resume-generator
```

### Prerequisites

This package requires two system dependencies:

```bash
# Windows
winget install JohnMacFarlane.Pandoc
winget install wkhtmltopdf.wkhtmltox

# macOS
brew install pandoc wkhtmltopdf

# Linux (Debian/Ubuntu)
sudo apt install pandoc wkhtmltopdf
```

Verify installation:

```bash
resume-gen check
```

## Quick Start

```bash
# Create a sample resume
resume-gen init

# Edit resume/resume.md with your information

# Generate PDF
resume-gen build resume/resume.md -o public/resume.pdf
```

## Usage

### CLI Commands

```bash
# Build PDF from markdown
resume-gen build <input.md> [options]

Options:
  -o, --output <path>     Output PDF path (default: "resume.pdf")
  -t, --theme <name>      Theme: modern, classic, minimal (default: "modern")
  -p, --page-size <size>  Page size: letter, a4 (default: "letter")
  -m, --margin <inches>   Page margins (default: "0.75in")
  -v, --verbose           Enable verbose output

# Check dependencies
resume-gen check

# List available themes
resume-gen themes

# Create sample resume.md
resume-gen init [-o path]
```

### Programmatic API

```typescript
import { convert, checkDependencies } from '@khannara/resume-generator';

// Check if dependencies are installed
const deps = checkDependencies();
if (!deps.pandoc || !deps.wkhtmltopdf) {
  console.error('Missing dependencies');
  process.exit(1);
}

// Convert markdown to PDF
const result = await convert({
  input: 'resume/resume.md',
  output: 'public/resume.pdf',
  theme: 'modern',
  pageSize: 'letter',
  margin: '0.75in',
});

if (result.success) {
  console.log(`Generated: ${result.outputPath}`);
} else {
  console.error(`Failed: ${result.error}`);
}
```

## Themes

### Modern (default)
Clean, minimalist design with subtle accent colors. Best for tech roles.

### Classic
Traditional format using serif fonts. ATS-friendly, suitable for conservative industries.

### Minimal
Ultra-simple, content-focused design. Maximum readability.

### Custom Themes

Use your own CSS file:

```bash
resume-gen build resume.md --theme ./my-theme.css
```

## Resume Markdown Format

```markdown
# Your Name

**Your Title**

City, State | email@example.com | yourwebsite.com | linkedin.com/in/you

---

## Summary

Brief 2-3 sentence summary of your experience.

---

## Experience

### Job Title
**Company Name** | Year — Present

- Key achievement with metrics
- Another accomplishment
- Technical skills demonstrated

---

## Technical Skills

**Languages:** JavaScript, TypeScript, Python
**Frameworks:** React, Node.js, Next.js

---

## Education

**Degree, Major**
University Name | Year — Year
```

## Integration with Portfolio Projects

Add to your `package.json`:

```json
{
  "scripts": {
    "resume:build": "resume-gen build resume/resume.md -o public/resume.pdf --theme modern"
  }
}
```

### GitHub Actions Auto-Build

```yaml
name: Build Resume

on:
  push:
    paths:
      - 'resume/resume.md'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y pandoc wkhtmltopdf

      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: '20'

      - name: Build resume
        run: |
          npm install -g @khannara/resume-generator
          resume-gen build resume/resume.md -o public/resume.pdf

      - name: Commit PDF
        run: |
          git config user.name github-actions
          git config user.email github-actions@github.com
          git add public/resume.pdf
          git commit -m "chore: rebuild resume PDF" || exit 0
          git push
```

## Contributing

Contributions welcome! Please read the [contributing guidelines](CONTRIBUTING.md) first.

## License

MIT © [Khannara Phay](https://khannara.dev)