Skip to content

Generate recipes-v5.csv for Moderne CLI#277

Draft
timtebeek wants to merge 5 commits intomainfrom
timtebeek/generate-recipes-csv
Draft

Generate recipes-v5.csv for Moderne CLI#277
timtebeek wants to merge 5 commits intomainfrom
timtebeek/generate-recipes-csv

Conversation

@timtebeek
Copy link
Copy Markdown
Member

Summary

Add CSV marketplace support for the Moderne CLI by generating recipes-v5.csv with all available recipes across maven, npm, and pip ecosystems. Includes comprehensive metadata matching the Moderne CLI CSV format specification.

Changes

  • RecipesCsvWriter.kt (new): Generates recipes-v5.csv with ecosystem-aware package names, recipe metadata, hierarchical categories with descriptions, options with examples, and data tables with column definitions
  • RecipeMarkdownGenerator.kt: Write CSV to both OpenRewrite and Moderne docs output directories
  • VersionWriter.kt: Add CSV Installation section to the version documentation with instructions and download link

The CSV includes all recipes (open-source and proprietary) with proper RFC 4180 escaping and structured JSON metadata.

Add support for CSV-based recipe installation by generating recipes-v5.csv
with all available recipes (maven, npm, pip ecosystems). Match the Moderne
CLI column format: ecosystem, packageName, requestedVersion, version, name,
displayName, description, recipeCount, categories with descriptions, options
with examples, and data tables with column definitions. Add a CSV Installation
section to the version docs with download link.
@timtebeek
Copy link
Copy Markdown
Member Author

Still need to verify the file generated, and placement in rewrite-docs.

@timtebeek timtebeek added the documentation Improvements or additions to documentation label Feb 18, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Ready to Review in OpenRewrite Feb 19, 2026
@timtebeek timtebeek marked this pull request as draft February 20, 2026 09:23
@timtebeek
Copy link
Copy Markdown
Member Author

I'm not quite happy with duplicating the CSV write logic here; I worry that it might turn out to be fragile or wrong, especially if we are to encourage folks to use this format for new CLI installations.

I'd briefly explored whether we could reuse org.openrewrite.marketplace.RecipeMarketplaceWriter#toCsv(org.openrewrite.marketplace.RecipeMarketplace, java.nio.file.Path) here to create the CSV, but that requires a org.openrewrite.marketplace.RecipeMarketplace which we have not adopted here yet, as loading recipes in that way skips some of the details we need, like examples for the docs.

Perhaps we can explore alternatives, like a job that periodically loads all recipes using mod and pushes it's CSV into the docs repo, to avoid this fragile duplication.

@timtebeek timtebeek moved this from Ready to Review to In Progress in OpenRewrite Apr 8, 2026
Use the Moderne CLI itself to install all recipe modules into a local
marketplace and export recipes-v5.csv, rather than re-implementing CSV
generation in Kotlin. This keeps the CSV format in sync with the CLI
and removes 210 lines of custom serialization code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants