npm.io
0.13.2 • Published 2d agoCLI

json2yamlresume

Licence
MIT
Version
0.13.2
Deps
7
Size
45 kB
Vulns
0
Weekly
0
Stars
1.5K

json2yamlresume

npm version npm downloads Node.js Version Discord

json2yamlresume is a command-line tool to convert JSON Resume to YAMLResume format.

Features

  • Format Conversion: Seamlessly convert JSON Resume to YAMLResume format
  • Structure Transformation:
    • Moves basics.location to top-level location object
    • Moves basics.profiles to top-level profiles array
    • Renames basics.label to headline
    • Renames location.countryCode to country
    • Renames education[].studyType to degree
    • Rename references[].reference to summary
    • Merges highlights arrays into summary fields as markdown unordered lists for projects, volunteer, and work sections
  • CLI Interface: Simple command-line interface for easy conversion
  • Validation: Built on top of YAMLResume's robust schema validation

Installation

npm install -g json2yamlresume

# or
yarn global add json2yamlresume

# or
pnpm add -g json2yamlresume

# or
bun add -g json2yamlresume

Usage

Convert a JSON Resume to YAMLResume
json2yamlresume input.json output.yaml

# or just call the command without the optional output path, in this case the
# output will be written to the same directory as the input file with the same
# name but with a .yml extension
json2yamlresume input.json
Show help
json2yamlresume --help
# or
json2yamlresume -h
Show version
json2yamlresume --version
# or
json2yamlresume -V

Example

Input (JSON Resume)
{
  "basics": {
    "name": "John Doe",
    "label": "Software Engineer",
    "email": "john@example.com",
    "location": {
      "city": "San Francisco",
      "countryCode": "US"
    },
    "profiles": [
      {
        "network": "GitHub",
        "username": "johndoe",
        "url": "https://github.com/johndoe"
      }
    ]
  },
  "work": [
    {
      "name": "Tech Corp",
      "position": "Senior Developer",
      "startDate": "2020-01",
      "summary": "Led development of web applications.",
      "highlights": [
        "Increased performance by 40%",
        "Mentored 5 junior developers"
      ]
    }
  ],
  "education": [
    {
      "institution": "University of California",
      "area": "Computer Science",
      "studyType": "Bachelor of Science",
      "startDate": "2018"
    }
  ]
}
Output (YAMLResume)
---
content:
  basics:
    name: John Doe
    headline: Software Engineer
    email: john@example.com
  education:
    - institution: University of California
      area: Computer Science
      degree: Bachelor of Science
      startDate: "2018"
  location:
    city: San Francisco
    country: US
  profiles:
    - network: GitHub
      username: johndoe
      url: https://github.com/johndoe
  work:
    - name: Tech Corp
      position: Senior Developer
      startDate: 2020-01
      summary: |-
        - Increased performance by 40%
        - Mentored 5 junior developers

Conversion Rules

1. Location and Profiles Movement
  • basics.location → top-level location
  • basics.profiles → top-level profiles
  • basics.labelbasics.headline
2. Education Field Mapping
  • education[].studyTypeeducation[].degree
3. Highlights Integration

The converter merges highlights arrays into summary fields as markdown unordered lists for these sections:

  • work[]
  • volunteer[]
  • projects[]

Example:

{
  "summary": "Led development team.",
  "highlights": ["Increased performance", "Mentored developers"]
}

Becomes:

summary: |-
  Led development team.

  - Increased performance
  - Mentored developers

Supported JSON Resume Sections

The converter supports all standard JSON Resume sections:

  • basics (with location/profiles extraction)
  • work (with highlights merging)
  • volunteer (with highlights merging)
  • education (with studyType → degree mapping)
  • awards
  • certificates
  • publications
  • skills
  • languages
  • interests
  • references
  • projects (with highlights merging)
  • YAMLResume - Resume as Code in YAML
  • JSON Resume - The open source initiative to create a JSON-based standard for resumes

License

MIT License - see LICENSE for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

If you find this tool helpful, consider supporting the YAMLResume project:

Buy Me a Coffee

Keywords