New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

nostrpress

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

nostrpress

Turn your Nostr long-form posts (NIP-23) into a fast, standalone static blog.

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

NostrPress

npm version License: MIT

Turn your Nostr long-form posts (NIP-23) into a fast, standalone static blog. One command, no config.

📦 Available on npm: npmjs.com/package/nostrpress

How it works

  • You pass your npub or nprofile
  • NostrPress fetches your articles, profile, and comments from Nostr relays
  • It downloads media assets, caches them locally, and generates a static site into ./blog (or custom --out directory)
  • Drop that folder anywhere — any host, any framework

Run it

Direct CLI Arguments (via npx)

npx nostrpress npub1...
npx nostrpress npub1... --out ./public/blog --url https://myblog.com

Environment Variables

NPUB=npub1... npx nostrpress

Bun

bunx nostrpress npub1...

Output lands in ./blog/ (or your --out directory) — ready to serve.

Use with any framework

The generated ./blog folder is pure static HTML/CSS/JS. Output directly to your framework's public directory with --out (or copy it):

Vue (Vite)

// package.json
{
  "scripts": {
    "blog:fetch": "npx nostrpress npub1... --out ./public/blog",
    "dev": "vite",
    "build": "npm run blog:fetch && vite build",
    "preview": "vite preview"
  }
}

Blog lives at /blog/ alongside your Vue app. No vite config changes needed — Vite serves everything in public/ automatically.

React (Vite or CRA)

Vite + React:

{
  "scripts": {
    "blog:fetch": "npx nostrpress npub1... --out ./public/blog",
    "dev": "vite",
    "build": "npm run blog:fetch && vite build"
  }
}

Create React App:

{
  "scripts": {
    "blog:fetch": "npx nostrpress npub1... --out ./public/blog",
    "start": "react-scripts start",
    "build": "npm run blog:fetch && react-scripts build"
  }
}

Nuxt

{
  "scripts": {
    "blog:fetch": "npx nostrpress npub1... --out ./public/blog",
    "dev": "nuxt dev",
    "build": "npm run blog:fetch && nuxt build",
    "generate": "npm run blog:fetch && nuxt generate"
  }
}

Next.js

{
  "scripts": {
    "blog:fetch": "npx nostrpress npub1... --out ./public/blog",
    "dev": "next dev",
    "build": "npm run blog:fetch && next build"
  }
}

Plain HTML / Static Hosting

npx nostrpress npub1...
# serve ./blog with any static web server
npx serve ./blog

What you get

blog/
├── index.html          ← homepage with profile & post index
├── your-post-slug.html ← individual article pages
├── tags/
│   └── tag-name/
│       └── index.html  ← posts filtered by tag
├── assets/
│   ├── images/         ← downloaded & cached media assets
│   └── videos/         ← downloaded & cached video files
├── css/
│   ├── site.css        ← compiled stylesheet
│   └── print.css       ← print stylesheet
└── js/
    └── site.js         ← theme switcher & client helpers

CLI Options & Flags

FlagDescriptionDefault
<npub_or_nprofile>Your Nostr public key (npub1...) or profile (nprofile1...)Positional
-n, --npub <key>Explicit flag for npub or nprofile$NPUB
-o, --out <dir>Output folder for static blog./blog
-u, --url <url>Canonical site URL (enables RSS feed, sitemap & SEO tags)$SITE_URL
-r, --relay <relay>Custom relay URL (can be specified multiple times)Default relays + NIP-65
-c, --cleanClear local cache before buildingfalse
--no-mediaSkip downloading media assets locallyfalse
-h, --helpShow help message
-v, --versionShow version

Environment variables

VariableRequiredDescription
NPUB✅ yes (or pass as CLI arg)Your Nostr public key (npub1...) or profile (nprofile1...)
SITE_URLoptionalCanonical base URL (e.g. https://myblog.com). Enables RSS (/feed.xml), sitemap (/sitemap.xml), and canonical link tags.
OUTPUT_DIRoptionalOutput destination (default: ./blog)
RELAYSoptionalComma-separated list of custom relays
CLEANoptionalSet to true to clear cache before build

Example with Site URL & Custom Output

npx nostrpress npub1... --out ./public/blog --url https://myblog.com

This generates:

public/blog/
├── index.html     ← homepage with all posts & profile
├── feed.xml       ← RSS 2.0 feed (latest 20 posts)
├── sitemap.xml    ← XML sitemap (all pages + tag pages)
├── tags/          ← tag archive pages
├── assets/        ← locally downloaded and cached media
└── ...

License

MIT © Aman Singh Kattal

Keywords

nostr

FAQs

Package last updated on 13 Sep 2026

Related posts