nostr-post, a [nostril](https://github.com/jb55/nostril) script to make a post with your EDITOR

```bash

#!/usr/bin/env bash

set -e

TMP=$(mktemp)

$EDITOR "$TMP"

if [ ! -f "$TMP" ]; then

printf "could not create temporary file\n" >&2

exit 1

fi

content="$(cat $TMP)"

re="^[[:space:]]*$"

if [[ "$content" =~ $re ]]; then

printf "note empty. aborting.\n" >&2

exit 2

fi

note=$(nostril "$@" --content "$content")

printf "relaying:\n" >&2

printf "$note\n"

<<<"$note" nostr-relay-note

printf "done.\n" >&2

rm -f "$TMP"

```

Reply to this note

Please Login to reply.

Discussion

How I post to nostr from cli:

$ nostr-post --pow 20 --sec mykey -e reply_to -p notify_user

This opens up vim to compose a post, creates the post with nostril and and then relays it with websocat.

nostr-post is here: #[0]