---
title: "Hashnode CLI: Publish and manage your blog from the terminal | Hashnode"
description: "Create drafts, posts, and many more from your terminal"
url: "https://hashnode.com/changelog/2026-10-06-hashnode-cli"
---

[All updates](https://hashnode.com/changelog) /

Hashnode CLI

Feature October 6, 2026

# Hashnode CLI: Publish and manage your blog from the terminal

[Ipseeta Priyadarshini](https://hashnode.com/@ipseeta)

You write in markdown. Publishing meant opening the editor and pasting it in. The Hashnode CLI cuts that to one command. Install it, log in through your browser, and publish a file straight from your terminal.

![Terminal showing hashnode login printing a code](https://cdn.hashnode.com/uploads/gql/54d750ac3adc13883c24a9be/f2aeca97-ec46-477c-87a1-2228313fd89e.png)

The CLI needs a **Pro plan** on the publication, and Node.js 20 or later.

## How to log in

Install it with npm, then run `hashnode login`. It prints a code and opens your browser. Type the code on the page and allow access. There is no token to copy.

```plaintext
npm install -g @hashnode/cli
hashnode login
```

![The page where you type the code from your terminal](https://cdn.hashnode.com/uploads/gql/54d750ac3adc13883c24a9be/75a9b625-3236-44be-ac83-1a4b7cc7838b.png)

A script, a CI job, or a coding agent has no browser. Set `HASHNODE_PAT` to a Personal Access Token from Settings, Developer instead.

## How to publish a post

Find your publication id first:

```plaintext
hashnode --host blog.example.com publication get
```

Then publish a markdown file with one command:

```plaintext
hashnode -p <id> post create --title "Hello" --content-file post.md --tag java --tag javascript
```

![Terminal output after publishing a post](https://cdn.hashnode.com/uploads/gql/54d750ac3adc13883c24a9be/e4e96138-310d-4d13-bf54-48ff32566ed7.png)

You get the link back. Want a look before it goes live? Save a draft with `draft create`, then run `draft publish`. Upload a cover with `image upload`. Add `--json` to any command when a script needs to parse the output.

## Where can I see my logins

Every login shows up under Connected apps in Developer Settings. Disconnect one and the CLI stops working at once. To end the login from your terminal, run `hashnode logout`.

![Connected apps in Developer Settings listing Hashnode CLI](https://cdn.hashnode.com/uploads/gql/54d750ac3adc13883c24a9be/dce0149c-f00b-41d6-ba81-911e8b7a5859.png)

Run `hashnode --help` to see every command.

## More updates

[All updates](https://hashnode.com/changelog)

[AEO toolkit: Start tracking with suggested queries Improvement Oct 7](https://hashnode.com/changelog/2026-10-07-aeo-suggested-queries)[MCP connect: Give Claude, ChatGPT, or Codex read and write access to your posts" Feature Sep 22](https://hashnode.com/changelog/2026-09-22-mcp-connect)[GraphQL image uploads: presignedPost is deprecated Deprecated Sep 1](https://hashnode.com/changelog/2026-09-01-presigned-post-deprecated)[AEO toolkit: See who else gets cited, and how much traffic AI sends you Feature Aug 25](https://hashnode.com/changelog/2026-08-25-aeo-citations-and-traffic)[Growth Plan with AEO toolkit: Get your posts cited by AI answer engines Feature Aug 12](https://hashnode.com/changelog/2026-08-12-aeo-toolkit)
