All writing
ToolingNov 29, 2026Brion Mario

Introducing `Medmark`

Move your Medium writing somewhere you own, with one command, or one sentence to your coding agent.

Introducing `Medmark`

Move your Medium writing somewhere you own, with one command, or one sentence to your coding agent.

Medium is not a bad place to write. The editor stays out of your way, the network is real, and people still read there.

The catch is that none of it is really yours. Your posts live on Medium’s servers, behind Medium’s paywall, at Medium’s URLs. And the day you want your writing somewhere you actually control, you are staring at a long afternoon of copy paste, fixing headings by hand, and re-uploading images one by one since Medium does not have an official API.

I hit exactly that wall when I started my own blog at brionmario.com/blog. Years of posts on Medium, and no clean way to bring them home.

So I built Medmark.

What is Medmark?

Medmark is a small CLI that takes your Medium export archive and turns it into clean Markdown or MDX. Every post comes out with proper front matter, working image links, and a body that looks like something you wrote in your editor, not something a converter coughed up.

It is built to drop straight into a static site. Next.js, Astro, Hugo, whatever you run.

Want to see it working? My own blog at brionmario.com/blog runs on posts that came out of Medmark.

The initial commit goes all the way back to December 2022. That is pre-AI era, as far as my workflow goes. Every line of it was written by hand, one broken post at a time. Recently I gave it a proper facelift with the help of Claude, and added the part I will get to in a minute. Medmark now ships a skill, so your coding agent can run the whole migration for you.

Before you start

You need two things.

  1. Node 18 or newer (20 or newer if you want the agent to build you a blog, since the starter is on Next 16). Grab it from nodejs.org/en/download if you do not have it yet. Run node -v to check what you are on.
  2. Your Medium export : On Medium, go to Settings → Security and apps → Download your information. Medium emails you a zip, usually within minutes, occasionally hours. Unzip it and keep the posts folder handy. That is the only part Medmark cares about.

Note: Nobody can do that second step for you, agent included. Medium wants your password for it.

Two ways to do this

Option 01: The CLI

Nothing to install. npx will pull the medmark binary and run it on its own.

npx medmark

The CLI will then ask:

  • Where your Medium export is. Either the medium-export-<hash>.zip straight out of your Downloads folder, or the folder you unzipped it to. You can also point at the posts folder itself if that's all you kept. Dragging the file in from Finder works, the quotes it adds are stripped for you.
  • Where the Markdown should go. Defaults to medmark/output.
  • Whether you want the advanced options. Say no and you’re done. Say yes and it asks for a custom template, whether to include your drafts, and any files to skip.

Every post comes out as a folder under the selected output folder (defaultmedmark/output), named after the slug, with an index.md inside. Alongside them you get a registry.json listing everything it converted, and a conversion_report.json if you want to see what it did with each file.

Prefer to skip the wizard? Hit `npx medmark --help` and use the flags.

Option 02: Coding Agent (⭐️ Recommended)

This is the part that is new, and honestly the reason I am writing this post.

Medmark ships an agent skill for Claude Code, Codex, Cursor and friends. Installed, it takes the migration end to end, the conversion, a blog built from the output, and the deploy.

  • Install via Skills CLI (works across Claude Code, Codex and Cursor)
npx skills add brionmario/medmark
  • Or, if you are in Claude Code, as a plugin. Type these one at a time:
/plugin marketplace add brionmario/medmark
/plugin install medmark@medmark

Then just ask:

Convert my Medium export to Markdown and get it hosted.

That’s the whole interface. There’s no command to remember. The skill recognises what you’re after and takes over. (In Claude Code you can type /medmark to summon it explicitly, if it doesn't catch on its own.)

Here is what it actually does with that.

  • It converts your archive. It finds the export, scaffolds the folders, runs the CLI. If it cannot find an archive it stops and asks, rather than inventing sample posts.
  • It makes it your blog, not an export. Before it builds anything it asks whose blog this is, your name, what you do, a line about yourself, wherever you want to link. That goes into one typed config file, and every section with nothing to say hides itself. It will not invent a career you do not have.
  • It previews, then deploys. A local preview first, then a static build, then any static host. Vercel, Netlify, Cloudflare Pages and GitHub Pages are all covered.

The starter is a plain Next.js project, so you can clone it and use it without an agent too.

Keep it in sync, too. Nothing here is a one-way door: keep writing on Medium if that is where your readers are, then re-export, re-run, and copy the output across. Your blog catches up. Same rules every run, so the second pass is a small diff rather than a fresh interpretation of your writing. The only gotcha is that posts you deleted on Medium stay in your output folder until you clear it.

“Can’t an agent just all this? including the scraping”

Fair question, and I built the agent skill, so I’ve thought about it.

When a model converts your posts, conversion becomes a generative step, and that’s exactly wrong for an archive. It will quietly fix a typo, smooth a clumsy sentence, drop a line it judged redundant. Each is defensible, together they mean the post on your new blog isn’t the post you wrote. A parser has no opinion about your prose.

It’s also never the same twice. Thirty-one posts means thirty-one interpretations of what the front matter is called and which image is the hero, and thirty-one new ones next year. Consistent rules are what make registry.json, RSS and the sitemap possible at all.

So, model where judgement helps, parser where fidelity matters. The skill finds your archive, asks who you are, picks a look, deploys it, all genuinely fuzzy. For the conversion it runs `npx medmark`, same as you would.

Going further

The defaults get most people where they need to be. When they do not, Medmark has a few more tricks.

  • Own your images. By default, posts keep the original Medium CDN links, so there is nothing extra to host. Flip one option and Medmark downloads every image locally and rewrites the links to match.
  • Custom templates. A small template file gives you full control over the front matter, file names, folder layout and body, without touching Medmark’s source.
  • More than JSON. The content registry can emit a typed TypeScript module, an RSS feed and a sitemap as well, out of the same run. Feeds need a site URL to build absolute links.

All of that is covered in the advanced usage docs.

What to expect

A few honest notes before you point it at ten years of writing.

  • It depends on Medium’s export format. Medmark parses the HTML Medium hands you in the export, plus a little scraping for metadata like the description. If Medium changes that format, things can break until the parser catches up.
  • Embeds are hit or miss. Tweets and gists usually survive. Some of the fancier Medium embeds do not.
  • Check the output. Open a few posts, especially the oldest and the longest, before you call it done. That is where conversion glitches show up.

If something comes out wrong, please open an issue. I only have my own archive to test against, so every post that trips the parser up is a case I cannot find on my own.

Give it a go

If you have writing stuck on Medium and you want it somewhere you own, try Medmark .

The code and docs live at github.com/brionmario/medmark. Pull requests welcome too.

And when your blog is live, add it to the showcase — that link opens the file in GitHub’s editor, so it really is one object appended to a JSON array. The bar is low on purpose: publicly reachable, some of it converted with Medmark, not a link farm. A personal blog with three posts on it is as welcome as a company engineering site. I would love to see what you make.

Signing off… ✌️❤️

Tooling · 2026Read on Medium

Keep reading

Jul 6

Write better commit messages

Apr 14

Why we migrated to PNPM?

Sep 3

🦋 Changesets is a game changer