Publishing blog posts from Claude Code

I can write my posts from terminal or claude interface now. I type or talk into Claude Code, and the post lands on my blog as a draft. Then I read it, fix what I want, and publish.

Here is how it works and why I think it is worth setting up.

The mechanism

There are only two pieces.

Lykhari has an API for posts. Claude Code can make requests to it. That is it.

You generate a token in your Lykhari settings. You give that token to Claude Code. When you ask it to write something, it sends the post to your blog with that token attached. Your blog checks the token, sees which blog it belongs to, and saves the post.

No background runs, syncs.

Why this is worth doing

The writing happens where the thinking happens. If you already spend your day in a terminal, opening a browser tab to write is a small tax. Small taxes are why drafts never get written.

Drafts stop dying in note apps. Most half finished posts I have ever written are sitting in some file I will never open again. A draft that is already on the blog is a draft I will actually come back to.

You can talk through the messy first version. Explaining something out loud is easier than writing it well the first time. You can ramble, and then ask for it to be tightened up.

Nothing gets published without you. The post arrives as a draft. You read it in the dashboard, edit it, and press publish yourself. The token can create posts, and you decide what the world sees.

No new tool to learn. If you use Claude Code already, there is nothing to install. If you do not, this is not a good enough reason on its own to start.

Talking instead of typing

Your computer already does dictation, and it works in a terminal like it works anywhere else.

On Windows, press Windows + H. On a Mac, turn on Dictation in Keyboard settings and press the shortcut it gives you. On both, you talk and the words appear wherever the cursor is.

The way I use it: I say roughly what I want to say, badly, in whatever order it comes out. Then I ask for it to be cleaned up and kept in my voice. Speaking gets you past the blank page, and the blank page is usually the whole problem.

A tip that took me a while to learn. Do not dictate a finished post. Dictate the argument. What am I claiming, why do I believe it, what would I say to a friend who disagreed. The writing is easier once the thinking is out of your head.

Doing this with Lykhari

You need a paid Lykhari account. Three steps, and the middle one is copy and paste.

1. Get your token.

In your dashboard, go to settings and generate a personal access token. It starts with lykh_. You only see it once, so copy it somewhere safe. Making a new one replaces the old one.

2. Paste this prompt.

Open Claude Code, or Codex, or whichever assistant you use, and paste this in. Fill in the two blanks:

Read the Lykhari API docs at https://blog.lykhari.com/api-docs

Then write a blog post about [WHAT YOU WANT TO WRITE ABOUT]
and save it to my blog as a draft.

My token: lykh_paste_your_token_here

That is the whole thing. The docs page tells it where to send the post and what the request should look like. The token tells your blog that it is you.

If you would rather talk than type, this is the version I use most. Turn on dictation, and say the middle part out loud for as long as you like:

Read the Lykhari API docs at https://blog.lykhari.com/api-docs

Below is me talking through something I want to post. Turn it into
a blog post in my voice. Keep it plain. Save it to my blog as a draft.

[TALK HERE. Ramble. Say what you think and why. Out of order is fine.]

My token: lykh_paste_your_token_here

The more you say about what you actually think, the less generic the draft comes back.

3. Read it and publish.

Open your dashboard. The draft is sitting there like any other post. Read it properly, change anything that does not sound like you, and press publish.

If you are curious what it actually does

Nothing clever. One request:

curl -X POST https://yourname.lykhari.com/api/posts \
  -H "Authorization: Bearer lykh_paste_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "What I learned this week",
    "markdown": "The first paragraph goes here.\n\n## A heading\n\nMore writing.",
    "status": "DRAFT"
  }'

You send markdown. Lykhari turns it into the format the editor uses, so the draft opens in the dashboard as a normal post you can edit by hand.

Two limits worth knowing. You can create ten posts a day through the API, which is more than anyone needs and enough to stop a mistake from filling your blog. And token management always needs you signed in to the dashboard, so a token can never be used to make itself another token.

Is this for you

If you write in a terminal all day, this removes a step you were not enjoying anyway.

If you do not, you will not miss much. Writing a post in the Lykhari editor takes about as long. The point of this is not speed. It is catching the post you would otherwise not have written, on the day you felt like writing it.