Skip to content

feat: creation of a new export command for rdme-compatible files#1468

Merged
erunion merged 9 commits into
nextfrom
feat/export-command
May 18, 2026
Merged

feat: creation of a new export command for rdme-compatible files#1468
erunion merged 9 commits into
nextfrom
feat/export-command

Conversation

@erunion
Copy link
Copy Markdown
Member

@erunion erunion commented May 16, 2026

🚥 Resolves CX-2744

🧰 Changes

This creates new rdme docs export and rdme reference export commands that when used will export rdme-compatible files that you can then re-sync wtih rdme docs upload and rdme reference upload.

The reason we're creating this new command is that due to the way rdme and our Git bidirectional sync offering works, files in bidi are not directly compatible with rdme because rdme files do not have awareness of where it should live within the clients directory and sidebar structures. This product difference requires files synced with rdme to have their frontmatter heading be ReadMe API payloads -- a difference that has caused a number of issues with customers migrating to ReadMe Refactored.

When invoked, this command will download all guides and reference pages, and if they are not empty, store them in a supplied directory in the same fashion that they may be stored in a bidirectional sync repository.

Huge thanks to @rossrdme for the work he did in writing the original script that powers this work, I just put the rdme sauce on top.

🧬 QA & Testing

This is what it looks like:

$ ./bin/dev.js docs export --key=API_KEY ./output
✔ 📩 Exporting files from ReadMe... done!
✔ 🗃️  Restructuring files...done!

All files have been saved to: /Users/erunion/code/readme/rdme/output
$ ls -lah output
total 0
drwxr-xr-x  14 erunion  staff   448B May 15 17:14 .
drwxr-xr-x  36 erunion  staff   1.1K May 15 17:14 ..
drwxr-xr-x  12 erunion  staff   384B May 15 17:14 AI
drwxr-xr-x   7 erunion  staff   224B May 15 17:14 Administration
drwxr-xr-x   6 erunion  staff   192B May 15 17:14 Customizing Docs
drwxr-xr-x   6 erunion  staff   192B May 15 17:14 Developer Experience
drwxr-xr-x   9 erunion  staff   288B May 15 17:14 Getting Started
drwxr-xr-x  10 erunion  staff   320B May 15 17:14 Project Setup
drwxr-xr-x   6 erunion  staff   192B May 15 17:14 ReadMe Refactored
drwxr-xr-x   7 erunion  staff   224B May 15 17:14 Support
drwxr-xr-x   5 erunion  staff   160B May 15 17:14 Syncing Docs
drwxr-xr-x   3 erunion  staff    96B May 15 17:14 Syncing Your Content
drwxr-xr-x   6 erunion  staff   192B May 15 17:14 Version Control
drwxr-xr-x  11 erunion  staff   352B May 15 17:14 Writing Docs
$ ls -lah output/Getting\ Started/
total 88
drwxr-xr-x   9 erunion  staff   288B May 15 17:14 .
drwxr-xr-x  14 erunion  staff   448B May 15 17:14 ..
-rw-r--r--   1 erunion  staff   6.2K May 15 17:14 about-readme.md
-rw-r--r--   1 erunion  staff   3.1K May 15 17:14 ai-overview.md
-rw-r--r--   1 erunion  staff   209B May 15 17:14 asdfasdf.md
-rw-r--r--   1 erunion  staff   6.5K May 15 17:14 copy-of-welcome-to-readme.md
-rw-r--r--   1 erunion  staff   304B May 15 17:14 enterprise-guides.md
-rw-r--r--   1 erunion  staff   5.1K May 15 17:14 migration-moving-your-docs-to-their-new-home.md
-rw-r--r--   1 erunion  staff   4.8K May 15 17:14 quickstart.md
$ cat output/Getting\ Started/about-readme.md
---
appearance:
  icon:
    name: far fa-hand-wave
    type: icon
category:
  uri: Getting Started
content:
  excerpt: Helping you create docs that make your APIs easy to use and maintain.
metadata:
  description: Helping you create docs that make your APIs easy to use and maintain.
position: 0
privacy:
  view: public
slug: about-readme
title: Welcome to ReadMe
---
<Banner 
  header="A New ReadMe, Built to Work with AI" 
  href="https://readme.com/blog/may-launch"
  icon="fa-duotone fa-solid fa-rocket-launch"
  text="See what shipped"
/>

...

@erunion erunion added the enhancement New feature or request label May 16, 2026
@erunion erunion marked this pull request as ready for review May 16, 2026 00:19

import { branchFlag, keyFlag } from './flags.js';

type Section = 'Changelog' | 'Custom Pages' | 'Guides' | 'Reference';
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The export command currently only supports guides and references but because our upload command supports changelogs and custom pages I added some initial scaffolding throughout this work to eventually support those too.

@erunion erunion merged commit 2ab6109 into next May 18, 2026
10 checks passed
@erunion erunion deleted the feat/export-command branch May 18, 2026 16:19
erunion pushed a commit that referenced this pull request May 18, 2026
# [10.9.0-next.1](v10.8.0...v10.9.0-next.1) (2026-05-18)

### Features

* creation of a new `export` command for rdme-compatible files ([#1468](#1468)) ([2ab6109](2ab6109))

[skip ci]
@erunion
Copy link
Copy Markdown
Member Author

erunion commented May 18, 2026

🎉 This PR is included in version 10.9.0-next.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

erunion pushed a commit that referenced this pull request May 18, 2026
# [10.9.0](v10.8.0...v10.9.0) (2026-05-18)

### Bug Fixes

* empty commit to trigger a release ([7b960c5](7b960c5))

### Features

* creation of a new `export` command for rdme-compatible files ([#1468](#1468)) ([2ab6109](2ab6109))

[skip ci]
@erunion
Copy link
Copy Markdown
Member Author

erunion commented May 18, 2026

🎉 This PR is included in version 10.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants