Skip to content

Feature Request: Add cnb post create/upload/push for Markdown files #12

@neozhuang

Description

@neozhuang
---
title: Make cnblogs-cli more awesome
date: 2026-05-20 01:12:18
category:
  - [Primary category, secondary category]
tags:
  - cnblogs
  - cli
  - awesome-cnblogs-cli
---

cnblogs-cli tool is a simple and elegant command line tool. Thanks for your work.
If  we could publish our Markdown files to CNBlogs 
    directly from our terminal shell, that would be truly awesome.

<!-- more -->

---

### Intro

Many users write blog posts locally in Markdown (`*.md`) using editors 
    such as VS Code, Vim,  Neovim, Obsidian, or other note-taking tools. 
However, publishing these posts to CNBlogs still requires manual operations in the web editor or VS Code sidebar.
It would be very useful if `cnblogs-cli` could support uploading 
    or pushing local Markdown files directly as CNBlogs blog posts.

### Proposed Feature

Add a command to publish a local Markdown file to CNBlogs, for example:

`cnb post create ./my-post.md`
`cnb post upload ./my-post.md`
`cnb post push ./my-post.md`

The command could read the Markdown file content and create or update a CNBlogs post.

### Why We Need This CLI Feature

A CLI-based post upload/push feature would make CNBlogs publishing more efficient and developer-friendly.
Benefits include:
- Write posts locally with any preferred editor
- Keep blog posts under Git version control
- Reduce manual copy-and-paste from local Markdown files to the web editor
- Support a smoother writing workflow for developers
- Make it easier to automate publishing in scripts or CI workflows
- Help users manage CNBlogs posts like source code or documentation

### Possible Markdown Front Matter Support

It would be helpful if the Markdown file could include front matter metadata,  
    such as this issue description.

### Expected Result

The local Markdown file is uploaded to CNBlogs as a blog post, 
    and the user receives the post URL or post ID after a successful upload.

### Summary

Most CNBlogs users are developers, and developers rely heavily on terminals and keyboards. 
    Compared with GUI workflows, TUI workflows are more efficient.
Therefore, this feature would make `cnblogs-cli` much more useful for cnblogs users , 
    and let creators focus their time and attention on post's contents rather than the process of posting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions