{"id":13832811,"url":"https://github.com/jb55/nostril","last_synced_at":"2025-04-05T07:06:50.763Z","repository":{"id":43299884,"uuid":"481645208","full_name":"jb55/nostril","owner":"jb55","description":"A cli util for generating nostr events","archived":false,"fork":false,"pushed_at":"2024-09-30T18:34:12.000Z","size":60,"stargazers_count":114,"open_issues_count":12,"forks_count":23,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-04T08:08:43.579Z","etag":null,"topics":["nostr"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jb55.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-14T14:56:43.000Z","updated_at":"2025-03-01T01:26:37.000Z","dependencies_parsed_at":"2024-01-13T16:33:32.643Z","dependency_job_id":"65bdef99-5188-4c21-85b2-1dcecbd032ea","html_url":"https://github.com/jb55/nostril","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jb55%2Fnostril","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jb55%2Fnostril/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jb55%2Fnostril/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jb55%2Fnostril/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jb55","download_url":"https://codeload.github.com/jb55/nostril/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299832,"owners_count":20916190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nostr"],"created_at":"2024-08-04T11:00:31.286Z","updated_at":"2025-04-05T07:06:50.730Z","avatar_url":"https://github.com/jb55.png","language":"C","funding_links":[],"categories":["Install from Source","Tools"],"sub_categories":["Nostr","Client reviews and/or comparisons"],"readme":"nostril(1)\n\n# NAME\n\nnostril - generate nostr events\n\n# SYNPOSIS\n\n*nostril* [OPTIONS...]\n\n# DESCRIPTION\n\n*nostril* is a tool that creates and signs nostr events.\n\n# OPTIONS\n\n*--content*\n\tThe text contents of the note\n\n*--dm* \u003chex pubkey\u003e\n\tCreate a direct message. This will create a kind-4 note with the\n\tcontents encrypted\u003e\n\n*--envelope*\n\tWrap the event with `[\"EVENT\", ... ]` for easy relaying\n\n*--kind* \u003cnumber\u003e\n\tSet the kind of the note\n\n*--created-at* \u003cunix timestamp\u003e\n\tSet the created at. Optional, this is set automatically.\n\n*--sec* \u003chex seckey\u003e\n\tSet the secret key for signing, otherwise one will be randomly generated.\n\n*--mine-pubkey*\n\tMine a pubkey. This may or may not be cryptographically dubious.\n\n*--pow* \u003cdifficulty\u003e\n\tNumber of leading 0 bits of the id the mine for proof-of-work.\n\n*--tag* \u003ckey\u003e \u003cvalue\u003e\n\tAdd a tag with a single value\n\n*--tagn* \u003cN\u003e \u003cvalue \\* N ...\u003e\n\tAdd a tag with 0 or more elements\n\n*-t*\n\tShorthand for --tag t \u003chashtag\u003e\n\n*-p*\n\tShorthand for --tag p \u003chex pubkey\u003e\n\n*-e*\n\tShorthand for --tag e \u003cnote id\u003e\n\n\n# Examples\n\n*Generate an event*\n\n```\n$ ./nostril --sec \u003ckey\u003e --content \"this is a message\"\n{\n\t\"id\": \"da9c36bb8206e748cf136af2a43613a5ee113cb5906a09a8d3df5386039d53ab\",\n\t\"pubkey\": \"4f6fa8547cf2888415522918175ea0bc0eb473287c5bd7cc459ca440bdf87d97\",\n\t\"created_at\": 1660750302,\n\t\"kind\": 1,\n\t\"tags\": [],\n\t\"content\": \"this is a message\",\n\t\"sig\": \"3e4d7d93522e54f201a22944d4d37eb4505ef1cf91c278a3f7d312b772a6c6509d1e11f146d5a003265ae10411a20057bade2365501872d2f2f24219730eed87\"\n}\n```\n\n*Wrap event to send to a relay*\n\n```\n$ ./nostril --envelope --sec \u003ckey\u003e --content \"hello\"\n[ \"EVENT\",\n{\n\t\"id\": \"ed378d3fdda785c091e9311c6e6eeb075db349a163c5e38de95946f6013a8001\",\n\t\"pubkey\": \"fd3fdb0d0d8d6f9a7667b53211de8ae3c5246b79bdaf64ebac849d5148b5615f\",\n\t\"created_at\": 1649948103,\n\t\"kind\": 1,\n\t\"tags\": [],\n\t\"content\": \"hello\",\n\t\"sig\": \"9d9a49bbc66d4782030b24c71416965e790214d02a54ab132d960c2b02def0371c3d93e5a60a285c55e99721599d1332450731e2c6bb1114b96b591c6967f872\"\n} ]\n```\n\n*Send to a relay*\n\n```\nnostril --envelope --sec \u003ckey\u003e --content \"this is a message\" | websocat wss://relay.damus.io\n```\n\n*Send a nip04 DM*\n\n```\nnostril --envelope --dm \u003cpubkey\u003e --sec \u003ckey\u003e --content \"this is a secret\" | websocat wss://relay.damus.io\n```\n\n*Mine a pubkey*\n\n```\nnostril --mine-pubkey --pow \u003cdifficulty\u003e\n```\n\n*Reply to an event. nip10 compliant, includes the `thread_id`*\n\n```\n./nostril --envelope --sec \u003ckey\u003e --content \"this is reply message\" --tag e \u003cthread_id\u003e --tag e \u003cnote_id\u003e | websocat wss://relay.damus.io\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjb55%2Fnostril","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjb55%2Fnostril","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjb55%2Fnostril/lists"}