.\" Generated by scdoc 1.11.3 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "nostril" "1" "1980-01-01" .PP .SH NAME .PP nostril - generate nostr events .PP .SH SYNPOSIS .PP \fBnostril\fR [OPTIONS.\&.\&.\&] .PP .SH DESCRIPTION .PP \fBnostril\fR is a tool that creates and signs nostr events.\& .PP .SH OPTIONS .PP \fB--content\fR .RS 4 The text contents of the note .PP .RE \fB--dm\fR .RS 4 Create a direct message.\& This will create a kind-4 note with the contents encrypted> .PP .RE \fB--envelope\fR .RS 4 Wrap the event with `["EVENT", .\&.\&.\& ]` for easy relaying .PP .RE \fB--kind\fR .RS 4 Set the kind of the note .PP .RE \fB--created-at\fR .RS 4 Set the created at.\& Optional, this is set automatically.\& .PP .RE \fB--sec\fR .RS 4 Set the secret key for signing, otherwise one will be randomly generated.\& .PP .RE \fB--mine-pubkey\fR .RS 4 Mine a pubkey.\& This may or may not be cryptographically dubious.\& .PP .RE \fB--pow\fR .RS 4 Number of leading 0 bits of the id the mine for proof-of-work.\& .PP .RE \fB--tag\fR .RS 4 Add a tag with a single value .PP .RE \fB--tagn\fR .RS 4 Add a tag with 0 or more elements .PP .RE \fB-t\fR .RS 4 Shorthand for --tag t .PP .RE \fB-p\fR .RS 4 Shorthand for --tag p .PP .RE \fB-e\fR .RS 4 Shorthand for --tag e .PP .PP .RE .SH Examples .PP \fBGenerate an event\fR .PP .nf .RS 4 $ \&./nostril --sec --content "this is a message" { "id": "da9c36bb8206e748cf136af2a43613a5ee113cb5906a09a8d3df5386039d53ab", "pubkey": "4f6fa8547cf2888415522918175ea0bc0eb473287c5bd7cc459ca440bdf87d97", "created_at": 1660750302, "kind": 1, "tags": [], "content": "this is a message", "sig": "3e4d7d93522e54f201a22944d4d37eb4505ef1cf91c278a3f7d312b772a6c6509d1e11f146d5a003265ae10411a20057bade2365501872d2f2f24219730eed87" } .fi .RE .PP \fBWrap event to send to a relay\fR .PP .nf .RS 4 $ \&./nostril --envelope --sec --content "hello" [ "EVENT", { "id": "ed378d3fdda785c091e9311c6e6eeb075db349a163c5e38de95946f6013a8001", "pubkey": "fd3fdb0d0d8d6f9a7667b53211de8ae3c5246b79bdaf64ebac849d5148b5615f", "created_at": 1649948103, "kind": 1, "tags": [], "content": "hello", "sig": "9d9a49bbc66d4782030b24c71416965e790214d02a54ab132d960c2b02def0371c3d93e5a60a285c55e99721599d1332450731e2c6bb1114b96b591c6967f872" } ] .fi .RE .PP \fBSend to a relay\fR .PP .nf .RS 4 nostril --envelope --sec --content "this is a message" | websocat wss://relay\&.damus\&.io .fi .RE .PP \fBSend a nip04 DM\fR .PP .nf .RS 4 nostril --envelope --dm --sec --content "this is a secret" | websocat wss://relay\&.damus\&.io .fi .RE .PP \fBMine a pubkey\fR .PP .nf .RS 4 nostril --mine-pubkey --pow .fi .RE .PP \fBReply to an event.\& nip10 compliant, includes the `thread_id`\fR .PP .nf .RS 4 \&./nostril --envelope --sec --content "this is reply message" --tag e --tag e | websocat wss://relay\&.damus\&.io .fi .RE