Skip to content

Add support for markdown output format in crystal docs command #15818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kojix2
Copy link
Contributor

@kojix2 kojix2 commented May 23, 2025

Hello,

This pull request adds Markdown documentation generation to the crystal docs command, utilizing Vibe Coding techniques for the Crystal language.

crystal docs --format markdown

Background

Recently, Vibe Coding (AI-assisted coding) has become increasingly popular. However, AI is not always familiar with the details of Crystal's libraries and APIs. Therefore, when explaining a library's API to an AI, a documentation format that is easy for both humans and AI to read is essential.
Markdown is the optimal format for such communication.

Development Process

This feature was developed through the following process:

  1. Investigated how to add Markdown output to crystal docs using DeepUncyclo.com
  2. Created an implementation plan on DeepUncyclo.com
  3. Reviewed and refined the plan on DeepUncyclo.com to make it simpler and more robust
  4. Reviewed the proposal with VSCode/Cline (ChatGPT 4o)
  5. Implemented the feature with VSCode/Cline (Sonnet-3.7)
  6. Built, tested, and fixed issues with VSCode/Cline (Sonnet-3.7)

Summary

This pull request demonstrates which files need to be modified within the relatively large Crystal project to enable this functionality. I hope the Crystal team will consider an official implementation.

@straight-shoota
Copy link
Member

Please open an issue first to further discuss the feature independent of its implementation (c. f. https://github.com/crystal-lang/crystal/blob/master/CONTRIBUTING.md#using-the-issue-tracker). Thanks 🙇

@straight-shoota straight-shoota marked this pull request as draft May 23, 2025 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants