Dagny Nostr (nak)
/install dagny-nostr-nak
Nostr (nak)
Overview
Use nak for all Nostr actions: publish notes, reply in threads, and query relays for replies/mentions. Default relay: wss://relay.primal.net unless the user specifies another.
Install / Update nak
- Repo: https://github.com/fiatjaf/nak
- Install (script):
curl -sSL https://raw.githubusercontent.com/fiatjaf/nak/master/install.sh | sh - Update: re-run the install script above (it installs latest)
- Tip: review the script before running if you want to audit what it does.
Onboarding (keys)
- Generate a new key:
nak key generate(prints nsec + npub) - Save the secret: store
NOSTR_SECRET_KEYin a shell profile or a local.envwith restricted permissions.- Example:
export NOSTR_SECRET_KEY="nsec1..." - Optional:
chmod 600 .envif you store it locally. - Prefer env vars over inline
--secin commands.
- Example:
Quick Start (common tasks)
- Post a note:
nak event -k 1 --sec $NOSTR_SECRET_KEY -c "..." \x3Crelay> - Reply to a note: include
rootandreplytags (see below) - Check replies:
nak req -k 1 -e \x3Cevent_id> -l \x3CN> \x3Crelay> - Check mentions:
nak req -k 1 -p \x3Cyour_pubkey_hex> -l \x3CN> \x3Crelay>
Workflow: Posting & Replies
1) Create a new note
- Build content.
- Publish:
nak event -k 1 --sec $NOSTR_SECRET_KEY -c "\x3Ccontent>" wss://relay.primal.net
2) Reply to a reply (correct threading)
Always include both root and reply tags so clients display it as a reply:
root= original top‑level note idreply= the specific note you’re replying to
Use -t e="\x3Cid>;\x3Crelay>;root" and -t e="\x3Cid>;\x3Crelay>;reply".
Example:
nak event -k 1 --sec $NOSTR_SECRET_KEY \
-t e="\x3Croot_id>;wss://relay.primal.net;root" \
-t e="\x3Creply_id>;wss://relay.primal.net;reply" \
-p \x3Cother_pubkey_hex> \
-c "\x3Creply content>" \
wss://relay.primal.net
3) Check for replies to a note
nak req -k 1 -e \x3Croot_id> -l 20 wss://relay.primal.net
4) Check mentions of your pubkey
nak req -k 1 -p \x3Cyour_pubkey_hex> -l 20 wss://relay.primal.net
Conventions
- Default relay:
wss://relay.primal.net - Prefer
NOSTR_SECRET_KEYenv var instead of inline--sec. - When tagging users, include
-p \x3Cnpub/hex>. - For human-facing links, encode with
nak encode nevent ...and format ashttps://primal.net/e/\x3Cnevent>.
References
- Use
nak event --helpandnak req --helpfor flag details.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install dagny-nostr-nak - After installation, invoke the skill by name or use
/dagny-nostr-nak - Provide required inputs per the skill's parameter spec and get structured output
What is Dagny Nostr (nak)?
Manage Nostr posting and engagement via the nak CLI. Use for creating notes, replying in threads, tagging npubs, checking replies/mentions, monitoring a rela... It is an AI Agent Skill for Claude Code / OpenClaw, with 713 downloads so far.
How do I install Dagny Nostr (nak)?
Run "/install dagny-nostr-nak" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Dagny Nostr (nak) free?
Yes, Dagny Nostr (nak) is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Dagny Nostr (nak) support?
Dagny Nostr (nak) is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Dagny Nostr (nak)?
It is built and maintained by edwardbickerton (@edwardbickerton); the current version is v0.1.4.