nostril

A C cli tool for creating nostr events
git clone git://jb55.com/nostril
Log | Files | Refs | Submodules | README | LICENSE

nostril.1 (3041B)


      1 .\" Generated by scdoc 1.11.2
      2 .\" Complete documentation for this program is not available as a GNU info page
      3 .ie \n(.g .ds Aq \(aq
      4 .el       .ds Aq '
      5 .nh
      6 .ad l
      7 .\" Begin generated content:
      8 .TH "nostril" "1" "1980-01-01"
      9 .P
     10 .SH NAME
     11 .P
     12 nostril - generate nostr events
     13 .P
     14 .SH SYNPOSIS
     15 .P
     16 \fBnostril\fR [OPTIONS.\&.\&.\&]
     17 .P
     18 .SH DESCRIPTION
     19 .P
     20 \fBnostril\fR is a tool that creates and signs nostr events.\&
     21 .P
     22 .SH OPTIONS
     23 .P
     24 \fB--content\fR
     25 .RS 4
     26 The text contents of the note
     27 .P
     28 .RE
     29 \fB--dm\fR <hex pubkey>
     30 .RS 4
     31 Create a direct message.\& This will create a kind-4 note with the
     32 contents encrypted>
     33 .P
     34 .RE
     35 \fB--envelope\fR
     36 .RS 4
     37 Wrap the event with `["EVENT", .\&.\&.\& ]` for easy relaying
     38 .P
     39 .RE
     40 \fB--kind\fR <number>
     41 .RS 4
     42 Set the kind of the note
     43 .P
     44 .RE
     45 \fB--created-at\fR <unix timestamp>
     46 .RS 4
     47 Set the created at.\& Optional, this is set automatically.\&
     48 .P
     49 .RE
     50 \fB--sec\fR <hex seckey>
     51 .RS 4
     52 Set the secret key for signing, otherwise one will be randomly generated.\&
     53 .P
     54 .RE
     55 \fB--mine-pubkey\fR
     56 .RS 4
     57 Mine a pubkey.\& This may or may not be cryptographically dubious.\&
     58 .P
     59 .RE
     60 \fB--pow\fR <difficulty>
     61 .RS 4
     62 Number of leading 0 bits of the id the mine for proof-of-work.\&
     63 .P
     64 .RE
     65 \fB--tag\fR <key> <value>
     66 .RS 4
     67 Add a tag with a single value
     68 .P
     69 .RE
     70 \fB-t\fR
     71 .RS 4
     72 Shorthand for --tag t <hashtag>
     73 .P
     74 .RE
     75 \fB-p\fR
     76 .RS 4
     77 Shorthand for --tag p <hex pubkey>
     78 .P
     79 .RE
     80 \fB-e\fR
     81 .RS 4
     82 Shorthand for --tag e <note id>
     83 .P
     84 .P
     85 .RE
     86 .SH Examples
     87 .P
     88 \fBGenerate an event\fR
     89 .P
     90 .nf
     91 .RS 4
     92 $ \&./nostril --sec <key> --content "this is a message"
     93 {
     94 	"id": "da9c36bb8206e748cf136af2a43613a5ee113cb5906a09a8d3df5386039d53ab",
     95 	"pubkey": "4f6fa8547cf2888415522918175ea0bc0eb473287c5bd7cc459ca440bdf87d97",
     96 	"created_at": 1660750302,
     97 	"kind": 1,
     98 	"tags": [],
     99 	"content": "this is a message",
    100 	"sig": "3e4d7d93522e54f201a22944d4d37eb4505ef1cf91c278a3f7d312b772a6c6509d1e11f146d5a003265ae10411a20057bade2365501872d2f2f24219730eed87"
    101 }
    102 .fi
    103 .RE
    104 .P
    105 \fBWrap event to send to a relay\fR
    106 .P
    107 .nf
    108 .RS 4
    109 $ \&./nostril --envelope --sec <key> --content "hello"
    110 [ "EVENT",
    111 {
    112 	"id": "ed378d3fdda785c091e9311c6e6eeb075db349a163c5e38de95946f6013a8001",
    113 	"pubkey": "fd3fdb0d0d8d6f9a7667b53211de8ae3c5246b79bdaf64ebac849d5148b5615f",
    114 	"created_at": 1649948103,
    115 	"kind": 1,
    116 	"tags": [],
    117 	"content": "hello",
    118 	"sig": "9d9a49bbc66d4782030b24c71416965e790214d02a54ab132d960c2b02def0371c3d93e5a60a285c55e99721599d1332450731e2c6bb1114b96b591c6967f872"
    119 } ]
    120 .fi
    121 .RE
    122 .P
    123 \fBSend to a relay\fR
    124 .P
    125 .nf
    126 .RS 4
    127 nostril --envelope --sec <key> --content "this is a message" | websocat wss://relay\&.damus\&.io
    128 .fi
    129 .RE
    130 .P
    131 \fBSend a nip04 DM\fR
    132 .P
    133 .nf
    134 .RS 4
    135 nostril --envelope --dm <pubkey> --sec <key> --content "this is a secret" | websocat wss://relay\&.damus\&.io
    136 .fi
    137 .RE
    138 .P
    139 \fBMine a pubkey\fR
    140 .P
    141 .nf
    142 .RS 4
    143 nostril --mine-pubkey --pow <difficulty>
    144 .fi
    145 .RE
    146 .P
    147 \fBReply to an event.\& nip10 compliant, includes the `thread_id`\fR
    148 .P
    149 .nf
    150 .RS 4
    151 \&./nostril --envelope --sec <key> --content "this is reply message" --tag e <thread_id> --tag e <note_id> | websocat wss://relay\&.damus\&.io
    152 .fi
    153 .RE