$ show jsonresume/resume-cli
The resume-cli is a command-line tool for managing JSON Resume files. It provides commands to initialize, validate, export (to HTML/PDF), and serve a resume locally. The codebase follows a modular structure with separate modules for each command (init, validate, export, serve) and shared utilities for input handling, schema loading, validation, and theme-based rendering. The application uses the commander package for CLI argument parsing, relies on external themes for rendering, and supports multiple input formats (JSON, YAML, directory via quaff). Despite being archived per the README (development moved to a monorepo), the code demonstrates clean separation of concerns, proper error handling, and test coverage for core functionalities.
The LLM identified 2 files worth highlighting for reuse:
Abstracts resume data retrieval from multiple sources (file, stdin, directory) with automatic MIME-type detection and pluggable parsers for JSON/YAML. Isolated dependency on external mime-types, quaff, and stream-to-string libraries makes it reusable in any project needing flexible input handling.
Resolves theme paths (local, npm package, or shorthand) and invokes the theme's render function. Decouples theme loading from rendering logic, supporting both local development paths and installed themes. Minimal dependencies (only path) and clear error handling enable reuse in other theme-based systems.